Skip to content
VS Code

OpenGrok MCP Server for VS Code

io.github.icyhot09/opengrok-mcp-server

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

client:VS Code transport:stdio runtime:npm

Install OpenGrok MCP Server in VS Code

.vscode/mcp.json

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

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

OpenGrok MCP Server in other clients