@wireweave/mcp-server 1.8.2-beta.8 → 1.8.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.
Files changed (3) hide show
  1. package/README.md +33 -21
  2. package/dist/index.js +359 -900
  3. package/package.json +21 -23
package/README.md CHANGED
@@ -4,12 +4,12 @@ A Model Context Protocol (MCP) server that exposes the Wireweave wireframe DSL t
4
4
 
5
5
  ## What it does
6
6
 
7
- This server is a thin wrapper over [`@wireweave/sdk`](https://github.com/wireweave/sdk). Every tool call from the MCP client is forwarded to the SDK's single `dispatch()` entry point, which routes it to one of two places:
7
+ This server is a thin wrapper over [`@wireweave/sdk`](https://github.com/wireweave/wireweave/tree/main/packages/sdk). Every tool call from the MCP client is forwarded to the SDK's single `dispatch()` entry point, which validates the public input schema and routes it to one of two places:
8
8
 
9
9
  - **Local tools** run in-process via `@wireweave/core` and `@wireweave/ux-rules`. No network, no credits — they work even without an API key.
10
10
  - **Server tools** are proxied to the Wireweave API server (`api-server`) over HTTP. These require an API key (cloud project/wireframe storage, account & billing, hosted reference content such as the grammar and LLM guide).
11
11
 
12
- It serves **32 tools** (9 local + 23 server) plus the prompts and resources defined by the api-server contract. The server does not classify, cache, or post-process results — the SDK and api-server own that logic.
12
+ It serves **32 tools** (9 local + 23 server) plus prompts and resources. Tool definitions, routing and all four behavioral annotations come from the SDK's public `src/tool-catalog.json`. The offline generator and regression tests keep both adapters consistent; private service access is not required to build the catalog.
13
13
 
14
14
  Local tools:
15
15
 
@@ -18,38 +18,36 @@ Local tools:
18
18
  ## Install
19
19
 
20
20
  ```bash
21
- npm install -g @wireweave/mcp-server
21
+ npm install -g '@wireweave/mcp-server@<pinned-version>'
22
22
  ```
23
23
 
24
24
  Or run directly:
25
25
 
26
26
  ```bash
27
- npx @wireweave/mcp-server
27
+ npx '@wireweave/mcp-server@<pinned-version>'
28
28
  ```
29
29
 
30
- Requires Node.js 20+. Get an API key from the [Wireweave dashboard](https://wireweave.org).
30
+ Requires Node.js >=22.13.0. Replace `<pinned-version>` with the stable release selected for your toolchain. Only remote tools require an API key from the [Wireweave dashboard](https://wireweave.org).
31
31
 
32
32
  ## Usage
33
33
 
34
34
  ### MCP client configuration
35
35
 
36
- Add the server to your MCP client config. For Claude Desktop (`~/Library/Application Support/Claude/claude_desktop_config.json`):
36
+ Register the installed executable in your MCP client's supported stdio configuration, for example:
37
37
 
38
38
  ```json
39
39
  {
40
40
  "mcpServers": {
41
41
  "wireweave": {
42
- "command": "npx",
43
- "args": ["@wireweave/mcp-server"],
44
- "env": {
45
- "WIREWEAVE_API_KEY": "your-api-key"
46
- }
42
+ "command": "wireweave-mcp",
43
+ "args": [],
44
+ "env": {}
47
45
  }
48
46
  }
49
47
  }
50
48
  ```
51
49
 
52
- The same `command` / `args` / `env` shape works for any stdio MCP client (Cursor, etc.).
50
+ Use the installed executable's absolute path if your client does not inherit its PATH. Client configuration locations and envelopes depend on the installed client; consult that client's setup instructions.
53
51
 
54
52
  ### Transport
55
53
 
@@ -57,19 +55,33 @@ The server runs over **stdio** by default. A streamable-HTTP transport is availa
57
55
 
58
56
  ```bash
59
57
  wireweave-mcp # stdio (default)
60
- wireweave-mcp --http # streamable HTTP on 127.0.0.1:3305
58
+ wireweave-mcp --http # requires WIREWEAVE_MCP_TOKEN; loopback port 3305
61
59
  ```
62
60
 
63
61
  ## Environment
64
62
 
65
- | Variable | Default | Purpose |
66
- | ---------------------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
67
- | `WIREWEAVE_API_KEY` | — | API key from the dashboard. Required for server tools; local tools work without it. The server logs a warning at startup if unset. |
68
- | `WIREWEAVE_API_URL` | `https://api.wireweave.org` | Override the API base. |
69
- | `WIREWEAVE_TRANSPORT` | `stdio` | Set to `http` for streamable HTTP (same as `--http`). |
70
- | `WIREWEAVE_MCP_PORT` | `3305` | HTTP transport port. |
71
- | `WIREWEAVE_MCP_HOST` | `127.0.0.1` | HTTP transport host. |
72
- | `WIREWEAVE_MCP_MAX_SESSIONS` | `10` | Max concurrent HTTP sessions. |
63
+ | Variable | Default | Purpose |
64
+ | ------------------------------- | --------------------------- | ----------------------------------------------------------------------------------------- |
65
+ | `WIREWEAVE_API_KEY` | — | Required only for remote tools. Local tools work without it. |
66
+ | `WIREWEAVE_API_URL` | `https://api.wireweave.org` | Override the API base. |
67
+ | `WIREWEAVE_TRANSPORT` | `stdio` | Set to `http` for streamable HTTP (same as `--http`). |
68
+ | `WIREWEAVE_MCP_PORT` | `3305` | HTTP port; integer 1–65535. |
69
+ | `WIREWEAVE_MCP_HOST` | `127.0.0.1` | Loopback host. Non-loopback binding fails startup without a supported deployment profile. |
70
+ | `WIREWEAVE_MCP_MAX_SESSIONS` | `10` | Active plus initializing session limit; integer 1–1024. |
71
+ | `WIREWEAVE_MCP_TOKEN` | — | Required host-provided bearer credential for HTTP; separate from the account API key. |
72
+ | `WIREWEAVE_MCP_ALLOWED_ORIGINS` | Empty | Exact comma-separated HTTP(S) origins. Empty rejects every request carrying Origin. |
73
+
74
+ ### HTTP and credentials
75
+
76
+ Send `Authorization: Bearer <WIREWEAVE_MCP_TOKEN>` on every MCP operation. Use a randomly generated token from the host secret store. Host and Origin are validated before dispatch. An allowed browser's OPTIONS preflight needs no bearer token but cannot create a session or execute a tool; its actual request still requires authentication. Wildcard CORS is not supported.
77
+
78
+ Unknown or expired sessions return 404. Exhausted capacity returns 503 with `Retry-After: 1`. Idle sessions expire after 30 minutes. Termination cancels their pending work and frees capacity. Invalid configuration fails startup; malformed requests cannot terminate the process. Stdout is reserved for MCP messages and diagnostics use stderr.
79
+
80
+ Remote tools send `WIREWEAVE_API_KEY` only to `WIREWEAVE_API_URL` using `x-api-key`. Saving or updating cloud wireframes transmits the supplied source and metadata. Requests time out after 30 seconds, carry cancellation and reject redirects. A local failure never triggers remote execution.
81
+
82
+ ### Privacy and security
83
+
84
+ The [Privacy Policy](https://www.wireweave.org/privacy) describes hosted-service data handling, retention and deletion requests. Local deterministic calls do not upload source or credentials. Tool annotations describe read-only, destructive, idempotent and external-interaction behavior; they are hints, not authorization.
73
85
 
74
86
  ## Tools
75
87