Skip to content

feat: MCP read server — agents query KB via MCP protocol #13

Description

@rajnavakoti

Description

Add an MCP (Model Context Protocol) server that exposes the KB as read-only tools for AI agents. Any MCP-compatible client (Claude Code, Cursor, Windsurf) can connect and query entities, ask questions, get gap reports, and browse the knowledge graph. The FastAPI endpoints (/ask, /stats, /health) already exist — this wraps them in MCP protocol.

Acceptance Criteria

  • MCP server starts via cb mcp-serve or as part of cb serve --mcp
  • Tool: query_kb(question) — ask a natural language question, get grounded answer with citations
  • Tool: get_entity(type, id) — retrieve a specific entity by type and ID
  • Tool: list_entities(type?) — list entities, optionally filtered by type
  • Tool: get_gaps() — return known gaps (MISSING + INCOMPLETE items from last eval)
  • Tool: get_stats() — return KB statistics (entity counts by type, coverage scores)
  • MCP server config can be added to .mcp.json or ~/.claude.json for auto-discovery
  • Works with the block scoping system (serves one block at a time or accepts block parameter)

Out of Scope

  • MCP write tools (separate P1 issue)
  • Authentication/authorization
  • Multi-block simultaneous serving

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0-shipMust ship for OSS releaseframeworkScientific frameworksossOSS readiness

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions