docs · connect an agent

Connect Claude Code, Codex and other MCP clients

CodeMarrow serves its tools over the Model Context Protocol on stdio. Any MCP client can start it, and the agent gets structure instead of search.

Claude Code#

Run this from the repository you want the agent to understand:

shell
claude mcp add codemarrow -- codemarrow mcp --project .

Codex#

Add the server to ~/.codex/config.toml:

~/.codex/config.toml
[mcp_servers.codemarrow]command = "codemarrow"args = ["mcp", "--project", "/absolute/path/to/your/repo"]

Cursor, Claude Desktop and other clients#

Clients configured with JSON use the same command. Give an absolute project path, since the client may not start the server from your repository.

mcp.json
{  "mcpServers": {    "codemarrow": {      "command": "codemarrow",      "args": ["mcp", "--project", "/absolute/path/to/your/repo"]    }  }}

How the server runs#

  • On start it brings the index up to date (incrementally), then serves every tool.
  • Pass --no-index to serve the existing index as it is, without updating it first.
  • The protocol runs over stdout; progress and logs go to stderr, which MCP clients show as server logs.
  • Every tool only reads the index and the project’s files.