axiom-mcp 2.19.6

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.
Files changed (56) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +409 -0
  3. package/dist/bundle.json +609177 -0
  4. package/dist/catalog/index.d.ts +26 -0
  5. package/dist/catalog/index.d.ts.map +1 -0
  6. package/dist/catalog/index.js +173 -0
  7. package/dist/catalog/index.js.map +1 -0
  8. package/dist/config.d.ts +31 -0
  9. package/dist/config.d.ts.map +1 -0
  10. package/dist/config.js +60 -0
  11. package/dist/config.js.map +1 -0
  12. package/dist/index.d.ts +3 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +130 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/loader/dev-loader.d.ts +55 -0
  17. package/dist/loader/dev-loader.d.ts.map +1 -0
  18. package/dist/loader/dev-loader.js +223 -0
  19. package/dist/loader/dev-loader.js.map +1 -0
  20. package/dist/loader/parser.d.ts +117 -0
  21. package/dist/loader/parser.d.ts.map +1 -0
  22. package/dist/loader/parser.js +204 -0
  23. package/dist/loader/parser.js.map +1 -0
  24. package/dist/loader/prod-loader.d.ts +42 -0
  25. package/dist/loader/prod-loader.d.ts.map +1 -0
  26. package/dist/loader/prod-loader.js +144 -0
  27. package/dist/loader/prod-loader.js.map +1 -0
  28. package/dist/loader/types.d.ts +55 -0
  29. package/dist/loader/types.d.ts.map +1 -0
  30. package/dist/loader/types.js +2 -0
  31. package/dist/loader/types.js.map +1 -0
  32. package/dist/loader/xcode-docs.d.ts +18 -0
  33. package/dist/loader/xcode-docs.d.ts.map +1 -0
  34. package/dist/loader/xcode-docs.js +91 -0
  35. package/dist/loader/xcode-docs.js.map +1 -0
  36. package/dist/prompts/handler.d.ts +57 -0
  37. package/dist/prompts/handler.d.ts.map +1 -0
  38. package/dist/prompts/handler.js +95 -0
  39. package/dist/prompts/handler.js.map +1 -0
  40. package/dist/resources/handler.d.ts +51 -0
  41. package/dist/resources/handler.d.ts.map +1 -0
  42. package/dist/resources/handler.js +99 -0
  43. package/dist/resources/handler.js.map +1 -0
  44. package/dist/scripts/bundle.d.ts +13 -0
  45. package/dist/scripts/bundle.d.ts.map +1 -0
  46. package/dist/scripts/bundle.js +137 -0
  47. package/dist/scripts/bundle.js.map +1 -0
  48. package/dist/search/index.d.ts +65 -0
  49. package/dist/search/index.d.ts.map +1 -0
  50. package/dist/search/index.js +227 -0
  51. package/dist/search/index.js.map +1 -0
  52. package/dist/tools/handler.d.ts +40 -0
  53. package/dist/tools/handler.d.ts.map +1 -0
  54. package/dist/tools/handler.js +265 -0
  55. package/dist/tools/handler.js.map +1 -0
  56. package/package.json +53 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Charles Wiltgen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,409 @@
1
+ # Axiom MCP Server
2
+
3
+ Model Context Protocol (MCP) server for Axiom's iOS development skills, agents, and commands. Enables cross-platform access to Axiom's battle-tested guidance in any MCP-compatible AI coding tool.
4
+
5
+ ## Features
6
+
7
+ - **133 Skills** — iOS development expertise as MCP Resources (on-demand loading)
8
+ - **10 Commands** — Structured prompts as MCP Prompts
9
+ - **31 Agents** — Autonomous tools as MCP Tools
10
+ - **Dual Distribution** — Works standalone or bundled with Claude Code plugin
11
+ - **Hybrid Runtime** — Development mode (live files) or production mode (bundled)
12
+
13
+ ## Installation
14
+
15
+ ### Quick Start (npm)
16
+
17
+ No clone or build step needed. Add to your tool's MCP configuration:
18
+
19
+ ```json
20
+ {
21
+ "mcpServers": {
22
+ "axiom": {
23
+ "command": "npx",
24
+ "args": ["-y", "axiom-mcp"]
25
+ }
26
+ }
27
+ }
28
+ ```
29
+
30
+ This downloads and runs the server in production mode with all skills bundled.
31
+
32
+ ### For Claude Code Users (Bundled)
33
+
34
+ The MCP server starts automatically when you install the Axiom plugin:
35
+
36
+ ```bash
37
+ claude-code plugin add axiom@axiom-marketplace
38
+ ```
39
+
40
+ No additional configuration needed — the plugin's `.mcp.json` launches the server in development mode.
41
+
42
+ ## Usage
43
+
44
+ ### VS Code + GitHub Copilot
45
+
46
+ Add to your VS Code `settings.json`:
47
+
48
+ ```json
49
+ {
50
+ "github.copilot.chat.mcp.servers": {
51
+ "axiom": {
52
+ "command": "npx",
53
+ "args": ["-y", "axiom-mcp"]
54
+ }
55
+ }
56
+ }
57
+ ```
58
+
59
+ ### Claude Desktop
60
+
61
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
62
+
63
+ ```json
64
+ {
65
+ "mcpServers": {
66
+ "axiom": {
67
+ "command": "npx",
68
+ "args": ["-y", "axiom-mcp"]
69
+ }
70
+ }
71
+ }
72
+ ```
73
+
74
+ ### Cursor
75
+
76
+ Add to `.cursor/mcp.json` in your workspace:
77
+
78
+ ```json
79
+ {
80
+ "mcpServers": {
81
+ "axiom": {
82
+ "command": "npx",
83
+ "args": ["-y", "axiom-mcp"]
84
+ }
85
+ }
86
+ }
87
+ ```
88
+
89
+ ### Gemini CLI
90
+
91
+ Configure MCP server in `~/.gemini/config.toml`:
92
+
93
+ ```toml
94
+ [[mcp_servers]]
95
+ name = "axiom"
96
+ command = "npx"
97
+ args = ["-y", "axiom-mcp"]
98
+ ```
99
+
100
+ ## Configuration
101
+
102
+ ### Environment Variables
103
+
104
+ | Variable | Values | Default | Description |
105
+ |----------|--------|---------|-------------|
106
+ | `AXIOM_MCP_MODE` | `development`, `production` | `production` | Runtime mode |
107
+ | `AXIOM_DEV_PATH` | File path | — | Plugin directory for dev mode |
108
+ | `AXIOM_LOG_LEVEL` | `debug`, `info`, `warn`, `error` | `info` | Logging verbosity |
109
+
110
+ ### Modes
111
+
112
+ #### Development Mode (Live Skills)
113
+
114
+ ```bash
115
+ AXIOM_MCP_MODE=development AXIOM_DEV_PATH=/path/to/plugin node dist/index.js
116
+ ```
117
+
118
+ - Reads skills directly from Claude Code plugin directory
119
+ - Changes to skills reflected immediately (no rebuild needed)
120
+ - Ideal for skill development and testing
121
+ - Used by Claude Code plugin's `.mcp.json`
122
+
123
+ #### Production Mode (Bundled Skills)
124
+
125
+ ```bash
126
+ # Default mode — no environment variables needed
127
+ npx axiom-mcp
128
+ ```
129
+
130
+ - Reads pre-bundled snapshot from `dist/bundle.json`
131
+ - Bundle contains all 133 skills, 10 commands, 31 agents
132
+ - No file system access after initialization
133
+ - Self-contained, distributed via npm
134
+
135
+ ## MCP Resources
136
+
137
+ Skills are exposed as MCP Resources with URI scheme:
138
+
139
+ ```
140
+ axiom://skill/{skill-name}
141
+ ```
142
+
143
+ Examples:
144
+ - `axiom://skill/xcode-debugging`
145
+ - `axiom://skill/swiftui-nav`
146
+ - `axiom://skill/memory-debugging`
147
+ - `axiom://skill/liquid-glass-ref`
148
+
149
+ ### Resource Discovery
150
+
151
+ ```json
152
+ // resources/list response
153
+ {
154
+ "resources": [
155
+ {
156
+ "uri": "axiom://skill/xcode-debugging",
157
+ "name": "Xcode Debugging",
158
+ "description": "Environment-first diagnostics for BUILD FAILED, test crashes, simulator hangs",
159
+ "mimeType": "text/markdown"
160
+ }
161
+ ]
162
+ }
163
+ ```
164
+
165
+ ### Resource Reading
166
+
167
+ ```json
168
+ // resources/read request
169
+ {
170
+ "method": "resources/read",
171
+ "params": {
172
+ "uri": "axiom://skill/xcode-debugging"
173
+ }
174
+ }
175
+
176
+ // Response includes full skill content as markdown
177
+ {
178
+ "contents": [{
179
+ "uri": "axiom://skill/xcode-debugging",
180
+ "mimeType": "text/markdown",
181
+ "text": "# Xcode Debugging\n\n..."
182
+ }]
183
+ }
184
+ ```
185
+
186
+ ## Development
187
+
188
+ ### Project Structure
189
+
190
+ ```
191
+ mcp-server/
192
+ ├── package.json # npm package config
193
+ ├── tsconfig.json # TypeScript config
194
+ ├── skill-annotations.json # MCP search/catalog metadata
195
+ ├── src/
196
+ │ ├── index.ts # Entry point + stdio transport
197
+ │ ├── config.ts # Configuration + logging
198
+ │ ├── loader/
199
+ │ │ ├── types.ts # Loader interface
200
+ │ │ ├── parser.ts # Frontmatter parsing
201
+ │ │ ├── dev-loader.ts # Live file reading
202
+ │ │ └── prod-loader.ts # Bundle reading
203
+ │ ├── resources/
204
+ │ │ └── handler.ts # Resources protocol
205
+ │ ├── prompts/
206
+ │ │ └── handler.ts # Prompts protocol
207
+ │ ├── tools/
208
+ │ │ └── handler.ts # Tools protocol
209
+ │ ├── catalog/
210
+ │ │ └── index.ts # Skill catalog + search
211
+ │ ├── search/
212
+ │ │ └── index.ts # BM25 search engine
213
+ │ └── scripts/
214
+ │ └── bundle.ts # Bundle generator
215
+ └── dist/ # Compiled output
216
+ ├── index.js # Server entry point
217
+ ├── bundle.json # Production bundle
218
+ └── ...
219
+ ```
220
+
221
+ ### Build Commands
222
+
223
+ ```bash
224
+ # Install dependencies
225
+ npm install
226
+
227
+ # Build once
228
+ npm run build
229
+
230
+ # Build with production bundle
231
+ npm run build:bundle
232
+
233
+ # Watch mode (rebuild on changes)
234
+ npm run dev
235
+
236
+ # Run server
237
+ npm start
238
+ ```
239
+
240
+ The `build:bundle` command:
241
+ 1. Compiles TypeScript (`tsc`)
242
+ 2. Generates `dist/bundle.json` from plugin files
243
+ 3. Bundle includes all skills, commands, and agents
244
+ 4. Required for production mode
245
+
246
+ ### Adding Skills
247
+
248
+ Skills are automatically discovered from `{AXIOM_DEV_PATH}/skills/<name>/SKILL.md`.
249
+
250
+ Skill frontmatter follows the Agent Skills spec:
251
+
252
+ ```yaml
253
+ ---
254
+ name: my-skill
255
+ description: Use when...
256
+ license: MIT
257
+ ---
258
+ ```
259
+
260
+ MCP search/catalog annotations (category, tags, related) are stored separately in `skill-annotations.json`:
261
+
262
+ ```json
263
+ {
264
+ "my-skill": {
265
+ "category": "debugging",
266
+ "tags": ["xcode", "swift", "performance"],
267
+ "related": ["other-skill", "another-skill"]
268
+ }
269
+ }
270
+ ```
271
+
272
+ Changes are picked up automatically in development mode.
273
+
274
+ ## Testing
275
+
276
+ ### Manual Testing (Development Mode)
277
+
278
+ ```bash
279
+ # Terminal 1: Start server
280
+ AXIOM_MCP_MODE=development \
281
+ AXIOM_DEV_PATH=../.claude-plugin/plugins/axiom \
282
+ AXIOM_LOG_LEVEL=debug \
283
+ node dist/index.js
284
+
285
+ # Terminal 2: Send MCP requests via stdin
286
+ echo '{"jsonrpc":"2.0","id":1,"method":"resources/list"}' | node dist/index.js
287
+ ```
288
+
289
+ ### Testing with MCP Inspector
290
+
291
+ Install the official MCP Inspector:
292
+
293
+ ```bash
294
+ npx @modelcontextprotocol/inspector npx axiom-mcp
295
+ ```
296
+
297
+ Opens a web UI for testing MCP protocol interactions.
298
+
299
+ ### Testing Claude Code Integration
300
+
301
+ ```bash
302
+ # Reload plugin (triggers .mcp.json)
303
+ claude-code plugin reload axiom
304
+
305
+ # Check MCP server logs
306
+ # (Logs go to stderr, visible in plugin console)
307
+ ```
308
+
309
+ ## Troubleshooting
310
+
311
+ ### Server Won't Start
312
+
313
+ **Check Node version:**
314
+ ```bash
315
+ node --version
316
+ # Should be 18.0.0 or higher
317
+ ```
318
+
319
+ **Check environment variables:**
320
+ ```bash
321
+ echo $AXIOM_MCP_MODE
322
+ echo $AXIOM_DEV_PATH
323
+ ```
324
+
325
+ **Verify plugin path exists (dev mode):**
326
+ ```bash
327
+ ls $AXIOM_DEV_PATH/skills
328
+ # Should show skill directories
329
+ ```
330
+
331
+ ### Skills Not Appearing
332
+
333
+ **Check log output (stderr):**
334
+ ```bash
335
+ AXIOM_LOG_LEVEL=debug npx axiom-mcp 2>&1 | grep -i skill
336
+ ```
337
+
338
+ ### MCP Client Can't Connect
339
+
340
+ MCP uses stdin/stdout for communication. Common issues:
341
+
342
+ - **Wrong command** in your tool's config — use `npx` with args `["-y", "axiom-mcp"]`
343
+ - **Other stdout writers** — make sure nothing else writes to stdout; logs go to stderr only
344
+
345
+ Test the command from your config manually:
346
+ ```bash
347
+ npx axiom-mcp
348
+ # Should start without errors, waiting for stdin
349
+ ```
350
+
351
+ ## Roadmap
352
+
353
+ ### Phase 1: Foundation ✅
354
+ - MCP server with stdio transport
355
+ - Resources protocol (skills)
356
+ - Development mode loader
357
+ - Claude Code `.mcp.json` integration
358
+
359
+ ### Phase 2: MCP Annotations ✅
360
+ - Add MCP metadata to test skills
361
+ - Enhanced skill categorization
362
+ - Cross-references between skills
363
+
364
+ ### Phase 3: Full Primitives ✅
365
+ - Prompts protocol (commands)
366
+ - Tools protocol (agents)
367
+ - Complete MCP feature coverage
368
+
369
+ ### Phase 4: Production Bundle ✅
370
+ - Pre-compiled skill snapshot
371
+ - Production mode loader
372
+ - Bundle generator script
373
+ - Dual-mode Loader interface
374
+
375
+ ### Phase 5: npm Distribution ✅
376
+ - Published as `axiom-mcp` on npm
377
+ - Zero-config install via `npx axiom-mcp`
378
+ - Multi-client configuration guides
379
+
380
+ ## Architecture
381
+
382
+ ### Dual Distribution Model
383
+
384
+ **Bundled (Claude Code Plugin)**
385
+ ```
386
+ User installs plugin → .mcp.json → MCP server (dev mode) → Live skills
387
+ ```
388
+
389
+ **Standalone (Other Tools)**
390
+ ```
391
+ npx axiom-mcp → Server (prod mode) → Bundled skills
392
+ ```
393
+
394
+ **Key Insight:** Same codebase, different entry points. Development mode for rapid iteration, production mode for distribution.
395
+
396
+ ### Why MCP?
397
+
398
+ **Before:** Maintain platform-specific formats for Cursor, VS Code, Gemini CLI, etc.
399
+ **After:** One MCP server works everywhere.
400
+
401
+ **Maintenance:** O(platforms × skills) → O(skills)
402
+
403
+ ## Contributing
404
+
405
+ See the main Axiom repository for contribution guidelines.
406
+
407
+ ## License
408
+
409
+ MIT License — See [LICENSE](LICENSE)