Enhance README.md with comprehensive features and usage details for Excalidraw MCP server. Updated sections for integration, installation, and examples to improve clarity and developer experience.

This commit is contained in:
yctimlin
2025-03-16 22:45:52 +08:00
parent 860e905b56
commit 7a72c187a6
+32 -20
View File
@@ -1,14 +1,22 @@
# Excalidraw MCP Server
# Excalidraw MCP Server: Powerful Drawing API for LLM Integration
A Model Context Protocol server that provides full interaction with Excalidraw elements. This server enables LLMs to create, modify, query, and manipulate Excalidraw drawings through a structured API.
A comprehensive Model Context Protocol (MCP) server that enables seamless interaction with Excalidraw diagrams and drawings. This server provides LLMs (Large Language Models) with the ability to create, modify, query, and manipulate Excalidraw drawings through a structured, developer-friendly API.
## Components
## Features
### Tools
- **Full Excalidraw Element Control**: Create, update, delete, and query any Excalidraw element
- **Advanced Element Manipulation**: Group, align, distribute, lock, and unlock elements
- **Resource Management**: Access and modify scene information, libraries, themes, and elements
- **Easy Integration**: Works with Claude Desktop and other LLM platforms
- **Docker Support**: Simple deployment with containerization options
## API Tools Reference
### Element Creation and Modification
* **create_element**
* Create a new Excalidraw element
* Required inputs: `type` (rectangle, ellipse, etc.), `x`, `y` coordinates
* Create a new Excalidraw element (rectangle, ellipse, diamond, etc.)
* Required inputs: `type`, `x`, `y` coordinates
* Optional inputs: dimensions, colors, styling properties
* **update_element**
@@ -24,10 +32,14 @@ A Model Context Protocol server that provides full interaction with Excalidraw e
* Query elements with optional filtering
* Optional inputs: `type` to filter by element type, `filter` object with key-value pairs
### Resource Management
* **get_resource**
* Get a specific resource like scene information or all elements
* Required input: `resource` type (scene, library, theme, elements)
### Element Organization
* **group_elements**
* Group multiple elements together
* Required input: `elementIds` array of element IDs to group
@@ -41,7 +53,7 @@ A Model Context Protocol server that provides full interaction with Excalidraw e
* Required inputs: `elementIds` array and `alignment` (left, center, right, top, middle, bottom)
* **distribute_elements**
* Distribute elements evenly
* Distribute elements evenly across space
* Required inputs: `elementIds` array and `direction` (horizontal or vertical)
* **lock_elements**
@@ -52,9 +64,9 @@ A Model Context Protocol server that provides full interaction with Excalidraw e
* Unlock elements to allow modification
* Required input: `elementIds` array of elements to unlock
## Usage with Claude Desktop
## Integration with Claude Desktop
To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your `claude_desktop_config.json`:
To use this server with the Claude Desktop application, add the following configuration to the "mcpServers" section of your `claude_desktop_config.json`:
```json
{
@@ -71,7 +83,7 @@ To use this server with the Claude Desktop app, add the following configuration
}
```
### Docker
### Docker Integration
```json
{
@@ -88,9 +100,9 @@ To use this server with the Claude Desktop app, add the following configuration
}
```
## Installation
## Installation Guide
### NPM
### NPM Installation
```bash
# Install dependencies
@@ -100,7 +112,7 @@ npm install
npm start
```
### Docker
### Docker Installation
```bash
# Build the Docker image
@@ -110,7 +122,7 @@ docker build -t mcp/excalidraw .
docker run -i --rm mcp/excalidraw
```
## Environment Variables
## Configuration Options
The server can be configured using the following environment variables:
@@ -118,11 +130,11 @@ The server can be configured using the following environment variables:
- `DEBUG` - Enable debug mode (default: "false")
- `DEFAULT_THEME` - Set the default theme (default: "light")
## Example Usage
## Usage Examples
Here are some examples of how to use the Excalidraw MCP server:
Here are some practical examples of how to use the Excalidraw MCP server:
### Creating a Rectangle
### Creating a Rectangle Element
```json
{
@@ -138,7 +150,7 @@ Here are some examples of how to use the Excalidraw MCP server:
}
```
### Querying Elements
### Querying Specific Elements
```json
{
@@ -149,7 +161,7 @@ Here are some examples of how to use the Excalidraw MCP server:
}
```
### Grouping Elements
### Grouping Multiple Elements
```json
{
@@ -159,4 +171,4 @@ Here are some examples of how to use the Excalidraw MCP server:
## License
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
This Excalidraw MCP server is licensed under the MIT License. You are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.