Back to Browse

Opengrok MCP Server

Developer ToolsLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

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

About

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

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (1 strong, 1 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry.

3 files analyzed · 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

file_system

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

OpenGrok server base URL (e.g. https://opengrok.example.com/source/)Optional

Environment variable: OPENGROK_BASE_URL

OpenGrok authentication username. Leave unset for anonymous access.Optional

Environment variable: OPENGROK_USERNAME

OpenGrok authentication password. Prefer storing via OS keychain using 'npx opengrok-mcp-server setup'.Required

Environment variable: OPENGROK_PASSWORD

Verify TLS certificates. Set to false for self-signed or internal CA certs.Optional

Environment variable: OPENGROK_VERIFY_SSL

Enable Code Mode: 2-tool sandbox interface with env.opengrok.* JavaScript API. Reduces AI token usage by ~90%.Optional

Environment variable: OPENGROK_CODE_MODE

Register the 3 memory tools in Code Mode (memory status, read, update). Off = api + execute only.Optional

Environment variable: OPENGROK_ENABLE_MEMORY_TOOLS

Default project to scope all searches. Can be overridden per call.Optional

Environment variable: OPENGROK_DEFAULT_PROJECT

Response size tier controlling token usage.Optional

Environment variable: OPENGROK_CONTEXT_BUDGET

OpenGrok REST API version. Use v2 for call graph features (requires OpenGrok 1.12+).Optional

Environment variable: OPENGROK_API_VERSION

HTTP/HTTPS proxy URL for all OpenGrok API requests (e.g. http://proxy.company.com:8080). Also set as HTTPS_PROXY.Optional

Environment variable: HTTP_PROXY

Force a specific response format for all tools. Leave unset for per-tool auto-selection (recommended).Optional

Environment variable: OPENGROK_RESPONSE_FORMAT_OVERRIDE

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.Optional

Environment variable: OPENGROK_MEMORY_BANK_DIR

Comma-separated paths to compile_commands.json for C/C++ compiler flag and include-path extraction. Leave unset for automatic workspace discovery.Optional

Environment variable: OPENGROK_LOCAL_COMPILE_DB_PATHS

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.Optional

Environment variable: OPENGROK_ENABLE_ELICITATION

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).Optional

Environment variable: OPENGROK_ENABLE_SAMPLING

Model preference for MCP Sampling (used for error explanation and query reformulation).Optional

Environment variable: OPENGROK_SAMPLING_MODEL

Files API Cache — avoids re-uploading unchanged investigation notes. Requires Files API support in the MCP client.Optional

Environment variable: OPENGROK_ENABLE_FILES_API

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).Optional

Environment variable: OPENGROK_ENABLE_OBSERVATION_MASKER

Number of most-recent opengrok_execute results to keep as full text before masking older ones. Default: 10.Optional

Environment variable: OPENGROK_OBSERVATION_MASKER_TURNS

Maximum tokens for AI sampling responses (error explanation, query reformulation). Range: 64–4096.Optional

Environment variable: OPENGROK_SAMPLING_MAX_TOKENS

Path to write structured audit events (CSV/JSON). Appends tool invocations, elicitation events, and errors. Leave unset to disable.Optional

Environment variable: OPENGROK_AUDIT_LOG_FILE

Maximum requests per minute to the OpenGrok server. Default: 60.Optional

Environment variable: OPENGROK_RATELIMIT_RPM

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.Optional

Environment variable: OPENGROK_PER_TOOL_RATELIMIT

HTTP request timeout in seconds for OpenGrok API calls. Increase for slow servers. Default: 30.Optional

Environment variable: OPENGROK_TIMEOUT

Default maximum number of results returned per search query. Default: 25.Optional

Environment variable: OPENGROK_DEFAULT_MAX_RESULTS

Path to a file containing the OpenGrok password (file-mounted secret for containers). Takes precedence over the OS keychain when OPENGROK_PASSWORD is unset.Optional

Environment variable: OPENGROK_PASSWORD_FILE

Hard cap on response payload size in bytes. Overrides the context-budget default. Non-positive values are ignored.Optional

Environment variable: OPENGROK_MAX_RESPONSE_BYTES

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.Optional

Environment variable: OPENGROK_SEARCH_AND_READ_CAP

When true, reject OPENGROK_BASE_URL values pointing at private/loopback IPs at startup. Default: false (warn only; per-request guards still apply).Optional

Environment variable: OPENGROK_STRICT_SSRF

Expected JWT issuer (iss claim) for HTTP transport OAuth. When set, JWTs from other issuers are rejected.Optional

Environment variable: OPENGROK_JWT_ISSUER

Directory containing tree-sitter WASM grammars. Overrides the bundled grammar lookup.Optional

Environment variable: OPENGROK_GRAMMAR_DIR

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-icyhot09-opengrok-mcp-server": {
      "env": {
        "HTTP_PROXY": "your-http-proxy-here",
        "OPENGROK_TIMEOUT": "your-opengrok-timeout-here",
        "OPENGROK_BASE_URL": "your-opengrok-base-url-here",
        "OPENGROK_PASSWORD": "your-opengrok-password-here",
        "OPENGROK_USERNAME": "your-opengrok-username-here",
        "OPENGROK_CODE_MODE": "your-opengrok-code-mode-here",
        "OPENGROK_JWT_ISSUER": "your-opengrok-jwt-issuer-here",
        "OPENGROK_VERIFY_SSL": "your-opengrok-verify-ssl-here",
        "OPENGROK_API_VERSION": "your-opengrok-api-version-here",
        "OPENGROK_GRAMMAR_DIR": "your-opengrok-grammar-dir-here",
        "OPENGROK_STRICT_SSRF": "your-opengrok-strict-ssrf-here",
        "OPENGROK_PASSWORD_FILE": "your-opengrok-password-file-here",
        "OPENGROK_RATELIMIT_RPM": "your-opengrok-ratelimit-rpm-here",
        "OPENGROK_AUDIT_LOG_FILE": "your-opengrok-audit-log-file-here",
        "OPENGROK_CONTEXT_BUDGET": "your-opengrok-context-budget-here",
        "OPENGROK_SAMPLING_MODEL": "your-opengrok-sampling-model-here",
        "OPENGROK_DEFAULT_PROJECT": "your-opengrok-default-project-here",
        "OPENGROK_ENABLE_SAMPLING": "your-opengrok-enable-sampling-here",
        "OPENGROK_MEMORY_BANK_DIR": "your-opengrok-memory-bank-dir-here",
        "OPENGROK_ENABLE_FILES_API": "your-opengrok-enable-files-api-here",
        "OPENGROK_ENABLE_ELICITATION": "your-opengrok-enable-elicitation-here",
        "OPENGROK_MAX_RESPONSE_BYTES": "your-opengrok-max-response-bytes-here",
        "OPENGROK_PER_TOOL_RATELIMIT": "your-opengrok-per-tool-ratelimit-here",
        "OPENGROK_DEFAULT_MAX_RESULTS": "your-opengrok-default-max-results-here",
        "OPENGROK_ENABLE_MEMORY_TOOLS": "your-opengrok-enable-memory-tools-here",
        "OPENGROK_SAMPLING_MAX_TOKENS": "your-opengrok-sampling-max-tokens-here",
        "OPENGROK_SEARCH_AND_READ_CAP": "your-opengrok-search-and-read-cap-here",
        "OPENGROK_LOCAL_COMPILE_DB_PATHS": "your-opengrok-local-compile-db-paths-here",
        "OPENGROK_OBSERVATION_MASKER_TURNS": "your-opengrok-observation-masker-turns-here",
        "OPENGROK_RESPONSE_FORMAT_OVERRIDE": "your-opengrok-response-format-override-here",
        "OPENGROK_ENABLE_OBSERVATION_MASKER": "your-opengrok-enable-observation-masker-here"
      },
      "args": [
        "-y",
        "opengrok-mcp-server"
      ],
      "command": "npx"
    }
  }
}

Reviews

No reviews yet

Be the first to review this server!