An MCP server for searching and navigating source code indexed by OpenGrok
OpenGrok MCP has 10 tools with complete schemas and descriptions, but lacks several quality patterns essential for production use. All tools have names starting with action verbs (search, get, list, compare) which is good. Descriptions are present for all tools and most parameters, averaging 60-150 characters, within acceptable range but often generic. All tools have proper input schemas with typed parameters. However, the server lacks error guidance, output schema documentation, and structured error responses. No tool annotations (readOnlyHint/destructiveHint/idempotentHint) are present despite all tools being read-only. Parameter descriptions are present but often minimal (8-30 chars), not meeting the 20-character minimum for actionable guidance in several cases. No pagination support is visible despite tools like 'search' and 'search_enhanced' returning potentially large result sets. Output is returned as JSON strings rather than structured objects.
Compare two revisions of a file to show differences.
Get blame/annotation information for a file.
Get symbol definitions for a specific file.
Retrieve raw content of a specific file from OpenGrok.
Get revision history for a file or directory.
List entries in a directory.
List all projects indexed in this OpenGrok instance.
Missing tool annotations for read-only tools. No readOnlyHint attribute present despite all 10 tools being read-only (READ_ONLY risk). This prevents clients from rendering appropriate UI affordances and lets agents reason about side-effect safety.
No output schema documentation. Tools return JSON strings (via json.dumps) without describing the structure of results. LLMs cannot parse result fields reliably, forcing them to guess at field names and types. For example, 'search' returns results with file_path and hits, but this is not documented in the tool definition.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 59 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 0 | - | v1 |
Search for source code in OpenGrok using various fields.
Enhanced search with filters, pagination, and summarization.
Search for symbol definitions or references across indexed projects.
No pagination support despite tools returning potentially large result sets. 'search' and 'search_enhanced' have maxresults capped at 100, but no offset/page parameters or cursor support. Agents cannot iterate through results systematically.
Generic parameter descriptions too short to guide LLM behavior. Examples: 'Symbol definitions.' (19 chars), 'Symbol references.' (18 chars), 'File path pattern.' (18 chars). These fail to explain when to use this parameter vs others, valid formats, or examples.
No error recovery guidance. Functions return plain strings for errors (e.g., 'At least one of full, defs, refs, or path must be provided.', 'No results found.') with no next steps. LLMs have no actionable guidance on how to retry or adjust parameters.
Input validation happens inside tool but returns bare error strings rather than categorized errors (retryable vs user-fixable vs fatal). No status codes, no classification hints to guide agent behavior.