Claude Code can use Contexity through the same MCP server as other agent hosts. Once connected, Claude Code calls context tools automatically at each stage of a task — Contexity is the context layer behind the agent, not a separate chat surface. You keep working with Claude Code exactly as you normally would.
Install the Host Config
Run the following steps to configure Claude Code to launch the Contexity MCP server.
Preview the config (dry run)
Inspect the changes before writing anything:contexity --project /path/to/project host install claude-code --dry-run
Apply the config
When the preview looks correct, write the configuration:contexity --project /path/to/project --yes host install claude-code
Confirm the MCP server command
The host install command writes the local config needed for Claude Code to launch the MCP server automatically. The server runs on stdio transport:contexity --project /path/to/project mcp serve --transport stdio
You don’t need to run this command manually — Claude Code launches it using the config written in the previous step.
Restart Claude Code after installing the host config for the MCP server connection to take effect.
Expected Workflow
Claude Code uses Contexity the same way Codex does. At each stage of a task, it should:
- Start a run — open a task-scoped context session with
context_start_run
- Retrieve a pack — pull bounded, task-relevant context before making edits
- Map impact — call
context_impact before touching known files
- Detect changes — record meaningful edits with
context_detect_changes
- Capture useful events — store external sources, decisions, and signals as structured references
- Close the run — finalize the session and surface metrics with
context_close_run
User Experience
You interact with Claude Code exactly as you normally would — through conversation and task requests. Contexity runs in the background, keeping context bounded and traceable without changing how you communicate with the agent.
Contexity does not add a separate interface or require you to switch tools. When metrics display is enabled, you’ll see a brief heuristic summary at task closeout. Everything else happens invisibly between Claude Code and the MCP server.