@nexdoc/mcp-server 0.1.0 → 0.1.1
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 +52 -3
- package/dist/tools.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,13 +33,62 @@ Model Context Protocol server for [NexDoc Design](https://www.nexdoc.design).
|
|
|
33
33
|
## Develop
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
+
cd integrations/mcp-server
|
|
36
37
|
npm install
|
|
37
38
|
npm run build
|
|
38
39
|
NXD_API_KEY=nxd_test_... NXD_API_URL=http://127.0.0.1:8082 node dist/index.js
|
|
39
40
|
```
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
HTTP locally:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
NXD_API_KEY=nxd_test_... NXD_API_URL=http://127.0.0.1:8082 \
|
|
46
|
+
node dist/index.js --http --port 8084
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Release an update (npm + hosted MCP)
|
|
50
|
+
|
|
51
|
+
`npx -y @nexdoc/mcp-server` pulls from npm. The Railway `mcp` service builds from this folder’s Dockerfile — redeploy it after merging so `https://mcp.nexdoc.design` matches the published package.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
cd integrations/mcp-server
|
|
55
|
+
|
|
56
|
+
# 1. Edit src/ (e.g. tools.ts), then bump the version
|
|
57
|
+
# patch 0.1.0 → 0.1.1 tool copy / bugfix
|
|
58
|
+
# minor 0.1.x → 0.2.0 new tool or behavior
|
|
59
|
+
npm version patch --no-git-tag-version # or: npm version minor --no-git-tag-version
|
|
60
|
+
|
|
61
|
+
# 2. Build (also runs automatically via prepublishOnly)
|
|
62
|
+
npm run build
|
|
42
63
|
|
|
43
|
-
|
|
64
|
+
# 3. Smoke-check the built binary
|
|
65
|
+
node dist/index.js --help 2>/dev/null || true
|
|
66
|
+
grep -n "list_runs\|oldest first" dist/tools.js # confirm your change landed
|
|
44
67
|
|
|
45
|
-
|
|
68
|
+
# 4. Publish — run this in your own interactive terminal (not a headless agent).
|
|
69
|
+
# Passkey / WebAuthn accounts cannot use --otp. npm opens a browser (or prints
|
|
70
|
+
# an auth URL); approve with Touch ID / Face ID / security key, then publish finishes.
|
|
71
|
+
npm whoami
|
|
72
|
+
npm publish --access public
|
|
73
|
+
|
|
74
|
+
# 5. Verify
|
|
75
|
+
npm view @nexdoc/mcp-server version
|
|
76
|
+
npx -y @nexdoc/mcp-server@latest --help 2>/dev/null || true
|
|
77
|
+
|
|
78
|
+
# 6. Redeploy the hosted HTTP service so OAuth clients get the same tools
|
|
79
|
+
# (Railway project → mcp service → Deploy, or your usual compose/redeploy path)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Passkey publish notes
|
|
83
|
+
|
|
84
|
+
- **Do the publish step yourself** in Terminal / iTerm. Agents and non-TTY shells get `EOTP` and cannot complete WebAuthn.
|
|
85
|
+
- If the CLI only prints an auth URL (no browser), open that URL, complete the passkey prompt, wait for success, then re-run `npm publish --access public` in the same shell if needed.
|
|
86
|
+
- Prefer npm CLI **≥ 11** (`npm -v`). Older CLIs expect TOTP `--otp` and fail on passkey-only accounts.
|
|
87
|
+
- For CI later: create a **granular access token** (or Trusted Publisher) on [npmjs.com](https://www.npmjs.com) while signed in with your passkey; do not put classic forever-tokens in git.
|
|
88
|
+
|
|
89
|
+
After publish, clients that pin no version (`npx -y @nexdoc/mcp-server`) pick up the new release on the next cold start. Restart Cursor / Claude Desktop if a long-lived stdio process is still on the old build.
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
Install: `npx -y @nexdoc/mcp-server`
|
|
93
|
+
|
|
94
|
+
Docs: [../../docs/agents/mcp.md](../../docs/agents/mcp.md)
|
package/dist/tools.js
CHANGED
|
@@ -137,7 +137,7 @@ export function registerTools(server) {
|
|
|
137
137
|
return fail(err);
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
|
-
server.tool("list_runs", "List runs for a job (
|
|
140
|
+
server.tool("list_runs", "List runs for a job (oldest first; the last entry is the latest run).", { job_id: z.string() }, async (args) => {
|
|
141
141
|
try {
|
|
142
142
|
return ok(await api.listRuns(args.job_id));
|
|
143
143
|
}
|