OpenGrok MCP Server
io.github.IcyHot09/opengrok-mcp-server
About OpenGrok MCP Server
OpenGrok MCP Server is an MCP server published by the GitHub account IcyHot09. MCP server bridging OpenGrok search engine with AI for instant context across massive codebases.
It runs on your own machine: your AI client starts it from the npm package opengrok-mcp-server at version 9.6.0.
It asks for one secret: OPENGROK_PASSWORD. Give it a key with the least access that still works.
It also needs OPENGROK_BASE_URL set before it starts.
Version 9.6.0 was published on 16 September 2026, and the source code is public, so you can read it before installing.
Written from the registry entry. 9 automated checks on the registry entry and the package code: 6 pass, 1 warn, 0 fail, 2 info. How we check.
What it asks for
| Variable | Required | Secret | Description |
|---|---|---|---|
OPENGROK_BASE_URL | Yes | No | OpenGrok server base URL (e.g. https://opengrok.example.com/source/) |
OPENGROK_USERNAME | No | No | OpenGrok authentication username. Leave unset for anonymous access. |
OPENGROK_PASSWORD | No | Yes | OpenGrok authentication password. Prefer storing via OS keychain using 'npx opengrok-mcp-server setup'. |
OPENGROK_VERIFY_SSL | No | No | Verify TLS certificates. Set to false for self-signed or internal CA certs. |
OPENGROK_CODE_MODE | No | No | Enable Code Mode: 2-tool sandbox interface with env.opengrok.* JavaScript API. Reduces AI token usage by ~90%. |
OPENGROK_ENABLE_MEMORY_TOOLS | No | No | Register the 3 memory tools in Code Mode (memory status, read, update). Off = api + execute only. |
OPENGROK_DEFAULT_PROJECT | No | No | Default project to scope all searches. Can be overridden per call. |
OPENGROK_CONTEXT_BUDGET | No | No | Response size tier controlling token usage. |
OPENGROK_API_VERSION | No | No | OpenGrok REST API version. Use v2 for call graph features (requires OpenGrok 1.12+). |
HTTP_PROXY | No | No | HTTP/HTTPS proxy URL for all OpenGrok API requests (e.g. http://proxy.company.com:8080). Also set as HTTPS_PROXY. |
OPENGROK_RESPONSE_FORMAT_OVERRIDE | No | No | Force a specific response format for all tools. Leave unset for per-tool auto-selection (recommended). |
OPENGROK_MEMORY_BANK_DIR | No | No | Directory where the AI stores investigation notes (active-task.md, investigation-log.md). Defaults to ~/.config/opengrok-mcp/memory-bank/ or workspace-relative when set by the VS Code extension. |
OPENGROK_LOCAL_COMPILE_DB_PATHS | No | No | Comma-separated paths to compile_commands.json for C/C++ compiler flag and include-path extraction. Leave unset for automatic workspace discovery. |
OPENGROK_ENABLE_ELICITATION | No | No | Interactive AI Prompts — the AI pauses to ask questions during investigations (project selection, file disambiguation). Requires Claude Code v2.1.76+ or a client that supports MCP Elicitation. |
OPENGROK_ENABLE_SAMPLING | No | No | AI Sampling — allow the server to request LLM completions for error explanations and summaries. Off by default to avoid consuming premium requests (e.g. GitHub Copilot). |
OPENGROK_SAMPLING_MODEL | No | No | Model preference for MCP Sampling (used for error explanation and query reformulation). |
OPENGROK_ENABLE_FILES_API | No | No | Files API Cache — avoids re-uploading unchanged investigation notes. Requires Files API support in the MCP client. |
OPENGROK_ENABLE_OBSERVATION_MASKER | No | No | Observation Masker — prepend compact history summaries to opengrok_execute results after N turns. Disabled by default; has no benefit for clients that retain full context (Claude Code, Cursor). |
OPENGROK_OBSERVATION_MASKER_TURNS | No | No | Number of most-recent opengrok_execute results to keep as full text before masking older ones. Default: 10. |
OPENGROK_SAMPLING_MAX_TOKENS | No | No | Maximum tokens for AI sampling responses (error explanation, query reformulation). Range: 64–4096. |
OPENGROK_AUDIT_LOG_FILE | No | No | Path to write structured audit events (CSV/JSON). Appends tool invocations, elicitation events, and errors. Leave unset to disable. |
OPENGROK_RATELIMIT_RPM | No | No | Maximum requests per minute to the OpenGrok server. Default: 60. |
OPENGROK_PER_TOOL_RATELIMIT | No | No | Per-tool rate limits in requests per minute, as comma-separated tool:rpm pairs (e.g. opengrok_execute:15,opengrok_search_code:30). Overrides OPENGROK_RATELIMIT_RPM for specific tools. |
OPENGROK_TIMEOUT | No | No | HTTP request timeout in seconds for OpenGrok API calls. Increase for slow servers. Default: 30. |
OPENGROK_DEFAULT_MAX_RESULTS | No | No | Default maximum number of results returned per search query. Default: 25. |
OPENGROK_PASSWORD_FILE | No | No | Path to a file containing the OpenGrok password (file-mounted secret for containers). Takes precedence over the OS keychain when OPENGROK_PASSWORD is unset. |
OPENGROK_MAX_RESPONSE_BYTES | No | No | Hard cap on response payload size in bytes. Overrides the context-budget default. Non-positive values are ignored. |
OPENGROK_SEARCH_AND_READ_CAP | No | No | Cap for the search_and_read compound tool in bytes. Overrides the context-budget default (2–8 KB depending on tier). Non-positive values are ignored. |
OPENGROK_STRICT_SSRF | No | No | When true, reject OPENGROK_BASE_URL values pointing at private/loopback IPs at startup. Default: false (warn only; per-request guards still apply). |
OPENGROK_JWT_ISSUER | No | No | Expected JWT issuer (iss claim) for HTTP transport OAuth. When set, JWTs from other issuers are rejected. |
OPENGROK_GRAMMAR_DIR | No | No | Directory containing tree-sitter WASM grammars. Overrides the bundled grammar lookup. |
Checks
| Check | Result | Detail |
|---|---|---|
| Source repository linked | Pass | https://github.com/IcyHot09/opengrok-mcp-server |
| Version pinned | Pass | Every package has an explicit version |
| Secrets requested | Info | Asks for 1 secret: OPENGROK_PASSWORD |
| Known package registry | Pass | All packages come from npm, PyPI, OCI, NuGet or MCPB |
| Namespace ownership | Info | Name verified via GitHub account IcyHot09 |
| Registry text aimed at the AI | Pass | Description and settings contain no hidden characters or instructions to the AI |
| Install scripts | Pass | opengrok-mcp-server@9.6.0 runs nothing at install |
| Code red flags | Warn | Very long encoded blob in code (out/server/main.js:5: ""AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19") |
| Text aimed at the AI | Pass | No hidden characters or instructions to the AI in 5 files, including comments and the README |
Popularity & health: 52 / 100
Worked out from public numbers and our own checks, not from user reviews or ratings. It says how used and how looked-after a server is, not whether it is safe.
3 forks, 1 merged pull requests. Sources: GitHub, npm, PyPI (pypistats.org) and Hacker News (Algolia), fetched 2026-10-31.
What people say
No Hacker News threads link to its source code.
Look further: search Reddit, search Hacker News, read its GitHub issues. These are not reviews we checked.
Facts
| Registry name | io.github.IcyHot09/opengrok-mcp-server |
|---|---|
| Publisher | GitHub account IcyHot09 |
| How the name is verified | Name verified via GitHub account IcyHot09. The registry ties the name prefix to that account or domain; it does not check the code. |
| Type | Local: runs on your machine from a package |
| Packages | npm opengrok-mcp-server 9.6.0 (stdio) |
| Version | 9.6.0 |
| Published | |
| Last updated | |
| Source repository | https://github.com/IcyHot09/opengrok-mcp-server |
| Website | https://github.com/IcyHot09/opengrok-mcp-server |
| Category | Search & web (assigned by keyword rule, not by hand) |
Related servers in Search & web
- docdex5/7Fast per-repo documentation indexer and full-text search MCP server…
- project-knowledge-mcp7/7Cross-project knowledge graph for MCP — map features across mobile,…
- AI Scanner7/7Scan codebases for LLM/AI SDK usage, exposed API tokens, and…
- CAPI Gateway4/4Apache Camel API Gateway with REST-to-MCP bridging for LLM agents.
- Dropify5/6Official merch store lookup and instant restock alerts for artists…
- agentsearch-mcp4/4LLM-ready web search + instant answers + URL-to-clean-text fetch…