@shirbarzur/planform-mcp-server 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.mcpregistry_github_token +1 -1
- package/.mcpregistry_registry_token +1 -1
- package/README.md +67 -4
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/server.json +2 -2
- package/src/index.ts +5 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ghu_bQEeGIBwhwwlgu8WPvgILeakXXjtQg2O370O
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"token":"eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.
|
|
1
|
+
{"token":"eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJtY3AtcmVnaXN0cnkiLCJleHAiOjE3NzE3MDIwODgsIm5iZiI6MTc3MTcwMTc4OCwiaWF0IjoxNzcxNzAxNzg4LCJhdXRoX21ldGhvZCI6ImdpdGh1Yi1hdCIsImF1dGhfbWV0aG9kX3N1YiI6IlNoaXJCYXJadXIiLCJwZXJtaXNzaW9ucyI6W3siYWN0aW9uIjoicHVibGlzaCIsInJlc291cmNlIjoiaW8uZ2l0aHViLlNoaXJCYXJadXIvKiJ9XX0.l9RfFMNWrIPITwIH2jBY3cf-R3SmJ_ShTDr4i6dNwzyhv3BsAr0DgpvDxAnjYpxhesJqtcNuKwIYtENH8cvmCA","expires_at":1771702088}
|
package/README.md
CHANGED
|
@@ -65,13 +65,76 @@ npm run build
|
|
|
65
65
|
npm start
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
+
## Running locally (against local backend)
|
|
69
|
+
|
|
70
|
+
When you run the server **from this repo** (`npm run dev` or `npm start`), it loads `.env` from this project root. To point at your local backend once:
|
|
71
|
+
|
|
72
|
+
1. In this repo, set in `.env`:
|
|
73
|
+
```env
|
|
74
|
+
BACKEND_BASE_URL=http://localhost:8000
|
|
75
|
+
FRONTEND_BASE_URL=http://localhost:5173
|
|
76
|
+
```
|
|
77
|
+
2. Run `npm run dev` or `npm run build && npm start`, and use the MCP (e.g. add a command in Cursor that runs `node` with `dist/index.js` and cwd set to this repo).
|
|
78
|
+
3. When you’re done, change `.env` back to the production URLs or leave it for next time.
|
|
79
|
+
|
|
80
|
+
The published package (npx) does not read your workspace `.env`; only when running from this repo does `.env` here apply.
|
|
81
|
+
|
|
82
|
+
## Add to Cursor
|
|
83
|
+
|
|
84
|
+
After the server is [published](#publishing-to-the-mcp-registry), you can add it in Cursor in either of these ways.
|
|
85
|
+
|
|
86
|
+
### Option 1: Cursor Settings UI
|
|
87
|
+
|
|
88
|
+
1. Open **Cursor Settings** (Ctrl+, or Cmd+,).
|
|
89
|
+
2. Go to **Features → Tools & MCP** (or search for "MCP").
|
|
90
|
+
3. Click **Add new MCP server**.
|
|
91
|
+
4. Configure:
|
|
92
|
+
- **Name:** `planform` (or any label you like)
|
|
93
|
+
- **Type:** Command
|
|
94
|
+
- **Command:** `npx`
|
|
95
|
+
- **Arguments:** `-y`, `@shirbarzur/planform-mcp-server`
|
|
96
|
+
- **Env** (optional; defaults point to https://www.planform.io):
|
|
97
|
+
- `BACKEND_BASE_URL` = `https://www.planform.io/api`
|
|
98
|
+
- `FRONTEND_BASE_URL` = `https://www.planform.io`
|
|
99
|
+
5. Save and **restart Cursor** so the new server is picked up.
|
|
100
|
+
|
|
101
|
+
### Option 2: Edit `mcp.json` directly
|
|
102
|
+
|
|
103
|
+
Create or edit your MCP config:
|
|
104
|
+
|
|
105
|
+
- **Project:** `.cursor/mcp.json` in your project root (good for sharing with the team).
|
|
106
|
+
- **Global:** `~/.cursor/mcp.json` (Windows: `%USERPROFILE%\.cursor\mcp.json`).
|
|
107
|
+
|
|
108
|
+
Example **`.cursor/mcp.json`**:
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"mcpServers": {
|
|
113
|
+
"planform": {
|
|
114
|
+
"command": "npx",
|
|
115
|
+
"args": ["-y", "@shirbarzur/planform-mcp-server"],
|
|
116
|
+
"env": {
|
|
117
|
+
"BACKEND_BASE_URL": "https://www.planform.io/api",
|
|
118
|
+
"FRONTEND_BASE_URL": "https://www.planform.io"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
You can omit the `env` block to use the built-in defaults (production Planform API). Restart Cursor after changing the file.
|
|
126
|
+
|
|
127
|
+
The server loads `.env` only from the **package directory** (next to the executable), not from your workspace, so your project’s `.env` does not override the default (production) backend URL.
|
|
128
|
+
|
|
129
|
+
**First use:** When you use the MCP, the `device_start` tool will give you a link and code to sign in at [planform.io](https://www.planform.io) and authorize the connection.
|
|
130
|
+
|
|
68
131
|
## VS Code Integration
|
|
69
132
|
|
|
70
|
-
To use this MCP server with VS Code
|
|
133
|
+
To use this MCP server with VS Code (with an MCP extension):
|
|
71
134
|
|
|
72
|
-
1. Add the server configuration to your MCP settings
|
|
73
|
-
2. The server
|
|
74
|
-
3. Use the device flow authentication to get access tokens
|
|
135
|
+
1. Add the server configuration to your MCP settings (same structure as above, under the key your extension expects, e.g. `mcp.servers`).
|
|
136
|
+
2. The server runs via stdio transport.
|
|
137
|
+
3. Use the device flow authentication to get access tokens.
|
|
75
138
|
|
|
76
139
|
## Available Tools
|
|
77
140
|
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { dirname, join } from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
2
4
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
3
5
|
import dotenv from 'dotenv';
|
|
4
6
|
import { PlanformMCPServer } from './server.js';
|
|
5
|
-
// Load
|
|
6
|
-
|
|
7
|
+
// Load .env only from the package directory (not the workspace cwd), so workspace .env doesn't override defaults
|
|
8
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
dotenv.config({ path: join(__dirname, '..', '.env') });
|
|
7
10
|
async function main() {
|
|
8
11
|
// Create server transport (stdio for VS Code integration)
|
|
9
12
|
const transport = new StdioServerTransport();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAMjF,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,iHAAiH;AACjH,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;AAEvD,KAAK,UAAU,IAAI;IACjB,0DAA0D;IAC1D,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAE7C,6BAA6B;IAC7B,MAAM,MAAM,GAAG,IAAI,iBAAiB,EAAE,CAAC;IAEvC,mBAAmB;IACnB,MAAM,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAE9B,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;AAC5D,CAAC;AAED,2BAA2B;AAC3B,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;IACxB,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;IACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE;IACzB,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;IACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,KAAK,CAAC,CAAC;IAC7D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shirbarzur/planform-mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "MCP server for Planform diagram management",
|
|
5
5
|
"mcpName": "io.github.ShirBarZur/planform-mcp",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
|
+
"bin": "dist/index.js",
|
|
7
8
|
"type": "module",
|
|
8
9
|
"scripts": {
|
|
9
10
|
"build": "echo Building... && tsc && echo Build complete!",
|
package/server.json
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
"name": "io.github.ShirBarZur/planform-mcp",
|
|
4
4
|
"title": "Planform MCP Server",
|
|
5
5
|
"description": "Create and manage Planform UML diagrams, nodes, and links. For VS Code and Cursor.",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.3",
|
|
7
7
|
"packages": [
|
|
8
8
|
{
|
|
9
9
|
"registryType": "npm",
|
|
10
10
|
"identifier": "@shirbarzur/planform-mcp-server",
|
|
11
|
-
"version": "1.0.
|
|
11
|
+
"version": "1.0.3",
|
|
12
12
|
"transport": {
|
|
13
13
|
"type": "stdio"
|
|
14
14
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import { dirname, join } from 'path';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
3
5
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
4
6
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
5
7
|
import {
|
|
@@ -10,8 +12,9 @@ import {
|
|
|
10
12
|
import dotenv from 'dotenv';
|
|
11
13
|
import { PlanformMCPServer } from './server.js';
|
|
12
14
|
|
|
13
|
-
// Load
|
|
14
|
-
|
|
15
|
+
// Load .env only from the package directory (not the workspace cwd), so workspace .env doesn't override defaults
|
|
16
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
17
|
+
dotenv.config({ path: join(__dirname, '..', '.env') });
|
|
15
18
|
|
|
16
19
|
async function main() {
|
|
17
20
|
// Create server transport (stdio for VS Code integration)
|