@unstable-dev/unmeshed-mcp 0.1.0 → 0.1.2

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/README.md CHANGED
@@ -1,18 +1,36 @@
1
1
  # Unmeshed MCP server
2
2
 
3
- Use Unmeshed from Cursor, Claude Code, Codex, and other MCP clients. You do not need the Unmeshed source repo or the Unmeshed CLI.
3
+ Talk to Unmeshed from Cursor, Claude Code, Codex, or any other MCP client. List, write, save, and run processes with prompts. You do not need the Unmeshed source repo or the Unmeshed CLI.
4
4
 
5
- ## Setup
5
+ This is a test package: **`@unstable-dev/unmeshed-mcp`**. Use this name, not `@unmeshed/mcp`.
6
6
 
7
- 1. In Unmeshed, create an **API client**. Copy the client id and auth token.
8
- 2. Add this to your MCP config:
7
+ ## What you need
8
+
9
+ - [Node.js](https://nodejs.org/) 18 or later (`node -v`)
10
+ - Access to an Unmeshed org
11
+ - Your own API client credentials (same Client Id + Token as `@unmeshed/sdk`)
12
+
13
+ Do not paste someone else’s token. Each person should create their own API client.
14
+
15
+ ## 1. Get credentials
16
+
17
+ 1. Open Unmeshed in the browser. Copy the origin from the address bar — that is `UNMESHED_URL`.
18
+ Example: `https://your-org.unmeshed.io` (no path, no trailing slash).
19
+ 2. In Unmeshed go to **Admin → Applications → Add**. Give the client a name and confirm.
20
+ 3. Copy **Client Id** and **Token**. The token is shown **only once**.
21
+
22
+ [Generating client credentials](https://unmeshed.io/docs/sdks/creating-client-credentials) has screenshots.
23
+
24
+ ## 2. Add it to your MCP client
25
+
26
+ Use this block. Replace the three env values with yours.
9
27
 
10
28
  ```json
11
29
  {
12
30
  "mcpServers": {
13
31
  "unmeshed": {
14
32
  "command": "npx",
15
- "args": ["-y", "@unmeshed/mcp"],
33
+ "args": ["-y", "@unstable-dev/unmeshed-mcp"],
16
34
  "env": {
17
35
  "UNMESHED_URL": "https://your-org.unmeshed.io",
18
36
  "UNMESHED_CLIENT_ID": "your-client-id",
@@ -23,18 +41,43 @@ Use Unmeshed from Cursor, Claude Code, Codex, and other MCP clients. You do not
23
41
  }
24
42
  ```
25
43
 
26
- That is the whole setup: your Unmeshed URL, plus the same client id and auth token used by `@unmeshed/sdk`.
44
+ `UNMESHED_BASE_URL` is accepted as an alias for `UNMESHED_URL`.
27
45
 
28
- Until `@unmeshed/mcp` is published, point `command` at Node and `args` at this package’s built file:
46
+ ### Cursor
29
47
 
30
- ```json
31
- {
32
- "command": "node",
33
- "args": ["/ABS/PATH/TO/unmeshed-mcp/dist/index.js"]
34
- }
48
+ Cursor **Settings → MCP**, add a new server, and paste the JSON above (or merge the `unmeshed` entry into an existing file).
49
+
50
+ - All projects: `~/.cursor/mcp.json`
51
+ - This project only: `.cursor/mcp.json`
52
+
53
+ Reload MCP. `unmeshed` should show as connected, with tools `get_docs`, `list_processes`, `get_process`, `save_process`, `run_process`, and `get_run`.
54
+
55
+ ### Claude Code
56
+
57
+ Same JSON in `.mcp.json` at the project root, or:
58
+
59
+ ```bash
60
+ claude mcp add unmeshed \
61
+ --env UNMESHED_URL=https://your-org.unmeshed.io \
62
+ --env UNMESHED_CLIENT_ID=your-client-id \
63
+ --env UNMESHED_AUTH_TOKEN=your-auth-token \
64
+ -- npx -y @unstable-dev/unmeshed-mcp
35
65
  ```
36
66
 
37
- Use `http://localhost:8080` if the engine is running locally.
67
+ ### Other clients (Codex, Claude Desktop, …)
68
+
69
+ Same `command`, `args`, and `env`. On native Windows, if `npx` does not start, use `"command": "cmd"` and `"args": ["/c", "npx", "-y", "@unstable-dev/unmeshed-mcp"]`.
70
+
71
+ ## 3. Try it
72
+
73
+ In Agent chat:
74
+
75
+ 1. What processes do I have in Unmeshed?
76
+ 2. Show me the process definition schema.
77
+ 3. Create a hello-world process, save it, and run it.
78
+ 4. Did that run succeed?
79
+
80
+ The assistant should call `get_docs` before writing a process, then `save_process`, `run_process`, and `get_run`.
38
81
 
39
82
  ## Tools
40
83
 
@@ -47,16 +90,24 @@ Use `http://localhost:8080` if the engine is running locally.
47
90
  | `run_process` | Start a process. |
48
91
  | `get_run` | Fetch a process run by id. |
49
92
 
50
- Call `get_docs` before writing a process. Then `save_process`, then `run_process`, then `get_run`.
93
+ ## Troubleshooting
51
94
 
52
- ## Try it
95
+ **Not connected / `Connection closed`**
53
96
 
54
- 1. What processes do I have?
55
- 2. Show me the process definition schema.
56
- 3. Create a hello-world process, save it, and run it.
57
- 4. Did that run succeed?
97
+ - Confirm `node -v` is 18+ and that Node is on your PATH in the GUI app (not only in a terminal).
98
+ - If you tried an older build, pin `@unstable-dev/unmeshed-mcp@0.1.1` (or later), then reload MCP.
99
+ - Open the MCP log and look for `Missing required environment variables`. Credentials must be in the MCP `env` block, not only in your shell.
100
+
101
+ **401 or 403**
102
+
103
+ - Recreate the API client if you lost the token (it is shown only once).
104
+ - Check that this API client’s user can read and write process definitions on that org.
105
+
106
+ **Wrong org / empty process list**
107
+
108
+ - `UNMESHED_URL` must be the instance you log into in the browser, not `http://localhost:8080` unless you really run the engine locally.
58
109
 
59
- ## Develop
110
+ ## Develop (this repo)
60
111
 
61
112
  ```bash
62
113
  npm test
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import { pathToFileURL } from "node:url";
3
2
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
3
  import { UnmeshedClient } from "./client.js";
5
4
  import { ConfigError, loadConfig } from "./config.js";
@@ -19,17 +18,8 @@ export async function main() {
19
18
  const transport = new StdioServerTransport();
20
19
  await server.connect(transport);
21
20
  }
22
- function isDirectRun() {
23
- const entry = process.argv[1];
24
- if (!entry) {
25
- return false;
26
- }
27
- return import.meta.url === pathToFileURL(entry).href;
28
- }
29
- if (isDirectRun()) {
30
- main().catch((error) => {
31
- const message = error instanceof Error ? error.stack ?? error.message : String(error);
32
- process.stderr.write(`${message}\n`);
33
- process.exit(1);
34
- });
35
- }
21
+ main().catch((error) => {
22
+ const message = error instanceof Error ? error.stack ?? error.message : String(error);
23
+ process.stderr.write(`${message}\n`);
24
+ process.exit(1);
25
+ });
package/dist/server.js CHANGED
@@ -11,7 +11,7 @@ export const SERVER_INSTRUCTIONS = [
11
11
  export function createUnmeshedMcpServer(client, knowledgeDir = defaultKnowledgeDir()) {
12
12
  const server = new McpServer({
13
13
  name: "unmeshed",
14
- version: "0.1.0",
14
+ version: "0.1.2",
15
15
  }, {
16
16
  instructions: SERVER_INSTRUCTIONS,
17
17
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unstable-dev/unmeshed-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "MCP server for Unmeshed — list, author, save, run, and inspect processes from Cursor, Claude Code, and other MCP clients.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -13,6 +13,7 @@
13
13
  ],
14
14
  "scripts": {
15
15
  "build": "tsc",
16
+ "prepublishOnly": "npm test && npm run build",
16
17
  "start": "node dist/index.js",
17
18
  "test": "vitest run",
18
19
  "dev": "tsx src/index.ts"