Multi-Agent Research Assistant MCP Server
マルチエージェントリサーチアシスタント & MCPサーバー
このプロジェクトは、この課題を2つの小さな部分に分けて実装しています。
1つのスーパーバイザーと2つの専門ワーカーを持つLangGraphマルチエージェントワークフロー。
2つのツールと、それらのツールを呼び出すクライアントを持つFastMCPサーバー。
言語モデルはOllamaを使用するため、OpenAI APIキーは不要です。
1. このプロジェクトが示すもの
スーパーバイザーは質問を受け取り、適切なワーカーを選択します。
User question
|
v
Supervisor Agent
|------------------------------|
v v
Research Agent Analysis Agent
| |
v v
Knowledge-base tool Comparison tool両方のワーカーが必要な質問の場合、スーパーバイザーはまずリサーチエージェントに証拠を要求し、その証書をアナリシスエージェントに渡します。
MCP部分はLangGraph部分から独立しています。
MCP Client ---> FastMCP Server
|------ get_weather(city)
|------ get_news(topic)Related MCP server: AIE8-MCP Server
2. 前提条件
Windows PowerShell
Python 3.10以降
Ollama
llama3.2などのOllamaモデル
リポジトリには、要求された仮想環境がすでにmultivenvに含まれています。
3. インストール
プロジェクトディレクトリでPowerShellを開きます。
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 .envPowerShellでアクティベーションが許可されない場合は、すべてのコマンドで仮想環境を直接使用してください。
.\multivenv\Scripts\python.exe -m pip install -r requirements.txt別のシステムPythonを使用しないでください。そうしないと、langchain_coreなどのインポートが見つからない場合があります。
4. Ollamaの設定
別のターミナルでOllamaを起動します。Ollamaがデスクトップアプリケーションとしてすでに実行されている場合は、ollama serveをスキップしてください。
ollama serve
ollama pull llama3.2.envのデフォルト設定は次のとおりです。
OLLAMA_MODEL=llama3.2
OLLAMA_BASE_URL=http://localhost:11434別のモデルを使用することもできますが、LangGraphで十分に機能するチャットとツール呼び出しをサポートしている必要があります。例:
OLLAMA_MODEL=qwen2.5:7b5. マルチエージェントアシスタントの実行
リサーチ専用の質問を実行します。
python main.py "What does MCP do?"これはリサーチエージェントにルーティングされ、data/knowledge_base.txtを検索します。
分析の質問を実行します。
python main.py "Compare these two ideas: solar power uses sunlight; wind power uses moving air."これはアナリシスエージェントにルーティングされ、compare_textsを使用します。
コラボレーションの質問を実行します。
python main.py "Research solar and wind power, then compare their main trade-offs."この質問には両方のワーカーが必要です。期待されるワークフローは次のとおりです。
スーパーバイザーが
ask_research_agentを呼び出します。リサーチエージェントが
search_knowledge_baseを呼び出します。スーパーバイザーが証書を
ask_analysis_agentに送信します。アナリシスエージェントが
compare_textsを呼び出します。スーパーバイザーが最終的な回答を1つ返します。
デフォルトの質問は、引数なしでも実行できます。
python main.py6. MCPデモの実行
クライアントは2つのFastMCPツールを呼び出します。
python -m mcp_client.client期待される出力は次のようになります。
Weather: Cloudy, 15 C
News: Mock headline: New developments in artificial intelligence are being monitored by the research team.クライアントはFastMCPのインプロセスクライアント転送を使用するため、デモは信頼性が高く、ローカルで簡単に実行できます。それでも実際のMCPクライアント/サーバープロトコルを使用します。スタンドアロンサーバーは、MCP互換ホスト用に次のコマンドで起動できます。
python mcp_server/server.pyそのスタンドアロンサーバーはMCP stdio転送を使用します。
7. テストの実行
python -m pytest -qテストは、Ollamaやモデルのダウンロードを必要とせずに、決定論的なツールをカバーしています。LangGraphの構築も、モデルリクエストを行わずに確認できます。
$env:OLLAMA_MODEL = "llama3.2"
python -c "from agents.supervisor import build_supervisor; build_supervisor(); print('Supervisor created')"8. ファイル構成
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 template9. 課題の目的のチェックリスト
課題の目的 | 実装 |
スーパーバイザーエージェントを構築する |
|
|
|
|
|
リサーチエージェントに情報検索ツールを提供する |
|
アナリシスエージェントに2つのスニペットを比較するツールを提供する |
|
ワーカーをスーパーバイザー用のツールとしてラップする |
|
ロール固有のシステムプロンプトを追加する | 各エージェントモジュールが独自のプロンプトを定義 |
少なくとも2つのツールを持つMCPサーバーを構築する |
|
ツールを呼び出すMCPクライアントをデモする |
|
リサーチ、分析、コラボレーションのシナリオをテストする | セクション5のコマンド |
10. トラブルシューティング
No module named langchain_core
システムのPythonが使用されています。multivenvをアクティブにするか、直接インタープリタのパスを使用してください。
.\multivenv\Scripts\python.exe main.py "What does MCP do?"Ollamaからのconnection refused
Ollamaを起動し、モデルが存在することを確認してください。
ollama serve
ollama list
ollama pull llama3.2モデルがツールを呼び出さない
ツール対応のチャットモデルを使用し、質問を明確にして、セクション5のコラボレーションの例を試してください。小さいモデルや古いモデルは、ツールを使用せずに直接回答する場合があります。
ナレッジベースが回答を返さない
リサーチエージェントはローカルファイルのみを検索します。data/knowledge_base.txtに段落を追加して、質問を再実行してください。
11. 重要な範囲の注記
これは単純な教育用の実装です。ナレッジベースはモックのローカルデータソースであり、天気とニュースはモックのMCP結果であり、LLMルーティングはOllamaを使用して手動でテストされています。決定論的なツールは自動テストでカバーされています。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseBqualityDmaintenanceA FastMCP server providing real-time weather, news retrieval, and local note management tools for autonomous CrewAI agents. It enables context-aware multi-agent workflows with observability and high-speed inference integration.4
- FlicenseBqualityDmaintenanceAn MCP server that provides web search capabilities through the Tavily API and weather data retrieval tools. It demonstrates how to integrate external APIs into AI applications and build agentic workflows with LangGraph.3
- Flicense-qualityDmaintenanceAn MCP server that provides weather and web search tools, orchestrated by a LangGraph agent with OpenAI for natural language interaction.8
- Flicense-qualityCmaintenanceAn MCP server with six tools including web search, URL fetching, math calculation, and note management. Designed for a live-coding demo integrating FastMCP with LangGraph ReAct agents.8
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
Hosted MCP endpoint with realistic fake data for prototyping agents. 12 tools, no setup.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ANINDASAU/LLMEngg_8-Multi-Agent-Research-Assistant-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server