opengrok-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| OPENGROK_URL | Yes | Base URL, e.g. https://opengrok.example.com | |
| OPENGROK_TOKEN | No | Bearer token, if the instance needs one. | |
| OPENGROK_PASSWORD | No | Basic auth password, if the instance needs it. | |
| OPENGROK_USERNAME | No | Basic auth username, if the instance needs it. | |
| OPENGROK_TIMEOUT_MS | No | Per-request timeout (default 30000). | 30000 |
| OPENGROK_INSTRUCTIONS | No | Free text appended to the server instructions the agent sees. Use it to describe your project layout (what each project is, naming conventions). | |
| OPENGROK_DEFAULT_PROJECT | No | Comma-separated default project(s). Empty means all projects. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| opengrok_searchA | Search source code. Provide at least one of full, def, symbol, path, hist; fields combine with AND.
|
| opengrok_find_fileA | Find files by path or file name. Returns file paths only. Examples: "main.cpp" (name), "*.sql" (wildcard), "src/net" (directory), "/.test..py/" (regex). Default scope: none (all projects). |
| opengrok_get_fileA | Read a file's content (line-numbered) by the full path returned from search, e.g. "//dir/file.c". Use start_line/end_line for large files; output is cut at 30000 characters. |
| opengrok_list_projectsA | List the project names available on the OpenGrok instance (valid values for the projects argument). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 4 tools
Each tool targets a distinct action: search content, read a file, find files by path, list projects. The only overlap is that opengrok_search's 'path' parameter can also filter by path, which could be confused with opengrok_find_file, but the descriptions clarify that search returns matching lines while find_file returns only paths.
All tools use the opengrok_ prefix and snake_case. Three follow verb_noun (get_file, find_file, list_projects), while search is just a verb, a minor deviation from the otherwise consistent pattern.
Four tools is well-scoped for a read-only code search server. Each tool has a clear, non-redundant role: search content, retrieve file contents, find files, and list projects.
The core read-only workflows (search, read, find, list projects) are covered. Minor gaps exist, such as no direct file history/blame tool and no explicit directory listing beyond find_file patterns, but agents can work around these with existing tools.