feat(mcp): F-14 MCP-server — read-only KB tools for LLM clients #4
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/F-14-mcp-server"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
codex/mcp_server.py: FastMCP server, 7 read-only tools (search, ask, wiki_read, wiki_list, discover_leads, provenance_verify, synthesis_browse)codex/config.py: MCP settings (mcp_transport, mcp_host, mcp_port, mcp_auth_token); F-13 duplicate block removedpyproject.toml:mcp[cli]>=1.0dep +codex-mcpconsole_scriptREADME.md: Claude Code.mcp.json+ Claude Desktop registration snippetstests/mcp/Key properties (Review-Gate verified)
test_readonly.py— fails if any write tool is added_require_http_token()raises before ASGI app starts; tested for missing + present token{"error": "not available"}, no crashp.bibkey IS NOT NULL; test asserts full key-set per resultGate result
APPROVE — all 4 CRITICAL + 4 WARN checks PASS
243 tests total · ruff + mypy clean
Implements F-14: thin FastMCP wrapper over existing codex domain modules. Seven read-only tools: search, ask, wiki_read, wiki_list, discover_leads, provenance_verify, synthesis_browse. All optional-feature tools degrade gracefully to {"error": "feature not available"} instead of crashing. Adds mcp[cli]>=1.0 dependency and codex-mcp console_script entry-point. 28 new tests across test_server, test_search, test_readonly, test_graceful, test_http_auth — all green; 0 regressions in existing 172 tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>