
shahidhustles/tldraw-mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
Этот проект интегрирует tldraw с Claude AI с использованием протокола Model Context Protocol (MCP). Это позволяет Клоду создавать и манипулировать диаграммами на основе инструкций естественного языка.
Обзор
Этот проект интегрирует tldraw с Claude AI с использованием протокола Model Context Protocol (MCP). Это позволяет Клоду создавать и манипулировать диаграммами на основе инструкций естественного языка. Node.js 18+ - Claude Desktop - Visual Studio Code (рекомендуется) Создать или отредактировать файл конфигурации Claude Desktop по адресу %AppData%\Claude\claude desktop config.json: Замените путь абсолютным путем на скомпилированный файл сервера. Вам нужно запустить три компонента в следующем порядке: - Запуск Claude Desktop - Открытые настройки (иконка гарнитуры) - Перейти на вкладку "Advanced" - Под "MCP Servers", включить "tldrawserver" - Нажмите "Применить" 1.Откройте браузер для http://localhost:3000 2.Вы должны увидеть полотно 3. В Claude Desktop попробуйте команду: Чтобы полностью протестировать интеграцию, попробуйте следующие команды Claude:
Обзор (машинный перевод)
Этот проект интегрирует tldraw с Claude AI с использованием протокола Model Context Protocol (MCP). Это позволяет Клоду создавать и манипулировать диаграммами на основе инструкций естественного языка.
Начало работы
Предпосылки
- Node.js 18+ установлен Клод Десктоп установлен Visual Studio Code (рекомендуется)
###Установка и настройка
-
**Клонирование и установка зависимостей: **
-
** Создайте код сервера: **
3 **Настройка Claude Desktop: **
Создайте или отредактируйте файл конфигурации Claude Desktop по адресу %AppData%\Claude\claude_desktop_config.json:
Замените путь абсолютным путем на скомпилированный файл сервера.
Запуск приложения
Вам нужно запустить три компонента в следующем порядке:
-
** Запустите HTTP-сервер: **
-
** Начать Next.js Frontend: **
-
** Запустите Claude Desktop и включите MCP-сервер: **
Скачать Claude Desktop
- Открытые настройки (gear icon)
- Перейдите на вкладку “Передовые”
- В разделе “MCP-серверы” включить “tldrawserver”
- Нажмите “Применить”
###Проверка настройки
1.Откройте браузер http://localhost:3000
2 Вы должны увидеть холст Tldraw
3. В Claude Desktop попробуйте команду:
Тестирование системы
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
Tldraw MCP Server
This project integrates tldraw with Claude AI using the Model Context Protocol (MCP). It allows Claude to create and manipulate diagrams based on natural language instructions.
Getting Started
Prerequisites
- Node.js 18+ installed
- Claude Desktop installed
- Visual Studio Code (recommended)
Installation and Setup
-
Clone and install dependencies:
cd tldraw-mcp npm install cd server npm install -
Build the server code:
cd server npm run build -
Configure Claude Desktop:
Create or edit the Claude Desktop configuration file at
%AppData%\Claude\claude_desktop_config.json:{ "mcpServers": { "tldrawserver": { "command": "node", "args": ["D:\\tldraw-mcp\\server\\dist\\index.js"] } } }Replace the path with the absolute path to the compiled server file.
Starting the Application
You need to start three components in the following order:
-
Start the HTTP Server:
# In the server directory npm run start:http -
Start the Next.js Frontend:
# In the root directory npm run dev -
Start Claude Desktop and enable the MCP Server:
- Launch Claude Desktop
- Open settings (gear icon)
- Go to the “Advanced” tab
- Under “MCP Servers”, enable “tldrawserver”
- Click “Apply”
Verifying the Setup
- Open your browser to
http://localhost:3000 - You should see the tldraw canvas
- In Claude Desktop, try a command like:
Create a flowchart with two steps: "Start" and "Process Data"
Testing the System
To fully test the integration, try the following Claude commands:
-
Create a simple diagram:
Create a rectangle labeled "Database" at position (200, 300) with width 150 and height 100 -
Create and connect shapes:
Create an ellipse labeled "User" at position (100, 100) with width 120 and height 80, and a rectangle labeled "API" at position (300, 100) with width 150 and height 80. Then connect the "User" shape to the "API" shape. -
Create a flowchart:
Create a flowchart with the following steps: 1. "Start Process" 2. "Collect Data" 3. "Analyze Results" 4. "Generate Report" -
Add standalone text:
Add text "CONFIDENTIAL" at position (400, 50) with font size 24 -
Get a snapshot of the current diagram:
Take a snapshot of the current diagram
Verifying Event Flow
To verify that events are flowing correctly through the system:
- Open your browser’s developer tools (F12 or Ctrl+Shift+I)
- Go to the Console tab
- Look for log messages with prefixes:
[EventBus]- Events being broadcast internally[HTTP Server]- Messages from the HTTP server
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →Конфигурация
{
"mcpServers": {
"tldrawserver": {
"command": "node",
"args": ["D:\\tldraw-mcp\\server\\dist\\index.js"]
}
}
}