opengrok-go-mcp
A lightweight, token-efficient MCP server that gives AI coding agents powerful code search, navigation, and source intelligence through OpenGrok.
Install / Use
claude mcp add rokasklive -- npx -y github:rokasklive/opengrok-go-mcpIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of opengrok-go-mcp
opengrok-go-mcp scores 83/100 on our quality scale, 2991st of 4,706 Development & Engineering skills we index.
Its MCP Server is 7.8 KB long, well organised into 9 sections with 7 code examples: a thorough specification that gives an agent plenty to work with.
It has 10 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated today, so opengrok-go-mcp is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 97/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-11-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
opengrok-go-mcp compared with similar skills
All 4 of these similar skills score higher than opengrok-go-mcp; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| opengrok-go-mcp (this skill)by rokasklive | 83 | 10 | today | MCP Server |
| taste-skillby Leonxlnx | 100 | 121.0k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 114.5k | today | CLAUDE.md |
| hyperframesby heygen-com | 100 | 89.4k | today | CLAUDE.md |
| rufloby ruvnet | 100 | 82.4k | today | CLAUDE.md |
Frequently asked questions
- How do I install opengrok-go-mcp?
- Run
claude mcp add rokasklive -- npx -y github:rokasklive/opengrok-go-mcp. The install tabs above show the steps for each supported agent. - Which AI agents does opengrok-go-mcp work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is opengrok-go-mcp safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is Apache-2.0-licensed and scores 97/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is opengrok-go-mcp still maintained?
- The repository was last updated today, so opengrok-go-mcp is actively maintained.
Skill content
View source on GitHubopengrok-go-mcp
Source-code intelligence for agents, powered by OpenGrok and Go.
I have seen things you people wouldn’t grep. — Senior Architect, probably.
<br/> </div>Agent-oriented MCP server for searching, navigating, and reading code through OpenGrok.
It turns OpenGrok into a safer code-intelligence surface for LLM agents:
- capability-gated tools that only appear when the backing OpenGrok feature works
- paginated search and file reads with stable cursors
- source citations with file-level links and warnings when a fetched file no longer contains the indexed line
- warnings for broad, heuristic, truncated, or best-effort results (
warnings[]codes plus a legacywarningstring) - automatic context expansion around search hits with explicit limits
- full, compact, and experimental gateway tool surfaces for different agent styles
Pre-1.0 note: this MCP server is still evolving. Some tools, responses, and configuration paths may be broken or change before a stable 1.0 release. Please report issues on GitHub.
When To Use It
Use opengrok-go-mcp when you want an agent to investigate a large indexed
codebase without cloning it locally. It works best for finding symbols,
reading files, tracing references, narrowing broad searches, and producing
answers with source citations.
It is intentionally honest about OpenGrok's limits. OpenGrok provides full-text search plus ctags definitions, not a full semantic call graph or AST engine. For structural questions, use this server to find the right files and symbols, then verify relationships with language-aware tools when needed.
Client Setup
Required: OPENGROK_MCP_BASE_URL — OpenGrok API base URL ending in /api/v1. On
startup the server discovers projects, probes capabilities, and registers only tools that
work. A typical reverse-proxied instance needs nothing else.
Copy a block below, replace the URL, and restart the client. The go run and
go install commands require Go 1.26.0 or later. Release binaries are built
with the Go patch pinned in .go-version.
See docs/configuration.md for every environment variable.
<details> <summary><strong>Released binary</strong> (no Go install)</summary>Download the archive for your OS/arch from GitHub Releases, verify checksums.txt, and point your MCP client at the unpacked opengrok-go-mcp binary. Example (Claude Code):
{
"mcpServers": {
"opengrok": {
"command": "/path/to/opengrok-go-mcp",
"env": {
"OPENGROK_MCP_BASE_URL": "https://your-opengrok-host/source/api/v1"
}
}
}
}
</details>
<details open>
<summary><strong>Claude Code</strong> (<code>go run</code>)</summary>
Add to ~/.claude.json under mcpServers, or run claude mcp add:
{
"mcpServers": {
"opengrok": {
"command": "go",
"args": [
"run",
"github.com/rokasklive/opengrok-go-mcp/cmd/opengrok-go-mcp@v0.7.0"
],
"env": {
"OPENGROK_MCP_BASE_URL": "https://your-opengrok-host/source/api/v1"
}
}
}
}
</details>
<details>
<summary><strong>OpenCode</strong> (<code>go run</code>)</summary>
Add to opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"opengrok": {
"type": "local",
"enabled": true,
"command": [
"go",
"run",
"github.com/rokasklive/opengrok-go-mcp/cmd/opengrok-go-mcp@v0.7.0"
],
"environment": {
"OPENGROK_MCP_BASE_URL": "https://your-opengrok-host/source/api/v1"
}
}
}
}
</details>
<details>
<summary><strong>Codex</strong></summary>
Add to .codex/config.toml in the project root or ~/.codex/config.toml:
[[mcp_servers]]
name = "opengrok"
command = ["go", "run", "github.com/rokasklive/opengrok-go-mcp/cmd/opengrok-go-mcp@v0.7.0"]
[mcp_servers.env]
OPENGROK_MCP_BASE_URL = "https://your-opengrok-host/source/api/v1"
</details>
Other stdio clients (Cursor, VS Code, …) use the same command / args / env shape as Claude Code.
Use the same env / environment block as above. Example command for Claude Code:
"command": "sh",
"args": [
"-c",
"cd /path/to/opengrok-go-mcp && go run ./cmd/opengrok-go-mcp --read-timeout=30s --write-timeout=30s"
]
Optional HTTP mode from a clone:
OPENGROK_MCP_TRANSPORT=http \
OPENGROK_MCP_BASE_URL=https://your-opengrok-host/source/api/v1 \
go run ./cmd/opengrok-go-mcp
MCP endpoint: http://127.0.0.1:8765/mcp
Common environment variables
| Variable | Required | When to set |
|---|---|---|
| OPENGROK_MCP_BASE_URL | yes | OpenGrok API URL ending in /api/v1 |
| OPENGROK_MCP_API_TOKEN | no | Auth required, or startup logs 401/403 on probes. Full Authorization value: Bearer <token> or Basic <credentials>. Never logged. |
| OPENGROK_MCP_DEFAULT_PROJECT | no | Multiple projects and you want one implicit on calls that omit project. Auto-set when exactly one project is discovered. |
If search probes return 401/403 without a token, the server still starts and logs remediation;
search tools stay gated until OPENGROK_MCP_API_TOKEN is set.
Security
Avoid passing secrets as CLI flags. Use OPENGROK_MCP_API_TOKEN for OpenGrok auth;
the server never logs token values.
Operational caveats:
- HTTP mode does not add inbound client authentication. Keep the default loopback bind address or put it behind trusted network/auth controls.
OPENGROK_MCP_INSECURE_SKIP_TLS_VERIFY=trueis only for controlled internal instances with broken certificates. Do not use it for public or untrusted hosts.- Raw file fallback uses
OPENGROK_MCP_WEB_BASE_URLwith the same configured credentials. Treat that URL as part of the trusted OpenGrok boundary. - Memory tools are full-surface only (stdio). They are process-scoped, ephemeral, and disabled over HTTP because memory is not isolated by client session.
- Set
OPENGROK_MCP_CURSOR_SECRETfor shared deployments if cursor integrity matters.
Evaluation
Hermetic stdio evals in evals/ run the real binary against a fake
OpenGrok backend on every PR: MCP contract checks plus a token-economy
benchmark per surface.
go test ./evals/ -count=1
Development
See CONTRIBUTING.md.
Known Limitations
- Large project traversal is bounded, and some search and discovery operations are best-effort rather than language-semantic.
- HTTP transport is intended for controlled local or internal setups and does not add inbound client authentication.
See docs/limitations.md for the detailed current list, behavioral impact, and mitigations.
License
opengrok-go-mcp is licensed under the Apache License 2.0 (Apache-2.0) for
new releases starting with v0.3.0-beta.2.
Earlier published releases up to and including v0.3.0-beta.1 were released
under CC0-1.0 and remain available under those terms.
Related Skills
taste-skill
121.0kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
Agent-Reach
114.5kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
hyperframes
89.4kOpen-source AI video editor: edit your own footage, or create and remake any video with Claude Code, Codex or the free Studio app. Write HTML, render MP4. By HeyGen.
ruflo
82.4k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
