MCP server

Quick setup

# Terminal 1
python -m codegenome --workspace . --build --mcp --watch

# Terminal 2
python -m codegenome.installer \
  --db-path "$(pwd)/.genome/watcher.db" \
  --client cursor \
  --transport http \
  --host 127.0.0.1 \
  --port 7331

Standalone server

python -m codegenome.mcp_server --help

# HTTP (default port 7331, localhost only)
python -m codegenome.mcp_server \
  --db-path ./.genome/watcher.db \
  --host 127.0.0.1 \
  --port 7331 \
  --transport http

# HTTP accessible on LAN
python -m codegenome.mcp_server \
  --db-path ./.genome/watcher.db \
  --host 0.0.0.0 \
  --port 7331 \
  --transport http \
  --allow-remote-http

# Stdio
python -m codegenome.mcp_server \
  --db-path ./.genome/watcher.db \
  --transport stdio

codegenome mcp-start

codegenome analyze .
codegenome mcp-start .

Starts stdio transport using the workspace database path.

To start an HTTP MCP server accessible over your local network, use the --transport and --lan flags:

codegenome mcp-start --transport http --port 7331 --lan .

Config installer

python -m codegenome.installer --help
FlagDescription
--db-pathAbsolute path to .genome/watcher.db
--pythonPython executable for stdio transport
--transportstdio or http
--host, --portHTTP settings in generated config
--clientLimit to one client (repeatable)
--dry-runPrint target paths only

Supported clients

Client keyConfig location
cursor~/.cursor/mcp.json
copilot.vscode/mcp.json (workspace)
claudeClaude Desktop config (OS-specific)
codex~/.codex/mcp.json
gemini~/.gemini/mcp.json
aider~/.aider/mcp.json
windsurf~/.codeium/windsurf/mcp_config.json

Environment variables

VariableDefaultPurpose
WATCHER_MCP_DB_PATHtest.dbDatabase path
WATCHER_MCP_HOST127.0.0.1HTTP bind host
WATCHER_MCP_PORT7331HTTP port
WATCHER_MCP_TRANSPORThttphttp or stdio
WATCHER_MCP_TIMEOUT30Tool timeout (seconds)
WATCHER_MCP_LOG_LEVELINFOLog level

Health & activity

curl http://127.0.0.1:7331/health
curl http://127.0.0.1:7331/mcp/activity

Tool reference: MCP tools · Guide: Cursor setup