Skip to content
axintdocs

Claude Code

Claude Code is Anthropic’s terminal-based agentic coding assistant. It speaks MCP natively, so plugging Axint in takes two lines.

Run axint init in a fresh directory and it will drop a pre-wired config at .vscode/mcp.json. Claude Code reads this file automatically when you launch it from the project root.

Terminal window
npx -y -p @axint/compiler axint init my-intents
cd my-intents
claude

The first time Claude calls an Axint tool it will ask for permission. Approve it, and from that point on Claude can:

  • axint.scaffold — generate new intents from plain English
  • axint.compile — compile and return the Swift
  • axint.validate — check a change without writing to disk
  • axint.templates.list / axint.templates.get — browse the bundled reference set

If you want Axint available in every Claude Code session, add it to your global config:

Terminal window
claude mcp add axint -- npx -y -p @axint/compiler axint-mcp
~/.config/claude-code/mcp.json
{
"mcpServers": {
"axint": {
"command": "npx",
"args": ["-y", "-p", "@axint/compiler", "axint-mcp"]
}
}
}

Restart Claude Code. It will spawn the Axint MCP server on startup and keep it alive for the duration of the session.

Use the hosted endpoint when you want Claude Code to connect over HTTP instead of spawning a local Node process:

Terminal window
claude mcp add axint --transport http https://mcp.axint.ai/mcp

Once it’s wired up, try this:

Scaffold an intent named LogWorkoutIntent in the health domain with parameters for the activity type (string), duration (duration), and an optional notes field. Add the HealthKit entitlement.

Claude will call axint.scaffold with structured parameters, write the file, then call axint.compile with sandbox validation enabled to prove it builds. On a Mac with Xcode, the whole loop is under 5 seconds — you get a real Swift file that’s been verified against the actual Swift toolchain, not a plausible-looking guess.

“Axint tools aren’t showing up in Claude Code”

Claude Code only loads MCP servers on launch. If you added .vscode/mcp.json while Claude was already running, quit and relaunch Claude Code from the project root.

“sandbox: true fails with ‘Swift toolchain not found’”

Sandbox validation requires the Swift toolchain. On macOS, install Xcode from the App Store (or xcode-select --install for just the command line tools). On Linux or Windows, use sandbox mode only inside a CI job with swift-actions/setup-swift.