Add install instructions for @open-pencil/mcp
This commit is contained in:
parent
10b4fc6c13
commit
d93bcab0b6
|
|
@ -100,12 +100,15 @@ Connect AI coding tools to read and modify `.fig` files headlessly. [Full docs
|
|||
|
||||
**Stdio** (Claude Code, Cursor, Windsurf) — add to your MCP config:
|
||||
|
||||
```sh
|
||||
bun add -g @open-pencil/mcp
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"open-pencil": {
|
||||
"command": "bun",
|
||||
"args": ["packages/mcp/src/index.ts"]
|
||||
"command": "openpencil-mcp"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -114,7 +117,7 @@ Connect AI coding tools to read and modify `.fig` files headlessly. [Full docs
|
|||
**HTTP** (scripts, browser extensions, CI):
|
||||
|
||||
```sh
|
||||
bun packages/mcp/src/http.ts # http://localhost:3100/mcp
|
||||
openpencil-mcp-http # http://localhost:3100/mcp
|
||||
```
|
||||
|
||||
29 tools: create shapes, set fills/strokes/layout, find nodes, open/save `.fig` files, render JSX to design nodes.
|
||||
|
|
|
|||
|
|
@ -4,10 +4,28 @@ OpenPencil includes an MCP (Model Context Protocol) server that lets AI coding t
|
|||
|
||||
Two transports: **stdio** for MCP clients, **HTTP** for everything else.
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
bun add -g @open-pencil/mcp
|
||||
```
|
||||
|
||||
## Stdio (Claude Code, Cursor, etc.)
|
||||
|
||||
Add to your MCP config (e.g. `~/.claude/settings.json` or `.cursor/mcp.json`):
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"open-pencil": {
|
||||
"command": "openpencil-mcp"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Or run from source without installing:
|
||||
|
||||
::: code-group
|
||||
```json [Bun]
|
||||
{
|
||||
|
|
@ -36,13 +54,11 @@ Add to your MCP config (e.g. `~/.claude/settings.json` or `.cursor/mcp.json`):
|
|||
For browser extensions, scripts, CI, or any HTTP client:
|
||||
|
||||
```sh
|
||||
# Bun
|
||||
bun packages/mcp/src/http.ts
|
||||
|
||||
# Node.js
|
||||
npx tsx packages/mcp/src/http.ts
|
||||
openpencil-mcp-http
|
||||
```
|
||||
|
||||
Or from source: `bun packages/mcp/src/http.ts` / `npx tsx packages/mcp/src/http.ts`
|
||||
|
||||
Starts on port 3100 (override with `PORT` env var). Endpoints:
|
||||
|
||||
- `GET /health` — server status
|
||||
|
|
|
|||
Loading…
Reference in a new issue