opengrok-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@opengrok-mcpfind definition of function parse_input in the main project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenGrok mcp
This repository contains a Model Context Protocol server for allowing LLMs to query source code repositories. It exposes some basic OpenGrok functionality which an LLM can use to understand the codebase you are working on
Features
Allows LLMs to query OpenGrok to search for:
Definitions
Symbol searches
Full searches across projects
Project listings
It should also return clickable URLs for the user
Installation
Prerequisites
OpenGrok Server
Python3
uv
Related MCP server: OpenGrok MCP Server
Env Setup
git clone https://github.com/SleepyDog053/opengrok-mcp
cd opengrok-mcp
uv sync
source .venv/bin/activateMCP Clients
This can be run multiple MCP clients but may require editing to work elsewhere
1. Claude
{
"mcpServers": {
"opengrok": {
"command": "python",
"args": ["server.py"],
"env": {
"OPENGROK_BASE_URL": "http://localhost:8080",
"OPENGROK_TOKEN": "your-token-if-needed"
}
}
}
}2. Codex
[mcp_servers.OpenGrok]
command = "python"
args = ["/route/to/opengrok-mcp/server.py"]
[mcp_servers.OpenGrok.env]
OPENGROK_BASE_URL = "http://localhost:8080"
OPENGROK_TOKEN="your-token-if-needed"OpenGrok Gotchas
To be able to make OpenGrok query this correctly, you will need to send API requests to some restricted access API endpoints. These API endpoints require the use of a bearer API token. For development setups, it isn't always clear how to enable this
The best way to do this is to add a read-only configuration which gets merged with the main configuration. This configuration will look like:
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.8.0_121" class="java.beans.XMLDecoder">
<object class="org.opengrok.indexer.configuration.Configuration">
<!-- 1) Bearer tokens the webapp will accept for API calls -->
<void property="authenticationTokens">
<void method="add">
<string>your-token</string>
</void>
</void>
<!-- 2) Allow tokens over HTTP (dev only) -->
<void property="allowInsecureTokens">
<boolean>true</boolean>
</void>
</object>
</java>More details can be found here if needed
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceEnables LLMs to perform high-performance code search and analysis across multiple languages using symbol indexing, regex text search, and structural AST pattern matching. It also provides tools for technology stack detection and dependency analysis with persistent caching for optimized performance.6
- Alicense-qualityCmaintenanceOpenGrok 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.1925PolyForm Noncommercial 1.0.0
- Alicense-qualityAmaintenanceSource-code intelligence for agents, powered by OpenGrok and Go.4Apache 2.0
- Alicense-qualityBmaintenanceEnables LLM agents to efficiently understand and navigate a codebase by providing semantic search over symbols and a reference graph, replacing expensive grep/glob calls with structured tools like definition lookup, caller/callee queries, and change-impact analysis.1MIT
Related MCP Connectors
Search public open-source code, documentation, metadata, vulnerabilities, changelogs, and examples.
Search arXiv/Semantic Scholar/OpenAlex + medical evidence (PubMed/Europe PMC) + LaTeX/PDF tools.
LLM-ready web search + instant answers + URL-to-clean-text fetch for agents and RAG.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/SleepyDog053/opengrok-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server