@wireweave/mcp-server 1.8.2-beta.11 → 1.8.2-beta.13

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 +20 -69
  2. package/dist/index.js +359 -900
  3. package/package.json +16 -18
package/README.md CHANGED
@@ -1,90 +1,41 @@
1
1
  # @wireweave/mcp-server
2
2
 
3
- A Model Context Protocol (MCP) server that exposes the Wireweave wireframe DSL to MCP clients like Claude Desktop and Cursor.
3
+ An MCP transport adapter for Wireweave tools.
4
4
 
5
- ## What it does
5
+ The [public tool contract](https://github.com/wireweave/wireweave/blob/develop/docs/spec/TOOLING.md#5-mcp-and-agent-plugins) defines this package's APIs, behavior, configuration and compatibility. The [language contract](https://github.com/wireweave/wireweave/blob/develop/docs/spec/LANGUAGE.md) defines the DSL. Package metadata owns versions, exports, dependencies and scripts.
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
+ ## Installation
8
8
 
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
- - **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
-
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.
13
-
14
- Local tools:
15
-
16
- `wireweave_parse` · `wireweave_validate` · `wireweave_render_html_code` · `wireweave_validate_ux` · `wireweave_diff` · `wireweave_analyze` · `wireweave_list_components` · `wireweave_export_json` · `wireweave_export_figma`
17
-
18
- ## Install
9
+ Use Node.js >=22.13.0. Replace `<pinned-version>` with the release selected for your toolchain.
19
10
 
20
11
  ```bash
21
- npm install -g @wireweave/mcp-server
12
+ npm install --global '@wireweave/mcp-server@<pinned-version>'
22
13
  ```
23
14
 
24
- Or run directly:
15
+ The installed executable is `wireweave-mcp`. Setup, transports and credentials are defined by the tool contract.
25
16
 
26
- ```bash
27
- npx @wireweave/mcp-server
28
- ```
17
+ Run `wireweave-mcp` for stdio. Local parsing, validation, rendering, analysis, diffing, component discovery and JSON/Figma export need no account or API key. stdout contains only MCP protocol messages; diagnostics use stderr.
29
18
 
30
- Requires Node.js 20+. Get an API key from the [Wireweave dashboard](https://wireweave.org).
19
+ ## HTTP and credentials
31
20
 
32
- ## Usage
21
+ HTTP mode (`wireweave-mcp --http`) requires a host-provided `WIREWEAVE_MCP_TOKEN`. Clients send it as `Authorization: Bearer <token>` on every MCP operation. Use a randomly generated secret and keep it in the host's secret store. The server binds to loopback by default. `WIREWEAVE_MCP_ALLOWED_ORIGINS` is an exact, comma-separated Origin allowlist; an empty list rejects requests carrying an Origin header. An allowed browser's CORS preflight needs no bearer token and cannot create a session or execute a tool; its actual request still requires authentication. See the public tool contract for configuration bounds and session behavior.
33
22
 
34
- ### MCP client configuration
23
+ The HTTP transport token is separate from `WIREWEAVE_API_KEY`. The latter authenticates explicitly invoked remote tools at `WIREWEAVE_API_URL` (default `https://api.wireweave.org`), using the `x-api-key` header. Remote tools include cloud storage/sharing, account/billing, gallery and hosted language guides/examples. Saving or updating a cloud wireframe sends its source and supplied metadata to that service. Local failures never fall back to remote execution. Remote calls time out after 30 seconds and do not follow redirects.
35
24
 
36
- Add the server to your MCP client config. For Claude Desktop (`~/Library/Application Support/Claude/claude_desktop_config.json`):
37
-
38
- ```json
39
- {
40
- "mcpServers": {
41
- "wireweave": {
42
- "command": "npx",
43
- "args": ["@wireweave/mcp-server"],
44
- "env": {
45
- "WIREWEAVE_API_KEY": "your-api-key"
46
- }
47
- }
48
- }
49
- }
50
- ```
25
+ ## Privacy and security
51
26
 
52
- The same `command` / `args` / `env` shape works for any stdio MCP client (Cursor, etc.).
27
+ Read the [Privacy Policy](https://www.wireweave.org/privacy) for hosted-service data handling, retention and deletion requests. Local deterministic calls do not upload source or credentials. Every tool declares its read-only, destructive, idempotent and external-interaction hints; these describe behavior and do not replace authentication or authorization.
53
28
 
54
- ### Transport
29
+ ## Development
55
30
 
56
- The server runs over **stdio** by default. A streamable-HTTP transport is available with `--http` (or `WIREWEAVE_TRANSPORT=http`), serving the MCP endpoint at `/mcp` and a health check at `/health`.
31
+ Run from the monorepo root after the [workspace setup](https://github.com/wireweave/wireweave#workspace-commands).
57
32
 
58
33
  ```bash
59
- wireweave-mcp # stdio (default)
60
- wireweave-mcp --http # streamable HTTP on 127.0.0.1:3305
34
+ pnpm --filter @wireweave/mcp-server run build
35
+ pnpm --filter @wireweave/mcp-server run typecheck
36
+ pnpm --filter @wireweave/mcp-server run lint
37
+ pnpm --filter @wireweave/mcp-server run test
38
+ pnpm --filter @wireweave/mcp-server run format:check
61
39
  ```
62
40
 
63
- ## Environment
64
-
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. |
73
-
74
- ## Tools
75
-
76
- Once connected, ask your MCP client to work with wireframes, for example:
77
-
78
- > "Parse and validate this Wireweave DSL." (local)
79
- >
80
- > "Check this wireframe against UX best practices." (local)
81
- >
82
- > "Save this wireframe as 'Dashboard v2' in my project." (server — needs an API key)
83
-
84
- Server tools cover cloud project/wireframe CRUD and versioning, share links, the public gallery, account balance & subscription, pricing, and hosted reference content (grammar, guide, patterns, examples, UX rules). Calls that need a key fail with a clear message if one is not configured.
85
-
86
- Part of the [Wireweave monorepo](https://github.com/wireweave/wireweave).
87
-
88
- ## License
89
-
90
- MIT
41
+ License: MIT.