zuiku-mcp 0.3.0
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 +41 -0
- package/bin/zuiku-mcp.mjs +11 -0
- package/dist/zuiku-mcp-server.mjs +6854 -0
- package/package.json +42 -0
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# zuiku-mcp
|
|
2
|
+
|
|
3
|
+
`zuiku-mcp` is the primary MCP server package for Zuiku.
|
|
4
|
+
|
|
5
|
+
`npx -y zuiku-mcp` is the shared entrypoint that CLI clients, IDE MCP settings, and optional IDE extensions call behind the scenes. It is usually configured once and then launched automatically by the client.
|
|
6
|
+
|
|
7
|
+
## What it exposes
|
|
8
|
+
|
|
9
|
+
- `zuiku.open`: open Markdown or Mermaid content as a localhost editor session
|
|
10
|
+
- `zuiku.read`: read current Markdown and hash before updating
|
|
11
|
+
- `zuiku.apply`: write Markdown back with hash-based conflict protection
|
|
12
|
+
- `zuiku.export`: export Markdown, PNG, or SVG
|
|
13
|
+
- `zuiku.ddl_to_er`: turn a DDL string into ER diagram payloads
|
|
14
|
+
|
|
15
|
+
## Entry command
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx -y zuiku-mcp
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Typical usage
|
|
22
|
+
|
|
23
|
+
- Codex CLI / Claude Code / Gemini CLI: register it as an MCP server command
|
|
24
|
+
- VS Code / Cursor: point MCP settings at `npx -y zuiku-mcp`
|
|
25
|
+
- IDE extensions: optional helper path that still launches the same MCP server
|
|
26
|
+
|
|
27
|
+
## Common environment variables
|
|
28
|
+
|
|
29
|
+
- `ZUIKU_MCP_ALLOWED_ROOTS`: allowed file roots (`:` separated)
|
|
30
|
+
- `ZUIKU_MCP_ENABLE_EDITOR_HOST`: `1` to enable the localhost editor host (default: `1`)
|
|
31
|
+
- `ZUIKU_MCP_OPEN_BROWSER`: `1` to open the browser on `zuiku.open`
|
|
32
|
+
- `ZUIKU_MCP_EDITOR_HOST` / `ZUIKU_MCP_EDITOR_PORT`: host bind settings
|
|
33
|
+
- `ZUIKU_EDITOR_URL`: editor URL (default: `http://localhost:5173/editor`)
|
|
34
|
+
|
|
35
|
+
## Notes
|
|
36
|
+
|
|
37
|
+
- Requires Node.js 20+
|
|
38
|
+
- For chat clients, `ZUIKU_MCP_OPEN_BROWSER=0` is usually the better default
|
|
39
|
+
- During preview, CLI and manual MCP setup are the source of truth; optional IDE extension listings can be added on top later
|
|
40
|
+
- Install guide: `https://zuiku.dev/install`
|
|
41
|
+
- Docs: `https://zuiku.dev/docs`
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const entryPath = new URL("../dist/zuiku-mcp-server.mjs", import.meta.url);
|
|
3
|
+
|
|
4
|
+
try {
|
|
5
|
+
await import(entryPath.href);
|
|
6
|
+
} catch (error) {
|
|
7
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
8
|
+
process.stderr.write(`[zuiku-mcp] failed to start: ${message}\n`);
|
|
9
|
+
process.stderr.write("[zuiku-mcp] package may be missing dist/ files. Reinstall package and retry.\n");
|
|
10
|
+
process.exit(1);
|
|
11
|
+
}
|