Skip to content

Phase 3: MCP server + external tool integration#2

Closed
RahulModugula wants to merge 0 commit into
mainfrom
phase/3-mcp-integration
Closed

Phase 3: MCP server + external tool integration#2
RahulModugula wants to merge 0 commit into
mainfrom
phase/3-mcp-integration

Conversation

@RahulModugula

Copy link
Copy Markdown
Owner

Summary

  • Exposes Athena as an MCP server so Claude Desktop and other agents can call it directly
  • Lets Athena's researcher and fact-checker agents call external MCP tools (web search, claim verification, URL fetch)
  • Standalone mcp_server.py entry point supports both stdio and SSE transport

Key files

  • backend/app/mcp/server.py — MCP server with 4 tools: athena_search_documents, athena_research_question, athena_query_knowledge_graph, athena_ingest_document
  • backend/app/mcp/client.py — MCP client for external servers
  • backend/app/agents/tools.py — LangChain wrappers: web_search, verify_claim, fetch_url
  • backend/mcp_server.py — standalone entry point
  • backend/app/config.pymcp_servers: dict[str, str] mapping

Test plan

  • python backend/mcp_server.py → connect from Claude Desktop → invoke athena_search_documents
  • Enable web search MCP server → run /api/research → agent trace shows web search calls
  • All existing tests pass

Copilot AI review requested due to automatic review settings March 24, 2026 04:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md outlining 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.

Comment thread plans/phase-3-mcp.md Outdated

## New Dep

`mcp>=1.0.0`

Copilot AI Mar 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
`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).

Copilot uses AI. Check for mistakes.
Comment thread plans/phase-3-mcp.md Outdated
Comment on lines +5 to +19
## 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)

Copilot AI Mar 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@RahulModugula
RahulModugula force-pushed the phase/3-mcp-integration branch from 81bc616 to ac3518a Compare March 24, 2026 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants