SkillAgentSearch skills...

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-mcp

If the server publishes to npm under a different name, use that package instead — check the repo README.

About this skill
🔌

MCP Server

Model Context Protocol server

Quality Score

83/100

Supported Platforms

Claude Code
Claude Desktop

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.

Substance
29/30
Structure
20/20
Description
15/15
Adoption
4/20
Freshness
15/15

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 found

Our 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.

SkillScoreStarsUpdatedFormat
opengrok-go-mcp (this skill)by rokasklive8310todayMCP Server
taste-skillby Leonxlnx100121.0ktodayCLAUDE.md
Agent-Reachby Panniantong100114.5ktodayCLAUDE.md
hyperframesby heygen-com10089.4ktodayCLAUDE.md
rufloby ruvnet10082.4ktodayCLAUDE.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.
<div align="center"> <img src="assets/groky.png" alt="opengrok-go-mcp mascot" width="400" />

opengrok-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/>

License Go CI MCP Evals

</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 legacy warning string)
  • 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.

<details> <summary><strong>Local clone</strong> (replace <code>go run</code> package path)</summary>

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

</details>

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=true is 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_URL with 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_SECRET for 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

View on GitHub
GitHub Stars10
CategoryDevelopment
Updated22h ago
Forks4

Languages

Go

Trust signals

97/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 info