OCR review agents can invoke external MCP server tools (e.g. database schema lookup, API doc search) to enrich review context.
# stdio transport (sub-process)
ocr config set mcp_servers.docs.type stdio
ocr config set mcp_servers.docs.command npx
ocr config set mcp_servers.docs.args '["@org/docs-mcp-server"]'
# remote transport (Streamable HTTP)
ocr config set mcp_servers.api.type remote
ocr config set mcp_servers.api.url https://mcp.example.com/sse
ocr config set mcp_servers.api.headers '{"Authorization": "Bearer $MCP_TOKEN"}'
# Filter tools with allowlist
ocr config set mcp_servers.docs.tools '["search_docs", "get_schema"]'
# Remove server
ocr config unset mcp_servers.docs| Field | Description |
|---|---|
type |
stdio (default) or remote |
command |
Sub-process command (stdio) |
args |
JSON array of arguments (stdio) |
env |
JSON array of KEY=VALUE (stdio) |
url |
Service endpoint URL (remote; http/https only) |
headers |
JSON object; values support $ENV_VAR expansion (remote) |
tools |
JSON array allowlist filter |
setup |
Shell command executed before startup (stdio) |
headersvalues must be non-empty (validated onset); an empty value after$ENV_VARexpansion fails at runtime.- MCP tools whose names collide with built-in tools are skipped with a warning; tools in the
toolsallowlist that do not exist on the server are also warned about. setupruns in the repository root directory with a 5-minute timeout; on failure it prints an error and skips that server — the review proceeds without it.- Invalid JSON in
args/env/tools/headersreports an error.
MCP server tools are registered alongside the following built-in agent tools:
file_read— Reads file content with line rangescode_search— Searches codebase with regexfile_find— Finds files by patternfile_read_diff— Reads diff of other changed filescode_comment— Submits structured review comment