axiom-mcp 27.4.1 → 27.5.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
@@ -4,12 +4,13 @@ Model Context Protocol (MCP) server for Axiom's Apple-platform development skill
4
4
 
5
5
  ## Features
6
6
 
7
- - **Skills** — Apple-platform (iOS, iPadOS, macOS, watchOS, tvOS) development expertise as MCP Resources (on-demand loading)
8
- - **Commands** — Structured prompts as MCP Prompts
9
- - **Agents** — Autonomous auditors, retrievable as MCP Tools
10
- - **Profiling tools** — the bundled `xcprof` CLI exposed as MCP Tools (Apple Silicon Mac + Xcode)
11
- - **Dual Distribution** — Works standalone or bundled with Claude Code plugin
12
- - **Hybrid Runtime** — Development mode (live files) or production mode (bundled)
7
+ - **Skills** — Axiom's full Apple-platform skill catalog as MCP Resources, loaded on demand, plus tools to browse, search, and read it
8
+ - **Agents** — fetch any agent's instructions with `axiom_get_agent`, then follow them
9
+ - **Commands** — structured workflows as MCP Prompts
10
+ - **Command-line tools** — `xclog`, `xcsym`, and `xcprof` as MCP Tools, for console capture, crash symbolication, and profiling (Apple Silicon Mac with Xcode)
11
+ - **`xcproject`** — a command the package installs alongside the server, for reading `project.pbxproj` and JSON5 `project.xcproj` files; it has no MCP tool
12
+ - **Apple's bundled documentation** — the guides and diagnostics inside Xcode, searchable alongside the skills when Xcode is installed
13
+ - **Two modes** — production (the bundled snapshot, the default) or development (reads a plugin checkout)
13
14
 
14
15
  ## Installation
15
16
 
@@ -30,25 +31,23 @@ No clone or build step needed. Add to your tool's MCP configuration:
30
31
 
31
32
  This downloads and runs the server in production mode with all skills bundled.
32
33
 
33
- ### For Claude Code Users (Bundled)
34
+ ### Claude Code and the Claude app
34
35
 
35
- The MCP server starts automatically when you install the Axiom plugin:
36
+ The Axiom plugin gives Claude Code and the Claude app its skills, agents, commands, and hooks natively; the plugin does not start this server. See the [install guides](https://charleswiltgen.github.io/Axiom/start/). To add the MCP server to Claude Code as well:
36
37
 
37
38
  ```bash
38
- claude-code plugin add axiom@axiom-marketplace
39
+ claude mcp add axiom -- npx -y axiom-mcp
39
40
  ```
40
41
 
41
- No additional configuration needed — the plugin's `.mcp.json` launches the server in development mode.
42
-
43
42
  ## Usage
44
43
 
45
44
  ### VS Code + GitHub Copilot
46
45
 
47
- Add to your VS Code `settings.json`:
46
+ Add to `.mcp.json` at the root of your project, or to `~/.copilot/mcp-config.json` for every project:
48
47
 
49
48
  ```json
50
49
  {
51
- "github.copilot.chat.mcp.servers": {
50
+ "mcpServers": {
52
51
  "axiom": {
53
52
  "command": "npx",
54
53
  "args": ["-y", "axiom-mcp"]
@@ -57,7 +56,9 @@ Add to your VS Code `settings.json`:
57
56
  }
58
57
  ```
59
58
 
60
- ### Claude Desktop
59
+ VS Code still reads the older `.vscode/mcp.json` (with a top-level `servers` object), but marks it deprecated.
60
+
61
+ ### Claude desktop app
61
62
 
62
63
  Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
63
64
 
@@ -89,13 +90,17 @@ Add to `.cursor/mcp.json` in your workspace:
89
90
 
90
91
  ### Gemini CLI
91
92
 
92
- Configure MCP server in `~/.gemini/config.toml`:
93
+ Add to `~/.gemini/settings.json` (or `.gemini/settings.json` in a project):
93
94
 
94
- ```toml
95
- [[mcp_servers]]
96
- name = "axiom"
97
- command = "npx"
98
- args = ["-y", "axiom-mcp"]
95
+ ```json
96
+ {
97
+ "mcpServers": {
98
+ "axiom": {
99
+ "command": "npx",
100
+ "args": ["-y", "axiom-mcp"]
101
+ }
102
+ }
103
+ }
99
104
  ```
100
105
 
101
106
  ## Configuration
@@ -105,10 +110,12 @@ args = ["-y", "axiom-mcp"]
105
110
  | Variable | Values | Default | Description |
106
111
  |----------|--------|---------|-------------|
107
112
  | `AXIOM_MCP_MODE` | `development`, `production` | `production` | Runtime mode |
108
- | `AXIOM_DEV_PATH` | File path | — | Plugin directory for dev mode |
113
+ | `AXIOM_DEV_PATH` | File path | — | Plugin directory for development mode |
109
114
  | `AXIOM_LOG_LEVEL` | `debug`, `info`, `warn`, `error` | `info` | Logging verbosity |
110
- | `AXIOM_XCPROF_PATH` | File path | bundled binary | Override the `xcprof` binary the profiling tools invoke |
111
- | `AXIOM_XCPROF_TIMEOUT` | Seconds | `300` | Per-invocation ceiling for `xcprof` calls (raise for long recordings) |
115
+ | `AXIOM_APPLE_DOCS` | `false` | Enabled | Set to `false` to leave Xcode's bundled Apple documentation out of the catalog |
116
+ | `AXIOM_XCODE_PATH` | Path to an Xcode app | The one `xcode-select` points to | The Xcode whose bundled documentation and version the server reads |
117
+ | `AXIOM_XCLOG_PATH`, `AXIOM_XCSYM_PATH`, `AXIOM_XCPROF_PATH` | File path | Bundled binary | Use a different `xclog`, `xcsym`, or `xcprof` binary |
118
+ | `AXIOM_XCLOG_TIMEOUT`, `AXIOM_XCSYM_TIMEOUT`, `AXIOM_XCPROF_TIMEOUT` | Seconds | `120`, `120`, `300` | Time limit for each call to that tool; raise it for long recordings |
112
119
 
113
120
  ### Modes
114
121
 
@@ -118,10 +125,9 @@ args = ["-y", "axiom-mcp"]
118
125
  AXIOM_MCP_MODE=development AXIOM_DEV_PATH=/path/to/plugin node dist/index.js
119
126
  ```
120
127
 
121
- - Reads skills directly from Claude Code plugin directory
122
- - Changes to skills reflected immediately (no rebuild needed)
123
- - Ideal for skill development and testing
124
- - Used by Claude Code plugin's `.mcp.json`
128
+ - Reads skills directly from a checkout of the plugin directory
129
+ - Changes to skills are reflected immediately (no rebuild needed)
130
+ - For developing and testing Axiom's skills
125
131
 
126
132
  #### Production Mode (Bundled Skills)
127
133
 
@@ -130,9 +136,8 @@ AXIOM_MCP_MODE=development AXIOM_DEV_PATH=/path/to/plugin node dist/index.js
130
136
  npx axiom-mcp
131
137
  ```
132
138
 
133
- - Reads pre-bundled snapshot from `dist/bundle.json`
134
- - Bundle contains the full Axiom skill, command, and agent set
135
- - No file system access after initialization
139
+ - Reads Axiom's skills, commands, and agents from the snapshot in `dist/bundle.json`, never from a plugin checkout
140
+ - Reads Xcode's bundled Apple documentation at startup, when Xcode is installed and `AXIOM_APPLE_DOCS` isn't `false`
136
141
  - Self-contained, distributed via npm
137
142
 
138
143
  ## MCP Resources
@@ -143,11 +148,12 @@ Skills are exposed as MCP Resources with URI scheme:
143
148
  axiom://skill/{skill-name}
144
149
  ```
145
150
 
146
- Examples:
147
- - `axiom://skill/xcode-debugging`
148
- - `axiom://skill/swiftui-nav`
149
- - `axiom://skill/memory-debugging`
150
- - `axiom://skill/liquid-glass-ref`
151
+ A router's id is its name; a specialized skill's id is its router's name, two hyphens, then its own name. Apple's guides and diagnostics bundled inside Xcode use `apple-guide-` and `apple-diag-` prefixes. Examples:
152
+ - `axiom://skill/axiom-swiftui` (a router)
153
+ - `axiom://skill/axiom-build--xcode-debugging`
154
+ - `axiom://skill/axiom-swiftui--nav`
155
+ - `axiom://skill/axiom-design--liquid-glass-ref`
156
+ - `axiom://skill/apple-diag-actor-isolated-call`
151
157
 
152
158
  ### Resource Discovery
153
159
 
@@ -156,9 +162,9 @@ Examples:
156
162
  {
157
163
  "resources": [
158
164
  {
159
- "uri": "axiom://skill/xcode-debugging",
160
- "name": "Xcode Debugging",
161
- "description": "Environment-first diagnostics for BUILD FAILED, test crashes, simulator hangs",
165
+ "uri": "axiom://skill/axiom-build--xcode-debugging",
166
+ "name": "Axiom Build Xcode Debugging",
167
+ "description": "Check build environment BEFORE debugging code. …",
162
168
  "mimeType": "text/markdown"
163
169
  }
164
170
  ]
@@ -172,39 +178,32 @@ Examples:
172
178
  {
173
179
  "method": "resources/read",
174
180
  "params": {
175
- "uri": "axiom://skill/xcode-debugging"
181
+ "uri": "axiom://skill/axiom-build--xcode-debugging"
176
182
  }
177
183
  }
178
184
 
179
185
  // Response includes full skill content as markdown
180
186
  {
181
187
  "contents": [{
182
- "uri": "axiom://skill/xcode-debugging",
188
+ "uri": "axiom://skill/axiom-build--xcode-debugging",
183
189
  "mimeType": "text/markdown",
184
- "text": "# Xcode Debugging\n\n..."
190
+ "text": "# Axiom Build Xcode Debugging\n\n..."
185
191
  }]
186
192
  }
187
193
  ```
188
194
 
189
195
  ## MCP Tools
190
196
 
191
- Beyond the read-only skill-lookup tools (`axiom_get_catalog`, `axiom_search_skills`, `axiom_read_skill`, `axiom_get_agent`), the server wraps the bundled **`xcprof`** profiler so non-Claude-Code clients get the same Instruments workflow. These tools shell out to a macOS arm64 binary shipped inside the package (`dist/bin/xcprof`).
197
+ | Family | Tools | Side effects |
198
+ |--------|-------|--------------|
199
+ | Lookup | `axiom_get_catalog`, `axiom_search_skills`, `axiom_read_skill`, `axiom_get_agent` | None |
200
+ | `xclog` console capture | `axiom_xclog_list`, `axiom_xclog_launch`, `axiom_xclog_attach`, `axiom_xclog_show` | `launch` terminates and relaunches the target app in the simulator |
201
+ | `xcsym` crash symbolication | `axiom_xcsym_crash`, `axiom_xcsym_verify`, `axiom_xcsym_resolve`, `axiom_xcsym_find_dsym`, `axiom_xcsym_list_dsyms`, `axiom_xcsym_triage`, `axiom_xcsym_anonymize` | None |
202
+ | `xcprof` profiling | `axiom_xcprof_doctor`, `axiom_xcprof_analyze`, `axiom_xcprof_compare`, `axiom_xcprof_record` | `record` captures a new trace |
192
203
 
193
- **Requires an Apple Silicon Mac with Xcode installed.** `xcprof` drives `xctrace`, which is macOS-only — on other platforms the tools return an explanatory message instead of running.
204
+ The `xclog`, `xcsym`, and `xcprof` tools run macOS arm64 binaries shipped inside the package (`dist/bin/`). **They need an Apple Silicon Mac with Xcode installed**; on other platforms they return an explanatory message instead of running.
194
205
 
195
- | Tool | What it does | Read-only |
196
- |------|--------------|-----------|
197
- | `axiom_xcprof_doctor` | Verify `xctrace`; count Instruments templates + devices | yes |
198
- | `axiom_xcprof_analyze` | Analyze an existing `.trace` → structured CPU/hang/network JSON | yes |
199
- | `axiom_xcprof_compare` | Diff two traces (baseline vs current) for regression detection | yes |
200
- | `axiom_xcprof_record` | Capture a new `.trace` by attaching to, launching, or system-wide profiling | **no** |
201
-
202
- **`record` is the only side-effecting tool.** It defaults to attaching to a process and always runs non-interactively (`--no-prompt`). Its higher-risk modes stay gated, mirroring the CLI's ADR-002 security gates:
203
-
204
- - Launching a process (`launch`) requires `allowLaunch: true`.
205
- - System-wide capture (`allProcesses`) requires `allowAllProcesses: true`.
206
-
207
- Without those explicit flags the binary refuses the operation. Recordings are always duration-bounded.
206
+ **`axiom_xcprof_record` keeps its higher-risk modes gated.** It attaches to a process by default and always runs non-interactively. Launching a process (`launch`) requires `allowLaunch: true`, and system-wide capture (`allProcesses`) requires `allowAllProcesses: true`; without those flags the binary refuses. Recordings are always duration-bounded.
208
207
 
209
208
  ## Development
210
209
 
@@ -218,57 +217,73 @@ axiom-mcp/
218
217
  ├── src/
219
218
  │ ├── index.ts # Entry point + stdio transport
220
219
  │ ├── config.ts # Configuration + logging
220
+ │ ├── instructions.ts # Server instructions sent to clients
221
+ │ ├── version-context.ts # iOS/Xcode version ground truth
221
222
  │ ├── loader/
222
223
  │ │ ├── types.ts # Loader interface
223
224
  │ │ ├── parser.ts # Frontmatter parsing
224
225
  │ │ ├── dev-loader.ts # Live file reading
225
- │ │ └── prod-loader.ts # Bundle reading
226
+ │ │ ├── prod-loader.ts # Bundle reading
227
+ │ │ └── xcode-docs.ts # Xcode's bundled Apple docs
226
228
  │ ├── resources/
227
229
  │ │ └── handler.ts # Resources protocol
228
230
  │ ├── prompts/
229
231
  │ │ └── handler.ts # Prompts protocol
230
232
  │ ├── tools/
231
- │ │ └── handler.ts # Tools protocol
233
+ │ │ ├── handler.ts # Tools protocol + lookup tools
234
+ │ │ ├── xclog.ts # Console capture tools
235
+ │ │ ├── xcsym.ts # Crash symbolication tools
236
+ │ │ ├── xcprof.ts # Profiling tools
237
+ │ │ ├── binaries.ts # Bundled binary list
238
+ │ │ └── binary-exec.ts # Bounded binary execution
232
239
  │ ├── catalog/
233
240
  │ │ └── index.ts # Skill catalog + search
234
241
  │ ├── search/
235
242
  │ │ └── index.ts # BM25 search engine
236
243
  │ └── scripts/
237
- │ └── bundle.ts # Bundle generator
244
+ │ ├── bundle.ts # Bundle generator
245
+ │ ├── binary-coverage.ts # Bundled binary checks
246
+ │ └── generate-annotations.ts # skill-annotations.json generator
238
247
  └── dist/ # Compiled output
239
248
  ├── index.js # Server entry point
240
249
  ├── bundle.json # Production bundle
250
+ ├── bin/ # xclog, xcsym, xcprof, xcproject binaries
241
251
  └── ...
242
252
  ```
243
253
 
244
254
  ### Build Commands
245
255
 
256
+ The package uses pnpm (`pnpm-lock.yaml`).
257
+
246
258
  ```bash
247
259
  # Install dependencies
248
- npm install
260
+ pnpm install
249
261
 
250
262
  # Build once
251
- npm run build
263
+ pnpm run build
252
264
 
253
265
  # Build with production bundle
254
- npm run build:bundle
266
+ pnpm run build:bundle
255
267
 
256
268
  # Watch mode (rebuild on changes)
257
- npm run dev
269
+ pnpm run dev
258
270
 
259
271
  # Run server
260
- npm start
272
+ pnpm start
273
+
274
+ # Run tests
275
+ pnpm test
261
276
  ```
262
277
 
263
278
  The `build:bundle` command:
264
279
  1. Compiles TypeScript (`tsc`)
265
- 2. Generates `dist/bundle.json` from plugin files
266
- 3. Bundle includes all skills, commands, and agents
267
- 4. Required for production mode
280
+ 2. Adds annotations for any new skills to `skill-annotations.json`
281
+ 3. Generates `dist/bundle.json` from the plugin's skills, commands, and agents, and copies the tool binaries into `dist/bin/`
282
+ 4. Is required for production mode
268
283
 
269
284
  ### Adding Skills
270
285
 
271
- Skills are automatically discovered from `{AXIOM_DEV_PATH}/skills/<name>/SKILL.md`.
286
+ Routers are discovered from `{AXIOM_DEV_PATH}/skills/<router>/SKILL.md`, and their specialized skills from `{AXIOM_DEV_PATH}/skills/<router>/skills/<name>.md`, which the server names `<router>--<name>`.
272
287
 
273
288
  Skill frontmatter follows the Agent Skills spec:
274
289
 
@@ -280,14 +295,14 @@ license: MIT
280
295
  ---
281
296
  ```
282
297
 
283
- MCP search/catalog annotations (category, tags, related) are stored separately in `skill-annotations.json`:
298
+ MCP search/catalog annotations (category, tags, related) live in `skill-annotations.json`, keyed by the same ids. `pnpm run annotations` (also part of `build:bundle`) adds an entry for each skill that lacks one and keeps existing entries, so you can edit an entry by hand:
284
299
 
285
300
  ```json
286
301
  {
287
302
  "my-skill": {
288
303
  "category": "debugging",
289
304
  "tags": ["xcode", "swift", "performance"],
290
- "related": ["other-skill", "another-skill"]
305
+ "related": ["axiom-build--xcode-debugging", "axiom-swiftui"]
291
306
  }
292
307
  }
293
308
  ```
@@ -298,20 +313,16 @@ Changes are picked up automatically in development mode.
298
313
 
299
314
  ### Manual Testing (Development Mode)
300
315
 
316
+ Pipe a request into a development-mode server. It answers on stdout, logs to stderr, and exits when its input ends:
317
+
301
318
  ```bash
302
- # Terminal 1: Start server
303
- AXIOM_MCP_MODE=development \
304
- AXIOM_DEV_PATH=../.claude-plugin/plugins/axiom \
305
- AXIOM_LOG_LEVEL=debug \
306
- node dist/index.js
307
-
308
- # Terminal 2: Send MCP requests via stdin
309
- echo '{"jsonrpc":"2.0","id":1,"method":"resources/list"}' | node dist/index.js
319
+ echo '{"jsonrpc":"2.0","id":1,"method":"resources/list"}' | \
320
+ AXIOM_MCP_MODE=development AXIOM_DEV_PATH=../.claude-plugin/plugins/axiom node dist/index.js
310
321
  ```
311
322
 
312
323
  ### Testing with MCP Inspector
313
324
 
314
- Install the official MCP Inspector:
325
+ Run the official MCP Inspector:
315
326
 
316
327
  ```bash
317
328
  npx @modelcontextprotocol/inspector npx axiom-mcp
@@ -319,16 +330,6 @@ npx @modelcontextprotocol/inspector npx axiom-mcp
319
330
 
320
331
  Opens a web UI for testing MCP protocol interactions.
321
332
 
322
- ### Testing Claude Code Integration
323
-
324
- ```bash
325
- # Reload plugin (triggers .mcp.json)
326
- claude-code plugin reload axiom
327
-
328
- # Check MCP server logs
329
- # (Logs go to stderr, visible in plugin console)
330
- ```
331
-
332
333
  ## Troubleshooting
333
334
 
334
335
  ### Server Won't Start
@@ -371,57 +372,22 @@ npx axiom-mcp
371
372
  # Should start without errors, waiting for stdin
372
373
  ```
373
374
 
374
- ## Roadmap
375
-
376
- ### Phase 1: Foundation ✅
377
- - MCP server with stdio transport
378
- - Resources protocol (skills)
379
- - Development mode loader
380
- - Claude Code `.mcp.json` integration
381
-
382
- ### Phase 2: MCP Annotations ✅
383
- - Add MCP metadata to test skills
384
- - Enhanced skill categorization
385
- - Cross-references between skills
386
-
387
- ### Phase 3: Full Primitives ✅
388
- - Prompts protocol (commands)
389
- - Tools protocol (agents)
390
- - Complete MCP feature coverage
391
-
392
- ### Phase 4: Production Bundle ✅
393
- - Pre-compiled skill snapshot
394
- - Production mode loader
395
- - Bundle generator script
396
- - Dual-mode Loader interface
397
-
398
- ### Phase 5: npm Distribution ✅
399
- - Published as `axiom-mcp` on npm
400
- - Zero-config install via `npx axiom-mcp`
401
- - Multi-client configuration guides
402
-
403
375
  ## Architecture
404
376
 
405
- ### Dual Distribution Model
377
+ ### Two Distributions
406
378
 
407
- **Bundled (Claude Code Plugin)**
408
- ```
409
- User installs plugin → .mcp.json → MCP server (dev mode) → Live skills
410
- ```
379
+ **Plugin (Claude Code, the Claude app, Codex, Cursor)** – skills, agents, and commands load natively in the harness. The Codex and Cursor plugins also start this server through `npx -y axiom-mcp`.
411
380
 
412
- **Standalone (Other Tools)**
381
+ **npm package (any MCP client)**
413
382
  ```
414
- npx axiom-mcp → Server (prod mode) → Bundled skills
383
+ npx axiom-mcp → server (production mode) → bundled skills, commands, agents, and tools
415
384
  ```
416
385
 
417
- **Key Insight:** Same codebase, different entry points. Development mode for rapid iteration, production mode for distribution.
386
+ Development mode runs the same server against a plugin checkout, for working on Axiom's skills.
418
387
 
419
388
  ### Why MCP?
420
389
 
421
- **Before:** Maintain platform-specific formats for Cursor, VS Code, Gemini CLI, etc.
422
- **After:** One MCP server works everywhere.
423
-
424
- **Maintenance:** O(platforms × skills) → O(skills)
390
+ Many AI coding tools, such as VS Code, Gemini CLI, and OpenCode, have no plugin format Axiom ships for. Any of them that speaks MCP gets the same skills, commands, agents, and tools from this one server.
425
391
 
426
392
  ## Contributing
427
393
 
Binary file
@@ -1,19 +1,19 @@
1
1
  {
2
- "totalBytes": 13937165,
2
+ "totalBytes": 14137900,
3
3
  "skills": {
4
- "count": 303,
5
- "bytes": 7624235
4
+ "count": 307,
5
+ "bytes": 7734549
6
6
  },
7
7
  "commands": {
8
8
  "count": 17,
9
- "bytes": 51200
9
+ "bytes": 52529
10
10
  },
11
11
  "agents": {
12
12
  "count": 42,
13
- "bytes": 715169
13
+ "bytes": 719454
14
14
  },
15
15
  "searchIndex": {
16
- "bytes": 5546561
16
+ "bytes": 5631368
17
17
  },
18
- "generatedAt": "2026-10-13T00:14:17.849Z"
18
+ "generatedAt": "2026-10-13T22:29:11.558Z"
19
19
  }