# MCP Server `ox serve` turns your workspace into a tool for AI agents. It starts a Model Context Protocol (MCP) server on stdio, exposing knowledge-base search and graph tools to Claude Code, Cursor, Windsurf, and any MCP-compatible agent. Both the Go CLI and ox-rs include an MCP server. The `.mcp.json` snippet below works with either — they expose the same 6 tools. ## Connect Add ox to your `.mcp.json` to auto-connect: ```json { "mcpServers": { "ox": { "type": "stdio", "command": "ox", "args": ["serve"] } } } ``` ## Tools exposed | Tool | Purpose | |------|---------| | `search_vault` | Hybrid BM25 + vector search across notes and repo docs | | `get_note` | Read a note's full text by path | | `find_related` | Graph neighbors + semantic similarity from a note | | `get_backlinks` | Inbound wikilinks to a note | | `vault_stats` | Index statistics (note count, edge count, tags) | | `find_path` | Shortest graph path between two notes (requires optional Neo4j backend) | ## In practice ``` # Agent query (via Claude Code): > Search vault for "deployment checklist" search_vault("deployment checklist") -> 3 results in 0.04s -> o/what/orgs/COM/iwl/deploy-checklist.md (0.96) -> o/when/days/2026.March.20.Thursday.md (0.84) -> x/code/.../infra/docs/DEPLOY.md (0.79) ``` ## Agent-navigable by construction The agent traverses the same tree humans do — no special API, no wrapper. Two things make the workspace agent-ready out of the box: - **`.agents/AGENTS.md`** provides universal instructions for any AI agent that opens the workspace. - **The MCP server** gives agents fast, ranked retrieval over the indexed graph. Agents are first-class citizens in OX: they receive the same context humans get. ## Next steps - [CLI Reference](https://iamox.ai/docs/cli.md#ox-serve) - [Two Implementations](https://iamox.ai/docs/two-implementations.md) - [Knowledge Graph & RAG](https://iamox.ai/docs/knowledge-graph-rag.md)