@mcpjam/cli 1.1.6 → 2.0.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 +110 -70
- package/dist/index.js +2106 -6007
- package/dist/index.js.map +1 -1
- package/package.json +27 -43
- package/.env.production +0 -2
- package/LICENSE +0 -42
- package/bin/mcpjam.js +0 -15
package/README.md
CHANGED
|
@@ -1,104 +1,144 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @mcpjam/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Test, debug, and validate MCP servers — health checks, OAuth conformance, tool-surface diffing, and structured triage from the terminal or CI.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Install
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
```bash
|
|
8
|
+
npm i -g @mcpjam/cli
|
|
9
|
+
```
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Or run without installing:
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
|
|
14
|
+
npx -y @mcpjam/cli@latest --help
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
## Commands
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
$ mcpjam --help
|
|
21
|
+
|
|
22
|
+
Usage: mcpjam [options] [command]
|
|
23
|
+
|
|
24
|
+
Test, debug, and validate MCP servers — health checks, OAuth conformance,
|
|
25
|
+
tool-surface diffing, and structured triage from the terminal or CI
|
|
26
|
+
|
|
27
|
+
Options:
|
|
28
|
+
-v, --version output the CLI version
|
|
29
|
+
--timeout <ms> Request timeout in milliseconds (default: 30000)
|
|
30
|
+
--rpc Include RPC logs in JSON output
|
|
31
|
+
--format <format> Output format
|
|
32
|
+
-h, --help display help for command
|
|
33
|
+
|
|
34
|
+
Commands:
|
|
35
|
+
server Inspect MCP server connectivity and capabilities
|
|
36
|
+
tools List and invoke MCP server tools
|
|
37
|
+
resources List and read MCP resources
|
|
38
|
+
prompts List and fetch MCP prompts
|
|
39
|
+
apps Fetch MCP App and ChatGPT App widget content
|
|
40
|
+
oauth Run MCP OAuth login, proxy, and conformance flows
|
|
41
|
+
protocol MCP protocol inspection and conformance checks
|
|
42
|
+
```
|
|
18
43
|
|
|
19
|
-
|
|
44
|
+
## Quick start
|
|
20
45
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
46
|
+
```bash
|
|
47
|
+
# Probe: is the server reachable? What transport? Is OAuth configured?
|
|
48
|
+
mcpjam server probe --url https://your-server.com/mcp
|
|
24
49
|
|
|
25
|
-
|
|
50
|
+
# Health check: MCP handshake, tool/resource/prompt sweep, exit code 0 or fail
|
|
51
|
+
mcpjam server doctor --url https://your-server.com/mcp --access-token $TOKEN
|
|
26
52
|
|
|
27
|
-
|
|
53
|
+
# OAuth login
|
|
54
|
+
mcpjam oauth login --url https://your-server.com/mcp --protocol-version 2025-11-25
|
|
28
55
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"servers": {
|
|
32
|
-
"asana": {
|
|
33
|
-
"url": "https://mcp.asana.com/sse",
|
|
34
|
-
"requestInit": {
|
|
35
|
-
"headers": {
|
|
36
|
-
"Authorization": "Bearer <ASANA_API_KEY>"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
"sequential-thinking": {
|
|
41
|
-
"command": "npx",
|
|
42
|
-
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking"],
|
|
43
|
-
"env": {
|
|
44
|
-
"ENV_1": "<ENV_1>"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
56
|
+
# List tools with full schemas
|
|
57
|
+
mcpjam tools list --url https://your-server.com/mcp --access-token $TOKEN --format json
|
|
49
58
|
```
|
|
50
59
|
|
|
51
|
-
|
|
60
|
+
## Why
|
|
52
61
|
|
|
53
|
-
|
|
62
|
+
MCP servers ship without the testing infrastructure REST APIs take for granted. No health checks, no OAuth conformance tests, no deploy-time regression detection. `mcpjam` fills that gap.
|
|
54
63
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
64
|
+
## What it does
|
|
65
|
+
|
|
66
|
+
### CI gate on every deploy
|
|
67
|
+
|
|
68
|
+
Run `server doctor` in your pipeline. It probes connectivity, runs the MCP handshake, and sweeps every tool, resource, and prompt. Exit code 0 or the build fails.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
mcpjam server doctor --url $MCP_SERVER_URL --access-token $TOKEN --format json
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Catch breaking changes before they ship
|
|
75
|
+
|
|
76
|
+
`server export` snapshots your entire tool surface — names, schemas, descriptions, capabilities — as diffable JSON. A renamed parameter or changed description shows up in the diff.
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
mcpjam server export --url $URL --access-token $TOKEN > before.json
|
|
80
|
+
# deploy...
|
|
81
|
+
mcpjam server export --url $URL --access-token $TOKEN > after.json
|
|
82
|
+
diff <(jq -S . before.json) <(jq -S . after.json)
|
|
74
83
|
```
|
|
75
84
|
|
|
76
|
-
###
|
|
85
|
+
### OAuth conformance across the full matrix
|
|
86
|
+
|
|
87
|
+
Cover the full registration × protocol version × auth mode matrix from a single config file. Outputs JUnit XML.
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
mcpjam oauth conformance-suite --config ./oauth-matrix.json --format junit-xml > report.xml
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Verify tokens work end-to-end
|
|
94
|
+
|
|
95
|
+
OAuth can succeed while `tools/list` returns 401 because the audience, scope, or session init is wrong. `--verify-call-tool` completes the full chain — OAuth, MCP connect, tool call — and reports which step fails.
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
mcpjam oauth conformance --url $URL --protocol-version 2025-11-25 \
|
|
99
|
+
--registration dcr --verify-call-tool your_critical_tool
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Protocol version compatibility
|
|
103
|
+
|
|
104
|
+
MCP has shipped three protocol versions (2025-03-26, 2025-06-18, 2025-11-25). Clients upgrade on their own schedule. Declare the version matrix once and test on every push.
|
|
77
105
|
|
|
78
106
|
```json
|
|
79
107
|
{
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
108
|
+
"flows": [
|
|
109
|
+
{ "label": "2025-03-26/dcr", "protocolVersion": "2025-03-26", "registrationStrategy": "dcr" },
|
|
110
|
+
{ "label": "2025-06-18/dcr", "protocolVersion": "2025-06-18", "registrationStrategy": "dcr" },
|
|
111
|
+
{ "label": "2025-11-25/cimd", "protocolVersion": "2025-11-25", "registrationStrategy": "cimd" }
|
|
112
|
+
]
|
|
83
113
|
}
|
|
84
114
|
```
|
|
85
115
|
|
|
86
|
-
###
|
|
116
|
+
### Structured debug artifacts
|
|
117
|
+
|
|
118
|
+
`--debug-out` captures a JSON artifact with every request and response in the OAuth and MCP flow. Attach it to a ticket — no reproduction steps required.
|
|
87
119
|
|
|
88
120
|
```bash
|
|
89
|
-
mcpjam
|
|
121
|
+
mcpjam oauth login --url $URL --protocol-version 2025-11-25 \
|
|
122
|
+
--registration dcr --debug-out oauth-debug.json
|
|
90
123
|
```
|
|
91
124
|
|
|
92
|
-
|
|
125
|
+
### Incident triage
|
|
126
|
+
|
|
127
|
+
Separate your failures from host-side failures. `--rpc` records what your server returned — transport type, status codes, raw JSON-RPC pairs — as a structured artifact for postmortems.
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
mcpjam server doctor --url $URL --access-token $TOKEN --rpc --out incident-triage.json
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Tool surface audit
|
|
134
|
+
|
|
135
|
+
Pipe the full schema inventory into your own linter, review it in a PR, or check whether descriptions are clear enough for tool selection.
|
|
93
136
|
|
|
94
137
|
```bash
|
|
95
|
-
mcpjam
|
|
138
|
+
mcpjam tools list --url $URL --access-token $TOKEN --format json \
|
|
139
|
+
| jq '.tools[] | {name, description, inputSchema}'
|
|
96
140
|
```
|
|
97
141
|
|
|
98
|
-
|
|
142
|
+
## Documentation
|
|
99
143
|
|
|
100
|
-
|
|
101
|
-
- `--environment, -e <file>`: Path to the environment configuration file (required)
|
|
102
|
-
- `--llms, -l <file>`: Path to the LLM API key configuration file
|
|
103
|
-
- `--help, -h`: Show help information
|
|
104
|
-
- `--version, -V`: Display version number
|
|
144
|
+
Full docs at [docs.mcpjam.com/cli](https://docs.mcpjam.com/cli).
|