MCP server bridging OpenGrok search engine with AI for instant context across massive codebases.
registry version 9.6.0
npm
npx -y opengrok-mcp-servernpm
npx -y opengrok-mcp-server@9.6.0
Pick your client — the config below is generated for this server (local stdio). Copy respects the “Pin version” switch above.
claude_desktop_config.json
{
"mcpServers": {
"opengrok-mcp-server": {
"command": "npx",
"args": [
"-y",
"opengrok-mcp-server"
],
"env": {
"OPENGROK_BASE_URL": "<YOUR_OPENGROK_BASE_URL>",
"OPENGROK_PASSWORD": "<YOUR_OPENGROK_PASSWORD>"
}
}
}
}{
"mcpServers": {
"opengrok-mcp-server": {
"command": "npx",
"args": [
"-y",
"opengrok-mcp-server@9.6.0"
],
"env": {
"OPENGROK_BASE_URL": "<YOUR_OPENGROK_BASE_URL>",
"OPENGROK_PASSWORD": "<YOUR_OPENGROK_PASSWORD>"
}
}
}
}Format verified against the official Claude Desktop docs ↗.
terminal
claude mcp add --env OPENGROK_BASE_URL=<YOUR_OPENGROK_BASE_URL> --env OPENGROK_PASSWORD=<YOUR_OPENGROK_PASSWORD> opengrok-mcp-server -- npx -y opengrok-mcp-server
claude mcp add --env OPENGROK_BASE_URL=<YOUR_OPENGROK_BASE_URL> --env OPENGROK_PASSWORD=<YOUR_OPENGROK_PASSWORD> opengrok-mcp-server -- npx -y opengrok-mcp-server@9.6.0
Format verified against the official Claude Code docs ↗.
.cursor/mcp.json
{
"mcpServers": {
"opengrok-mcp-server": {
"command": "npx",
"args": [
"-y",
"opengrok-mcp-server"
],
"env": {
"OPENGROK_BASE_URL": "<YOUR_OPENGROK_BASE_URL>",
"OPENGROK_PASSWORD": "<YOUR_OPENGROK_PASSWORD>"
}
}
}
}{
"mcpServers": {
"opengrok-mcp-server": {
"command": "npx",
"args": [
"-y",
"opengrok-mcp-server@9.6.0"
],
"env": {
"OPENGROK_BASE_URL": "<YOUR_OPENGROK_BASE_URL>",
"OPENGROK_PASSWORD": "<YOUR_OPENGROK_PASSWORD>"
}
}
}
}Format verified against the official Cursor docs ↗.
.vscode/mcp.json
{
"servers": {
"opengrok-mcp-server": {
"command": "npx",
"args": [
"-y",
"opengrok-mcp-server"
],
"env": {
"OPENGROK_BASE_URL": "<YOUR_OPENGROK_BASE_URL>",
"OPENGROK_PASSWORD": "<YOUR_OPENGROK_PASSWORD>"
}
}
}
}{
"servers": {
"opengrok-mcp-server": {
"command": "npx",
"args": [
"-y",
"opengrok-mcp-server@9.6.0"
],
"env": {
"OPENGROK_BASE_URL": "<YOUR_OPENGROK_BASE_URL>",
"OPENGROK_PASSWORD": "<YOUR_OPENGROK_PASSWORD>"
}
}
}
}Format verified against the official VS Code docs ↗.
mcp_config.json
{
"mcpServers": {
"opengrok-mcp-server": {
"command": "npx",
"args": [
"-y",
"opengrok-mcp-server"
],
"env": {
"OPENGROK_BASE_URL": "<YOUR_OPENGROK_BASE_URL>",
"OPENGROK_PASSWORD": "<YOUR_OPENGROK_PASSWORD>"
}
}
}
}{
"mcpServers": {
"opengrok-mcp-server": {
"command": "npx",
"args": [
"-y",
"opengrok-mcp-server@9.6.0"
],
"env": {
"OPENGROK_BASE_URL": "<YOUR_OPENGROK_BASE_URL>",
"OPENGROK_PASSWORD": "<YOUR_OPENGROK_PASSWORD>"
}
}
}
}Format verified against the official Windsurf docs ↗.
Defined in the server's official registry manifest. Required secrets are shown as <YOUR_…> placeholders in the configs above.
OPENGROK_BASE_URL required — OpenGrok server base URL (e.g. https://opengrok.example.com/source/)OPENGROK_USERNAME — OpenGrok authentication username. Leave unset for anonymous access.OPENGROK_PASSWORD secret — 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.⭐ 8 stars · 最近更新于 34 天前
These star and push figures are for the shared repository — 2 listings on this site point at the same repository.
OpenGrok MCP Server Code intelligence for any OpenGrok indexed codebase — search, read, blame, symbol navigation, diffs, commit history, call graphs, dependency maps, and guided investigation. Optimized for tok…
Summary from the project README — github.com/IcyHot09/opengrok-mcp-server
Distributed as npm, listed under Search. Review our MCP security guide before granting access to real data.
OpenGrok MCP Server Code intelligence for any OpenGrok indexed codebase — search, read, blame, symbol navigation, diffs, commit history, call graphs, dependency maps, and guided investigation. Optimized for tok
Run the install command shown above, then paste the config for your client (Claude Desktop, Claude Code, Cursor, VS Code or Windsurf) into its MCP settings and restart the client.
The MCP server itself is free to install. The source is public on https://github.com/IcyHot09/opengrok-mcp-server. Any third-party service it calls may require its own API key and account.
Any MCP-compatible client can use it, including Claude Desktop, Claude Code, Cursor, VS Code, Windsurf and custom agents.
Publish this server? Link back with a badge on your README or site — copy either snippet.
Markdown
[](https://mcpnav.net/server/opengrok-mcp-server/)
HTML
<a href="https://mcpnav.net/server/opengrok-mcp-server/"><img src="https://mcpnav.net/badge/opengrok-mcp-server.svg" alt="Listed on MCPNav" height="20"></a>