Local-first MCP server for AI coding agents. AST extraction, semantic search, cross-session memory. No API calls.
Context Brain has well-structured parameter schemas with proper types and descriptions across all 7 tools. Tool names follow verb_noun convention (list_files, get_file_context, search_codebase, save_memory, recall_memory, index_project). Descriptions are present and substantive (avg ~120 chars), explaining WHAT each tool does and WHEN to use it. However, output schemas are not documented, the code shows parameter structs but no explicit response schema definitions. Error handling is basic (McpError wrapping) without recovery guidance. No tool annotations (readOnlyHint/destructiveHint) despite clear risk classifications. Parameter descriptions could be more prescriptive about constraints (e.g., valid mode values for get_file_context are listed in description but not as enums). Overall solid foundation but missing production-grade polish.
Read file context. Modes: 'summary' (signatures), 'smart' (query-aware: full code for relevant functions), 'symbols' (compact list), 'full'.
Get symbol code by name. Returns exact code block, truncated to max_lines (default 50).
Build or rebuild the codebase index (AST extraction, embeddings, symbol database). Runs automatically on startup if not already indexed.
List project files. Respects .gitignore.
Recall memories from the cross-session store. Searches by semantic similarity + keyword match.
Save a memory (fact, insight, or decision) to the cross-session memory store. Automatically deduplicates near-duplicates and links contradictions.
Output schemas not documented. Code shows parameter structs but no explicit response schema definitions for any tool. LLMs cannot plan downstream calls or extract required fields without knowing what each tool returns.
Mode and detail parameters accept free-form strings instead of enums. get_file_context mode ('summary'|'smart'|'symbols'|'full') and search_codebase detail ('pointers'|'signatures'|'code') are documented in descriptions but not constrained as JSON Schema enums, inviting hallucinated values.
No tool annotations (readOnlyHint/destructiveHint/idempotentHint). Tools are marked with Risk classifications (READ_ONLY, WRITE) in metadata but not exposed via MCP tool annotations, preventing clients from applying safety policies.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 54 | <=2025-11-25 | v2 |
Search the codebase using semantic search (embeddings) + keyword matching. Returns file pointers, signatures, or code snippets.
Error handling lacks recovery guidance. McpError wrapping is present but error messages do not guide LLMs on next steps (e.g., 'Path escapes project directory' does not suggest alternatives or recovery actions).
Parameter constraints not fully specified. token_budget and max_results lack min/max bounds; max_lines defaults to 30 but 0 means 'full', this special case should be documented as an enum or explicit constraint.