@eidonze/mcpdoctor 0.1.7 → 0.1.8

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
@@ -20,13 +20,13 @@ Read-only checks for MCP tool schemas and x402 payment endpoints. Use it before
20
20
  Check an MCP server without calling any tools:
21
21
 
22
22
  ```bash
23
- npx @eidonze/mcpdoctor@0.1.6 schema https://your-mcp-server.example/mcp --json
23
+ npx @eidonze/mcpdoctor schema https://your-mcp-server.example/mcp --json
24
24
  ```
25
25
 
26
26
  Check an x402 endpoint without paying:
27
27
 
28
28
  ```bash
29
- npx @eidonze/mcpdoctor@0.1.6 inspect https://your-api.example/paid --method=POST --json
29
+ npx @eidonze/mcpdoctor inspect https://your-api.example/paid --method=POST --json
30
30
  ```
31
31
 
32
32
  Requires Node.js 18+. No API key or wallet is needed.
@@ -88,7 +88,7 @@ jobs:
88
88
  format: markdown
89
89
  ```
90
90
 
91
- Use `mode: inspect` for an x402 preflight. The action fails on `FAIL` or `UNKNOWN` by default; set `fail-on: false` for an informational check.
91
+ Use `mode: inspect` for an x402 preflight. The action fails on `FAIL` or `UNKNOWN` by default; set `fail-on: false` for an informational check. Looking for it in the Marketplace? Search "MCP Trust Check" or "mcp server test", or browse the [mcp-trust-check listing](https://github.com/marketplace/actions/mcp-trust-check).
92
92
 
93
93
  ## Starter template
94
94
 
@@ -65,7 +65,7 @@ async function callTool(name, args) {
65
65
  throw new Error(`unknown tool: ${name}`);
66
66
  }
67
67
 
68
- const serverInfo = { name: 'mcpdoctor', version: '0.1.7' };
68
+ const serverInfo = { name: 'mcpdoctor', version: '0.1.8' };
69
69
  const write = (msg) => process.stdout.write(JSON.stringify(msg) + '\n');
70
70
 
71
71
  const rl = readline.createInterface({ input: process.stdin, terminal: false });
package/bin/mcpdoctor.mjs CHANGED
@@ -3,7 +3,7 @@ import { createHash } from 'node:crypto';
3
3
 
4
4
  const MAX_BODY = 1024 * 1024;
5
5
  const TIMEOUT = 10_000;
6
- const VERSION = '0.1.5';
6
+ const VERSION = '0.1.8';
7
7
 
8
8
  const help = `mcpdoctor ${VERSION}
9
9
 
@@ -133,7 +133,8 @@ function markdown(report) {
133
133
  const lines = [`# mcpdoctor report`, '', `- Status: **${report.finalStatus}**`, `- Endpoint: ${report.endpoint}`, `- HTTP: ${report.http.status}`, `- Response: ${report.http.elapsedMs} ms / ${report.http.bodyBytes} bytes`, `- Body SHA-256: \`${report.http.bodySha256}\``, '', '## Payment requirements', ''];
134
134
  if (!report.x402.accepts.length) lines.push('- None parsed', '');
135
135
  report.x402.accepts.forEach((item, i) => lines.push(`### accepts[${i}]`, '', ...Object.entries(item).map(([key, value]) => `- ${key}: ${value ?? 'missing'}`), ''));
136
- lines.push('## Findings', '', ...(report.findings.length ? report.findings.map((item) => `- **${item.status}** \`${item.code}\`: ${item.message}`) : ['- None']), '', '## Limitations', '', ...report.limitations.map((item) => `- ${item}`), '');
136
+ lines.push('## Findings', '', ...(report.findings.length ? report.findings.map((item) => `- **${item.status}** \`${item.code}\`: ${item.message}`) : ['- None']), '', '## Limitations', '', ...report.limitations.map((item) => `- ${item}`));
137
+ if (report.finalStatus === 'PASS') lines.push('', '## Next steps', '', 'Gate CI on this exact check (paste into .github/workflows/x402.yml):', '', '```yaml', '- uses: xka0085-byte/mcp-doctor@v1', ' with:', ` endpoint: ${report.endpoint}`, ' mode: inspect', '```', '', 'Weekly re-scan and docs: https://xka0085-byte.github.io/mcp-doctor/x402-endpoint-inspector.html');
137
138
  return lines.join('\n');
138
139
  }
139
140
 
@@ -166,7 +167,12 @@ async function schemaCommand(url, format) {
166
167
  }
167
168
  if (!findings.length) add('STATIC_SCHEMA_CHECKS_PASSED', 'INFO', `${tools.length} tools passed deterministic schema checks`);
168
169
  const report = { reportVersion: 1, inspectorVersion: VERSION, mode: 'read-only MCP initialize + tools/list', checkedAt: new Date().toISOString(), endpoint: url.toString(), finalStatus: findings.some(x => x.severity === 'FAIL') ? 'FAIL' : 'PASS', mcp: { protocolVersion: init?.result?.protocolVersion ?? null, serverInfo: init?.result?.serverInfo ?? null, toolCount: Array.isArray(tools) ? tools.length : null }, findings, limitations: ['Static schema checks do not predict model tool selection or prove behavior across all clients.', 'No tool was called; side effects, authorization, data quality and security were not tested.'] };
169
- console.log(format === 'json' ? JSON.stringify(report, null, 2) : `# MCP Tool Schema Report\n\n- Status: **${report.finalStatus}**\n- Endpoint: ${report.endpoint}\n- Protocol: ${report.mcp.protocolVersion ?? 'unknown'}\n- Tools: ${report.mcp.toolCount ?? 'unknown'}\n\n${findings.map(x => `- **${x.severity}** \`${x.code}\`: ${x.message}`).join('\n')}\n\n${report.limitations.map(x => `- ${x}`).join('\n')}`);
170
+ if (format === 'json') { console.log(JSON.stringify(report, null, 2)); }
171
+ else {
172
+ let text = `# MCP Tool Schema Report\n\n- Status: **${report.finalStatus}**\n- Endpoint: ${report.endpoint}\n- Protocol: ${report.mcp.protocolVersion ?? 'unknown'}\n- Tools: ${report.mcp.toolCount ?? 'unknown'}\n\n${findings.map(x => `- **${x.severity}** \`${x.code}\`: ${x.message}`).join('\n')}\n\n${report.limitations.map(x => `- ${x}`).join('\n')}`;
173
+ if (report.finalStatus === 'PASS') text += `\n\nNext steps\n- Gate CI on this exact check (paste into .github/workflows/mcp.yml):\n\n - uses: xka0085-byte/mcp-doctor@v1\n with:\n endpoint: ${report.endpoint}\n mode: schema\n\n- Weekly re-scan and a README status badge: https://xka0085-byte.github.io/mcp-doctor/trust/\n`;
174
+ console.log(text);
175
+ }
170
176
  process.exitCode = report.finalStatus === 'PASS' ? 0 : 1;
171
177
  }
172
178
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eidonze/mcpdoctor",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "mcpName": "io.github.xka0085-byte/mcpdoctor",
5
5
  "description": "Read-only MCP and x402 endpoint preflight checks: 402 challenge shape, payment document parsing, accepts[] conformance, discovery manifests, response digest. Zero dependencies.",
6
6
  "license": "MIT",