opengrok-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
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-go-mcp
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 deployed
Maintenance
Related MCP Connectors
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Search public open-source code, documentation, metadata, vulnerabilities, changelogs, and examples.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Search indexed code, trace dependencies, assess change impact, and recall repository memory.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables 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.9MIT
- AlicenseNot gradedqualityAmaintenanceSource-code intelligence for agents, powered by OpenGrok and Go.10Apache 2.0
- AlicenseNot gradedqualityDmaintenanceQuery and explore code repositories in OpenGrok directly from VS Code using GitHub Copilot and the Model Context Protocol (MCP).167 npmPolyForm Noncommercial 1.0.0
- AlicenseAqualityCmaintenanceEnables AI agents to search and read source code indexed by an OpenGrok instance using its REST search and raw file APIs. Supports full-text, definition, symbol, path, and history searches with paging, plus file lookup and line-numbered reads.4GPL 3.0