Enables retrieval of commit history and Git blame annotations for source files indexed within OpenGrok.
Allows users to perform full-text searches, find symbol definitions, and browse file contents from OpenGrok directly within the GitHub Copilot Chat environment.
OpenGrok MCP Server
Search your OpenGrok code index directly from GitHub Copilot Chat
π Zero Install Β Β·Β π§ Compound Tools Β Β·Β π Auto-Updates Β Β·Β π Secure Credentials
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
Download the latest VSIX file from GitHub Releases.
Install it in VS Code:
Open the terminal in VS Code and run:
code --install-extension opengrok-mcp-server-X.Y.Z.vsixOR go to the Extensions tab β click the
Β·Β·Β·menu β Install from VSIXβ¦ and select the file.
Updates are automatic β the extension checks GitHub Releases once per day and offers one-click install.
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-*.vsixSetup & Configuration
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
Enable the Tools in Copilot (First Time Only):
Open GitHub Copilot Chat in Agent mode.
Click the
π§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 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 codebaseAvailable Tools
Core Tools
Tool | Description |
| Full-text, symbol definition, reference, path, or commit message search. Optional |
| Find files by path or name pattern. |
| Retrieve file contents β pass |
| Commit history for a file. |
| List directory contents. |
| List all accessible projects. |
| Git blame with optional line range. |
| List all top-level symbols in a file. |
| 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 |
|
| ~92% |
|
| ~92% |
| Multiple sequential | ~73% |
| Manual connection diagnostics | β |
file_type β 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.
Tool | Description |
| Compiler flags, include paths, defines, and language standard for a source file. Requires |
Extension Commands
Command | Description |
| Open visual configuration panel |
| Quick-configure via input prompts |
| Verify connectivity to OpenGrok |
| View MCP server diagnostic logs |
| Check GitHub Releases for new versions |
| Quick-pick menu (also accessible from status bar) |
Extension Settings
Name | Type | Default | Description |
|
| OpenGrok server URL | |
|
| Your username | |
|
|
| Verify SSL certificates |
|
| 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.
Architecture
βββββββββββββββββββ ββββββββββββββββββββββββββββββββ ββββββββββββββββ
β 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.
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 .vsixReleases 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.