Phase 3: MCP server + external tool integration#2
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a Phase 3 planning document describing the intended MCP server/external-tool integration for Athena.
Changes:
- Add
plans/phase-3-mcp.mdoutlining MCP server/client components, proposed tools, a new dependency, and a manual verification checklist.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ## New Dep | ||
|
|
||
| `mcp>=1.0.0` |
There was a problem hiding this comment.
This plan introduces a new dependency (mcp>=1.0.0), but the repo manages runtime deps via backend/pyproject.toml's [project].dependencies. Consider noting that mcp must be added there (and, if applicable, pinned/qualified consistently with other deps) so the implementation step is unambiguous.
| `mcp>=1.0.0` | |
| Add `mcp` to `backend/pyproject.toml` under `[project].dependencies`, using a version constraint such as `mcp>=1.0.0` (pinned/qualified consistently with existing dependencies). |
| ## Athena as MCP Server: `backend/app/mcp/` | ||
|
|
||
| | File | Purpose | | ||
| |------|---------| | ||
| | `server.py` | MCP server using the `mcp` SDK. Exposes: `athena_search_documents`, `athena_research_question`, `athena_query_knowledge_graph`, `athena_ingest_document` | | ||
| | `tools.py` | JSON Schema tool definitions for all four tools | | ||
| | `backend/mcp_server.py` | Standalone entry point supporting stdio + SSE transport | | ||
|
|
||
| ## External MCP Client | ||
|
|
||
| - `backend/app/mcp/client.py` — MCP client for connecting to configured external MCP servers | ||
| - `backend/app/agents/tools.py` — LangChain tool wrappers: `web_search`, `verify_claim`, `fetch_url` | ||
| - `backend/app/agents/researcher.py` — Gets `web_search` + `fetch_url` tools from MCP client | ||
| - `backend/app/agents/fact_checker.py` — Gets `verify_claim` + `web_search` tools from MCP client | ||
| - `backend/app/config.py` — Add `mcp_servers: dict[str, str] = {}` mapping (name → URL) |
There was a problem hiding this comment.
PR description lists several new/updated code files (e.g., backend/app/mcp/server.py, backend/app/mcp/client.py, backend/mcp_server.py, config changes), but this PR diff only adds this plan document and the referenced paths do not currently exist in the repo. If the intent is to ship the MCP integration, the code changes appear to be missing from the PR; otherwise, please update the PR title/description to reflect that this is documentation/planning only.
81bc616 to
ac3518a
Compare
Summary
mcp_server.pyentry point supports both stdio and SSE transportKey files
backend/app/mcp/server.py— MCP server with 4 tools:athena_search_documents,athena_research_question,athena_query_knowledge_graph,athena_ingest_documentbackend/app/mcp/client.py— MCP client for external serversbackend/app/agents/tools.py— LangChain wrappers:web_search,verify_claim,fetch_urlbackend/mcp_server.py— standalone entry pointbackend/app/config.py—mcp_servers: dict[str, str]mappingTest plan
python backend/mcp_server.py→ connect from Claude Desktop → invokeathena_search_documents/api/research→ agent trace shows web search calls