mcpbeat Sign in

OpenGrok MCP Server

local only

OpenGrok MCP Server runs on your own machine — the client starts it, so there is no endpoint to ping. 167 installs a week from npm. Last commit 16 Sep 2026.

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

Installs per day peak 209 · avg 25 · -5% w/w
a month agotoday
167
Installs / week
npm · opengrok-mcp-server
10
Stars
0 open issues
16 Sep 2026
Last commit
1 release in 90 days
PolyForm-Noncommercial-1.0.0
License
TypeScript

What the code does

We read the source, 4 d ago · rules 995398eba69f

Capabilities

What this server is able to do. For an MCP server this is often the job itself — a terminal server runs commands because that is what it is for. Listed so you know what you are plugging in, not as an accusation.

Builds a file path from a variable src/server/tools/register-resources.ts:59
    const filePath = path.join(memoryBank.bankDir, filename);

Is this your server and something here is wrong? Tell us — corrections are free and do not require a plan.

This code can reach further than it looks

We found places where it runs commands, builds paths or queries from values it is given. None of that is a flaw by itself — it becomes one when the code changes, and code changes quietly between releases. We re-read it on every one.

Three servers free · no card

Connect this server

This server runs on your own machine — install it with the package manager and the client starts it for you. Package name taken from the official registry entry.

run in your terminal
claude mcp add opengrok-mcp-server -e 'OPENGROK_BASE_URL=<OPENGROK_BASE_URL>' -- npx -y opengrok-mcp-server
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "opengrok-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "opengrok-mcp-server"
      ],
      "env": {
        "OPENGROK_BASE_URL": "<OPENGROK_BASE_URL>"
      }
    }
  }
}
~/.codex/config.toml
[mcp_servers.opengrok-mcp-server]
command = "npx"
args = ["-y", "opengrok-mcp-server"]
env = { OPENGROK_BASE_URL = "<OPENGROK_BASE_URL>" }
.cursor/mcp.json
{
  "mcpServers": {
    "opengrok-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "opengrok-mcp-server"
      ],
      "env": {
        "OPENGROK_BASE_URL": "<OPENGROK_BASE_URL>"
      }
    }
  }
}
.vscode/mcp.json
{
  "servers": {
    "opengrok-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "opengrok-mcp-server"
      ],
      "env": {
        "OPENGROK_BASE_URL": "<OPENGROK_BASE_URL>"
      }
    }
  }
}

Put your own value in place of <OPENGROK_BASE_URL> (OpenGrok server base URL (e.g. https://opengrok.example.com/source/)). The author’s registry entry marks it as required.

Optional settings from the registry entry, left out of the block above: OPENGROK_USERNAME (OpenGrok authentication username. Leave unset for anonymous access), OPENGROK_PASSWORD (OpenGrok authentication password. Prefer storing via OS keychain using 'npx opengrok-mcp-server setup'), OPENGROK_VERIFY_SSL (Verify TLS certificates. Set to false for self-signed or internal CA certs), OPENGROK_CODE_MODE (Enable Code Mode: 2-tool sandbox interface with env.opengrok.* JavaScript API. Reduces AI token usage by ~90%), OPENGROK_ENABLE_MEMORY_TOOLS (Register the 3 memory tools in Code Mode (memory status, read, update). Off = api + execute only), OPENGROK_DEFAULT_PROJECT (Default project to scope all searches. Can be overridden per call), OPENGROK_CONTEXT_BUDGET (Response size tier controlling token usage), OPENGROK_API_VERSION (OpenGrok REST API version. Use v2 for call graph features (requires OpenGrok 1.12+)), HTTP_PROXY (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 (Force a specific response format for all tools. Leave unset for per-tool auto-selection (recommended)), OPENGROK_MEMORY_BANK_DIR (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 (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 (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 (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 (Model preference for MCP Sampling (used for error explanation and query reformulation)), OPENGROK_ENABLE_FILES_API (Files API Cache — avoids re-uploading unchanged investigation notes. Requires Files API support in the MCP client), OPENGROK_ENABLE_OBSERVATION_MASKER (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 (Number of most-recent opengrok_execute results to keep as full text before masking older ones. Default: 10), OPENGROK_SAMPLING_MAX_TOKENS (Maximum tokens for AI sampling responses (error explanation, query reformulation). Range: 64–4096), OPENGROK_AUDIT_LOG_FILE (Path to write structured audit events (CSV/JSON). Appends tool invocations, elicitation events, and errors. Leave unset to disable), OPENGROK_RATELIMIT_RPM (Maximum requests per minute to the OpenGrok server. Default: 60), OPENGROK_PER_TOOL_RATELIMIT (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 (HTTP request timeout in seconds for OpenGrok API calls. Increase for slow servers. Default: 30), OPENGROK_DEFAULT_MAX_RESULTS (Default maximum number of results returned per search query. Default: 25), OPENGROK_PASSWORD_FILE (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 (Hard cap on response payload size in bytes. Overrides the context-budget default. Non-positive values are ignored), OPENGROK_SEARCH_AND_READ_CAP (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 (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 (Expected JWT issuer (iss claim) for HTTP transport OAuth. When set, JWTs from other issuers are rejected), OPENGROK_GRAMMAR_DIR (Directory containing tree-sitter WASM grammars. Overrides the bundled grammar lookup).

Alternatives to OpenGrok MCP Server

same job, measured the same way
Searxng MCP
by aicrafted

MCP server for SearXNG aggregator — web search across multiple engines via Model Context Protocol

local only
Gemini
by houtini-ai

Model Context Protocol server for Google Gemini AI with chat, research, and grounding

5 335 installs/wk local only
Wet
by n24q02m

Open-source MCP server for AI agents: web search, content extraction, and library docs.

1 991 installs/wk local only
Wet MCP
by n24q02m

Open-source MCP server for AI agents: web search, content extraction, and library docs.

local only
SerpApi
by serpapi

Official SerpApi MCP server for Google, Bing, and other search engines.

3 tools answering
Styx MCP Server
by timmx7

MCP server for Styx — intelligent AI routing across OpenAI, Anthropic, Google, and Mistral.

45 installs/wk local only
Cituna MCP
by cituna

AI visibility MCP server: how 7 AI engines cite your brand daily, with Google Search Console.

1 188 installs/wk answering
Llmse
by llmse

Public MCP server for the LLM Search Engine

10 tools answering

OpenGrok MCP Server — questions

Answers built from our own checks of this server.

Why is there no uptime for OpenGrok MCP Server?
OpenGrok MCP Server runs on your own machine over stdio — there is no network address to reach, so uptime cannot be measured for it by anyone. What can be measured is adoption: the npm package opengrok-mcp-server was installed 167 times last week.
How do I connect OpenGrok MCP Server?
Copy the ready config from this page. We generate it for Claude Code, Claude Desktop, Codex, Cursor and VS Code, each in the form that client actually reads. It runs locally, so the command pulls opengrok-mcp-server straight from npm; nothing to host, nothing to sign up for.
How many people use OpenGrok MCP Server?
The npm package opengrok-mcp-server was installed 167 times in the last week. Week over week that is -5%. We show installs rather than GitHub stars on purpose: a star is a bookmark, an install is someone actually running it.
Is OpenGrok MCP Server open source?
No, and the distinction matters: its licence is declared as PolyForm-Noncommercial-1.0.0. That makes it source-available — you can read the code, but the terms are the author's own, not one of the recognised open-source licences. Read them before you build on it.