Opengrok MCP Server

MCP server bridging OpenGrok search engine with AI for instant context across massive codebases

Local serverstdioPython

What is the Opengrok MCP Server?

MCP server bridging OpenGrok search engine with AI for instant context across massive codebases

What it actually does

Install OpenGrok MCP from the VS Code Marketplace, or search "OpenGrok" in the Extensions panel.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
opengrok_get_symbol_context1) searches definition, 2) reads source, 3) fetches headers, 4) gets references
opengrok_search_and_read1) executes search, 2) immediately fetches surrounding code context
opengrok_batch_searchCombines 2-5 individual search queries; deduplicates file:line hits across queries
opengrok_index_healthChecks latency, backend connectivity, staleness score, and latency trend
opengrok_what_changedRecent line changes grouped by commit — author, date, SHA, changed lines with context. Parameters: project, path, since_days
opengrok_dependency_mapBFS traversal of #include/import chains up to configurable depth (1–3); directed graph with uses/used_by
opengrok_search_patternRegex code search via regexp=true; returns file:line:content matches
opengrok_blameGit blame with line range (start_line/end_line); returns author, date, commit per line *(v5.6+)*
opengrok_call_graphCall chain tracing via OpenGrok API v2 /symbol/{name}/callgraph (requires OPENGROK_API_VERSION=v2)
opengrok_get_file_diffUnified diff between two revisions with full context lines — shows surrounding code so AI understands *why* a change was made; use opengrok_get_file_history to discover revision hashes
opengrok_memory_statusShows both memory files (status, bytes, 3-line preview) — helps LLM decide whether to read
opengrok_read_memoryRead active-task.md or investigation-log.md from the Living Document memory bank
opengrok_update_memoryWrite or append to memory files; auto-timestamps investigation-log.md entries

How to install the Opengrok MCP Server

{
  "mcpServers": {
    "opengrok": {
      "command": "npx",
      "args": ["-y", "opengrok-mcp-server"],
      "env": {
        "OPENGROK_HTTP_PORT": "your-value",
        "OPENGROK_BASE_URL": "your-value",
        "OPENGROK_HTTP_AUTH_TOKEN": "your-value",
        "OPENGROK_HTTP_CLIENT_ID": "your-value",
        "OPENGROK_HTTP_CLIENT_SECRET": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
OPENGROK_HTTP_PORTConfiguration value read at startup.Optional
OPENGROK_BASE_URLEndpoint or connection string the server talks to.Yes
OPENGROK_HTTP_AUTH_TOKENCredential the server authenticates with.Yes
OPENGROK_HTTP_CLIENT_IDConfiguration value read at startup.Optional
OPENGROK_HTTP_CLIENT_SECRETCredential the server authenticates with.Yes

Example prompts to try

  • “Use Opengrok to opengrok get symbol context.”
  • “Use Opengrok to opengrok search and read.”
  • “Use Opengrok to opengrok batch search.”

Frequently asked questions

MCP server bridging OpenGrok search engine with AI for instant context across massive codebases Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.