OpenGrok MCP Server

OpenGrok MCP Server

OpenGrok MCP Server is a native Model Context Protocol (MCP) VS Code extension that seamlessly bridges the gap between your organization's OpenGrok indices and GitHub Copilot Chat. It arms your AI assistant with the deep, instantaneous repository context required to traverse, understand, and search massive codebases using only natural language.

Category
Visit Server

README

<div align="center">

<img src="images/icon.png" width="120" alt="OpenGrok MCP Server icon">

OpenGrok MCP Server

Search your OpenGrok code index directly from GitHub Copilot Chat

VS Code Marketplace Installs npm CI GitHub Release

πŸ”Œ Zero Install Β Β·Β  🧠 Compound Tools Β Β·Β  πŸ”„ Auto-Updates Β Β·Β  πŸ”’ Secure Credentials

</div>


<details> <summary>πŸ“‹ Table of Contents</summary>

</details>


Do I need anything installed?

πŸ’‘ No. Installing the VSIX is enough. The MCP server is bundled inside the extension β€” no Python, no Node.js, no separate installs required.


Installation

Option 1 β€” VS Code Marketplace (Recommended)

Search for "OpenGrok Code Search for Copilot" in the VS Code Extensions panel (Ctrl+Shift+X) and click Install.

Option 2 β€” Install pre-built VSIX

  1. Download the latest VSIX file from GitHub Releases.
  2. Install it in VS Code:
    • Open the terminal in VS Code and run: code --install-extension opengrok-mcp-server-X.Y.Z.vsix
    • OR go to the Extensions tab β†’ click the Β·Β·Β· menu β†’ Install from VSIX… and select the file.
  3. Updates are automatic β€” the extension checks GitHub Releases once per day and offers one-click install.

<details> <summary>πŸ› οΈ Option 3 β€” Build from source <em>(For developers)</em></summary>

git clone https://github.com/IcyHot09/opengrok-mcp-server.git
cd opengrok-mcp-server
npm install
npm run vsix          # Creates opengrok-mcp-server-*.vsix
code --install-extension opengrok-mcp-server-*.vsix

</details>


Setup & Configuration

  1. Configure Credentials:

    • Upon installing, the Configuration Manager webview opens automatically.
    • Enter your OpenGrok server URL, username, and password, then click Save Settings. (Password is saved securely in the OS keychain.)
    • A connection test runs automatically. First-time setup requires a Reload Window to enable tools.
    • (Manage configuration later via the gear icon in the Status Bar, or OpenGrok: Manage Configuration in the Command Palette.)
  2. Enable the Tools in Copilot (First Time Only):

    • Open GitHub Copilot Chat in Agent mode.
    • Click the πŸ”§ (Tools icon) in the chat input box.
    • If you see Update Tools, click it first.
    • Check OpenGrok in the list and click Done.

⚠️ Tool selection is per workspace β€” re-enable in each new workspace as needed.

πŸ”Œ Using with Other MCP Clients

The standalone MCP server works with any MCP-compatible client:

Claude Code Β· Cursor Β· Windsurf Β· Claude Desktop Β· OpenCode Β· Google Antigravity

πŸ‘‰ See MCP_CLIENTS.md for the one-command installer, per-client config snippets, and security considerations.


Usage

In GitHub Copilot Chat, describe what you're looking for in natural language:

Use OpenGrok to search for RenderPipeline in the my-project project

Ask OpenGrok to show me the file at /path/to/file.cpp lines 100-200

Have OpenGrok find the definition of CacheManager and show me the header too

Search for all references to TaskScheduler across the codebase

Available Tools

Core Tools

Tool Description
search_code Full-text, symbol definition, reference, path, or commit message search. Optional file_type filter.
find_file Find files by path or name pattern.
get_file_content Retrieve file contents β€” pass start_line/end_line to limit output.
get_file_history Commit history for a file.
browse_directory List directory contents.
list_projects List all accessible projects.
get_file_annotate Git blame with optional line range.
get_file_symbols List all top-level symbols in a file.
search_suggest Autocomplete/suggestions for partial queries.

πŸš€ Compound Tools β€” Use These First

πŸ’‘ These collapse common multi-step patterns into a single call, saving ~75–92% of tokens.

Tool What it replaces Token savings
get_symbol_context search_code(defs) β†’ get_file_content β†’ search_code(refs) ~92%
search_and_read search_code β†’ get_file_content ~92%
batch_search Multiple sequential search_code calls ~73%
index_health Manual connection diagnostics β€”

file_type filter β€” search_code, batch_search, search_and_read, and get_symbol_context accept an optional file_type to restrict results by language: cxx, c, java, python, javascript, typescript, csharp, golang, ruby, perl, sql, xml, yaml, shell, makefile.

<details> <summary>βš™οΈ Local Source Layer (Optional)</summary>

Tool Description
get_compile_info Compiler flags, include paths, defines, and language standard for a source file. Requires compile_commands.json in your workspace.

</details>


Extension Commands

Command Description
OpenGrok: Manage Configuration Open visual configuration panel
OpenGrok: Configure Credentials Quick-configure via input prompts
OpenGrok: Test Connection Verify connectivity to OpenGrok
OpenGrok: Show Server Logs View MCP server diagnostic logs
OpenGrok: Check for Updates Check GitHub Releases for new versions
OpenGrok: Status Menu Quick-pick menu (also accessible from status bar)

Extension Settings

<details> <summary>View settings reference</summary>

Name Type Default Description
opengrok-mcp.baseUrl string OpenGrok server URL
opengrok-mcp.username string Your username
opengrok-mcp.verifySsl boolean false Verify SSL certificates
opengrok-mcp.proxy string HTTP proxy URL

Local Source Layer

The local layer is zero-config β€” if your workspace contains compile_commands.json, get_compile_info is enabled automatically.

</details>


Architecture

<details> <summary>View architecture diagram</summary>

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  GitHub Copilot │────▢│  opengrok-mcp-server (MCP)   │────▢│  OpenGrok    β”‚
β”‚  Chat           β”‚stdioβ”‚                              β”‚HTTP β”‚  Server      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚  Compound tools:             β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β–²               β”‚  Β· get_symbol_context        β”‚
        β”‚               β”‚  Β· search_and_read           β”‚     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚ configures    β”‚  Β· batch_search              │────▢│  Local FS    β”‚
        β”‚ + bundles     β”‚                              β”‚     β”‚  (optional)  β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚  Response cap: 16 KB         β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚  VS Code        β”‚     β”‚  MCP instructions block      β”‚
β”‚  Extension      β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The MCP server is compiled and bundled inside the VSIX as out/server/main.js. VS Code provides its own Node.js runtime β€” no separate installation needed.

</details>


Development

npm install
npm test          # Run unit tests (Vitest)
npm run lint      # TypeScript type-check + ESLint
npm run compile   # esbuild bundle
npm run vsix      # Package as .vsix

Releases are automated via GitHub Actions β€” push a version tag (vX.Y.Z) and the workflow builds, tests, and publishes to GitHub Releases.

See CONTRIBUTING.md for the full development guide.


License

This project is licensed under the PolyForm Noncommercial License 1.0.0.

This project is free for personal and non-commercial use. For enterprise or commercial licensing, please contact me at rudroy09@gmail.com.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured