@mcpjam/cli 2.0.1 → 2.1.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @mcpjam/cli
2
2
 
3
- Test, debug, and validate MCP servers — health checks, OAuth conformance, tool-surface diffing, and structured triage from the terminal or CI.
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
 
@@ -21,8 +21,7 @@ $ mcpjam --help
21
21
 
22
22
  Usage: mcpjam [options] [command]
23
23
 
24
- Test, debug, and validate MCP servers — health checks, OAuth conformance,
25
- tool-surface diffing, and structured triage from the terminal or CI
24
+ Test, debug, and validate MCP servers. Health checks, OAuth conformance, tool-surface diffing, and structured triage from the terminal or CI.
26
25
 
27
26
  Options:
28
27
  -v, --version output the CLI version
@@ -36,7 +35,7 @@ Commands:
36
35
  tools List and invoke MCP server tools
37
36
  resources List and read MCP resources
38
37
  prompts List and fetch MCP prompts
39
- apps Fetch MCP App and ChatGPT App widget content
38
+ apps MCP Apps utilities, widget extraction, and conformance checks
40
39
  oauth Run MCP OAuth login, proxy, and conformance flows
41
40
  protocol MCP protocol inspection and conformance checks
42
41
  ```
@@ -53,13 +52,16 @@ mcpjam server doctor --url https://your-server.com/mcp --access-token $TOKEN
53
52
  # OAuth login
54
53
  mcpjam oauth login --url https://your-server.com/mcp --protocol-version 2025-11-25
55
54
 
55
+ # MCP Apps conformance
56
+ mcpjam apps conformance --url https://your-server.com/mcp --access-token $TOKEN
57
+
56
58
  # List tools with full schemas
57
59
  mcpjam tools list --url https://your-server.com/mcp --access-token $TOKEN --format json
58
60
  ```
59
61
 
60
62
  ## Why
61
63
 
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.
64
+ MCP servers don't have built-in health checks, OAuth conformance tests, or deploy-time regression detection. `mcpjam` adds those.
63
65
 
64
66
  ## What it does
65
67
 
@@ -73,7 +75,7 @@ mcpjam server doctor --url $MCP_SERVER_URL --access-token $TOKEN --format json
73
75
 
74
76
  ### Catch breaking changes before they ship
75
77
 
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.
78
+ `server export` snapshots your entire tool surface as diffable JSON. A renamed parameter or changed description shows up in the diff.
77
79
 
78
80
  ```bash
79
81
  mcpjam server export --url $URL --access-token $TOKEN > before.json
@@ -92,7 +94,7 @@ mcpjam oauth conformance-suite --config ./oauth-matrix.json --format junit-xml >
92
94
 
93
95
  ### Verify tokens work end-to-end
94
96
 
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.
97
+ 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
98
 
97
99
  ```bash
98
100
  mcpjam oauth conformance --url $URL --protocol-version 2025-11-25 \
@@ -115,7 +117,7 @@ MCP has shipped three protocol versions (2025-03-26, 2025-06-18, 2025-11-25). Cl
115
117
 
116
118
  ### Structured debug artifacts
117
119
 
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.
120
+ `--debug-out` captures a JSON artifact with every request and response in the OAuth and MCP flow. Attach it to a ticket instead of writing reproduction steps.
119
121
 
120
122
  ```bash
121
123
  mcpjam oauth login --url $URL --protocol-version 2025-11-25 \
@@ -124,7 +126,7 @@ mcpjam oauth login --url $URL --protocol-version 2025-11-25 \
124
126
 
125
127
  ### Incident triage
126
128
 
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.
129
+ 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
130
 
129
131
  ```bash
130
132
  mcpjam server doctor --url $URL --access-token $TOKEN --rpc --out incident-triage.json
@@ -139,6 +141,54 @@ mcpjam tools list --url $URL --access-token $TOKEN --format json \
139
141
  | jq '.tools[] | {name, description, inputSchema}'
140
142
  ```
141
143
 
144
+ ## GitHub Actions
145
+
146
+ ```yaml
147
+ name: MCP Health Check
148
+
149
+ on:
150
+ push:
151
+ branches: [main]
152
+ pull_request:
153
+
154
+ jobs:
155
+ mcp-doctor:
156
+ runs-on: ubuntu-latest
157
+ steps:
158
+ - uses: actions/setup-node@v4
159
+ with:
160
+ node-version: 20
161
+
162
+ - name: OAuth login (headless)
163
+ run: |
164
+ set -euo pipefail
165
+ npx -y @mcpjam/cli@latest oauth login \
166
+ --url ${{ secrets.MCP_SERVER_URL }} \
167
+ --protocol-version 2025-11-25 \
168
+ --registration dcr \
169
+ --auth-mode headless \
170
+ --format json > /tmp/oauth-result.json
171
+ TOKEN=$(jq -r '.credentials.accessToken // empty' /tmp/oauth-result.json)
172
+ rm -f /tmp/oauth-result.json
173
+ if [ -z "$TOKEN" ]; then
174
+ echo "::error::OAuth login did not return an access token"
175
+ exit 1
176
+ fi
177
+ echo "::add-mask::$TOKEN"
178
+ echo "MCP_TOKEN=$TOKEN" >> "$GITHUB_ENV"
179
+
180
+ - name: Run doctor
181
+ run: npx -y @mcpjam/cli@latest server doctor --url ${{ secrets.MCP_SERVER_URL }} --access-token $MCP_TOKEN --format json
182
+ ```
183
+
184
+ If you already have a refresh token, you can skip the login step and pass it directly:
185
+
186
+ ```bash
187
+ mcpjam server doctor --url $URL --refresh-token $REFRESH_TOKEN --client-id $CLIENT_ID --client-secret $CLIENT_SECRET --format json
188
+ ```
189
+
190
+ See the full [CI documentation](https://docs.mcpjam.com/cli/ci) for all authentication options.
191
+
142
192
  ## Documentation
143
193
 
144
194
  Full docs at [docs.mcpjam.com/cli](https://docs.mcpjam.com/cli).