Multi-Agent Research Assistant MCP Server
FastMCP server offering weather and news lookup tools, demonstrating MCP integration with a LangGraph multi-agent research workflow.
README
Multi-Agent Research Assistant & MCP Server
This project implements the assignment in two small parts:
- A LangGraph multi-agent workflow with one Supervisor and two specialist workers.
- A FastMCP server with two tools and a client that calls those tools.
The language model is Ollama, so no OpenAI API key is required.
1. What The Project Demonstrates
The Supervisor receives a question and chooses the appropriate worker:
User question
|
v
Supervisor Agent
|------------------------------|
v v
Research Agent Analysis Agent
| |
v v
Knowledge-base tool Comparison tool
For a question that needs both workers, the Supervisor asks the Research Agent for evidence first, then gives that evidence to the Analysis Agent.
The MCP part is independent of the LangGraph part:
MCP Client ---> FastMCP Server
|------ get_weather(city)
|------ get_news(topic)
2. Prerequisites
- Windows PowerShell
- Python 3.10 or newer
- Ollama
- An Ollama model such as
llama3.2
The repository already contains the requested virtual environment at multivenv.
3. Installation
Open PowerShell in the project directory:
cd D:\LLMEngg_8-Multi-Agent-Research-Assistant-MCP-Server
.\multivenv\Scripts\Activate.ps1
python -m pip install -r requirements.txt
Copy-Item .env.example .env
If PowerShell does not allow activation, use the virtual environment directly for every command:
.\multivenv\Scripts\python.exe -m pip install -r requirements.txt
Do not use a different system Python. Otherwise imports such as langchain_core may be missing.
4. Configure Ollama
Start Ollama in a separate terminal. If Ollama is already running as a desktop application, skip ollama serve.
ollama serve
ollama pull llama3.2
The default configuration in .env is:
OLLAMA_MODEL=llama3.2
OLLAMA_BASE_URL=http://localhost:11434
You can use another model, but it must support chat and tool calling well enough for LangGraph. For example:
OLLAMA_MODEL=qwen2.5:7b
5. Run The Multi-Agent Assistant
Run a research-only question:
python main.py "What does MCP do?"
This should route to the Research Agent, which searches data/knowledge_base.txt.
Run an analysis question:
python main.py "Compare these two ideas: solar power uses sunlight; wind power uses moving air."
This should route to the Analysis Agent, which uses compare_texts.
Run a collaboration question:
python main.py "Research solar and wind power, then compare their main trade-offs."
This question needs both workers. The expected workflow is:
- The Supervisor calls
ask_research_agent. - The Research Agent calls
search_knowledge_base. - The Supervisor sends the evidence to
ask_analysis_agent. - The Analysis Agent calls
compare_texts. - The Supervisor returns one final answer.
The default question can also be run without an argument:
python main.py
6. Run The MCP Demonstration
The client calls both FastMCP tools:
python -m mcp_client.client
Expected output is similar to:
Weather: Cloudy, 15 C
News: Mock headline: New developments in artificial intelligence are being monitored by the research team.
The client uses FastMCP's in-process client transport so the demonstration is reliable and easy to run locally. It still uses the real MCP client/server protocol. The standalone server can be started for an MCP-compatible host with:
python mcp_server/server.py
That standalone server uses MCP stdio transport.
7. Run Tests
python -m pytest -q
The tests cover the deterministic tools without requiring Ollama or a model download. The LangGraph construction can also be checked without making a model request:
$env:OLLAMA_MODEL = "llama3.2"
python -c "from agents.supervisor import build_supervisor; build_supervisor(); print('Supervisor created')"
8. File Structure
agents/
model.py Shared ChatOllama configuration
research_agent.py Research worker created with create_react_agent
analysis_agent.py Analysis worker created with create_react_agent
supervisor.py Supervisor and wrapped worker tools
tools/
research_tool.py Local knowledge-base lookup tool
analysis_tool.py Structured two-text comparison tool
data/
knowledge_base.txt Local evidence used by the Research Agent
mcp_server/
server.py FastMCP server and its two tools
mcp_client/
client.py Client demonstration calling both MCP tools
main.py Command-line entry point for the Supervisor
tests/ Deterministic tool tests
requirements.txt Python dependencies
.env.example Ollama configuration template
9. Assignment Objective Checklist
| Assignment objective | Implementation |
|---|---|
| Build a Supervisor agent | agents/supervisor.py |
Build a Research Agent with create_react_agent |
agents/research_agent.py |
Build an Analysis Agent with create_react_agent |
agents/analysis_agent.py |
| Give Research Agent an information-retrieval tool | tools/research_tool.py and data/knowledge_base.txt |
| Give Analysis Agent a two-snippet comparison tool | tools/analysis_tool.py |
| Wrap workers as tools for the Supervisor | ask_research_agent and ask_analysis_agent |
| Add role-specific system prompts | Each agent module defines its own prompt |
| Build an MCP server with at least two tools | mcp_server/server.py |
| Demonstrate an MCP client calling the tools | mcp_client/client.py |
| Test research, analysis, and collaboration scenarios | Commands in Section 5 |
10. Troubleshooting
No module named langchain_core
The system Python is being used. Activate multivenv or use the direct interpreter path:
.\multivenv\Scripts\python.exe main.py "What does MCP do?"
connection refused from Ollama
Start Ollama and confirm the model exists:
ollama serve
ollama list
ollama pull llama3.2
The model does not call tools
Use a tool-capable chat model, keep the question explicit, and try the collaboration example from Section 5. Small or older models may answer directly without using a tool.
The knowledge base returns no answer
The Research Agent only searches the local file. Add more paragraphs to data/knowledge_base.txt and rerun the question.
11. Important Scope Note
This is a simple educational implementation. The knowledge base is a mock local data source, weather and news are mock MCP results, and the LLM routing is tested manually with Ollama. The deterministic tools are covered by automated tests.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.