Skip to main content
Glama
ANINDASAU

Multi-Agent Research Assistant MCP Server

by ANINDASAU

멀티 에이전트 리서치 어시스턴트 및 MCP 서버

이 프로젝트는 과제를 두 개의 작은 부분으로 구현합니다:

  1. 하나의 Supervisor와 두 명의 전문 작업자로 구성된 LangGraph 멀티 에이전트 워크플로.

  2. 두 개의 도구와 해당 도구를 호출하는 클라이언트를 갖춘 FastMCP 서버.

언어 모델은 Ollama이므로 OpenAI API 키가 필요하지 않습니다.

1. 이 프로젝트가 보여주는 것

Supervisor는 질문을 받고 적절한 작업자를 선택합니다:

User question
		 |
		 v
Supervisor Agent
		 |------------------------------|
		 v                              v
Research Agent                 Analysis Agent
		 |                              |
		 v                              v
Knowledge-base tool             Comparison tool

두 작업자가 모두 필요한 질문의 경우, Supervisor는 먼저 Research Agent에게 증거를 요청한 다음 그 증거를 Analysis Agent에 전달합니다.

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 .env

PowerShell에서 활성화가 허용되지 않는 경우, 모든 명령에 가상 환경을 직접 사용하십시오:

.\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:7b

5. 멀티 에이전트 어시스턴트 실행

연구 전용 질문을 실행합니다:

python main.py "What does MCP do?"

이 질문은 data/knowledge_base.txt를 검색하는 Research Agent로 라우팅되어야 합니다.

분석 질문을 실행합니다:

python main.py "Compare these two ideas: solar power uses sunlight; wind power uses moving air."

이 질문은 compare_texts를 사용하는 Analysis Agent로 라우팅되어야 합니다.

협업 질문을 실행합니다:

python main.py "Research solar and wind power, then compare their main trade-offs."

이 질문은 두 작업자가 모두 필요합니다. 예상 워크플로는 다음과 같습니다:

  1. Supervisor가 ask_research_agent를 호출합니다.

  2. Research Agent가 search_knowledge_base를 호출합니다.

  3. Supervisor가 증거를 ask_analysis_agent에 보냅니다.

  4. Analysis Agent가 compare_texts를 호출합니다.

  5. Supervisor가 최종 답변 하나를 반환합니다.

기본 질문은 인수 없이도 실행할 수 있습니다:

python main.py

6. MCP 데모 실행

클라이언트가 두 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 template

9. 과제 목표 체크리스트

과제 목표

구현

Supervisor 에이전트 구축

agents/supervisor.py

create_react_agent로 Research Agent 구축

agents/research_agent.py

create_react_agent로 Analysis Agent 구축

agents/analysis_agent.py

Research Agent에 정보 검색 도구 부여

tools/research_tool.pydata/knowledge_base.txt

Analysis Agent에 두 스니펫 비교 도구 부여

tools/analysis_tool.py

작업자를 Supervisor용 도구로 래핑

ask_research_agentask_analysis_agent

역할별 시스템 프롬프트 추가

각 에이전트 모듈이 자체 프롬프트를 정의

최소 두 개의 도구가 있는 MCP 서버 구축

mcp_server/server.py

도구를 호출하는 MCP 클라이언트 데모

mcp_client/client.py

연구, 분석, 협업 시나리오 테스트

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절의 협업 예제를 시도하십시오. 작거나 오래된 모델은 도구를 사용하지 않고 직접 답할 수 있습니다.

지식 베이스가 답변을 반환하지 않음

Research Agent는 로컬 파일만 검색합니다. data/knowledge_base.txt에 단락을 더 추가하고 질문을 다시 실행하십시오.

11. 중요한 범위 참고 사항

이것은 단순한 교육용 구현입니다. 지식 베이스는 목(mock) 로컬 데이터 소스이고, 날씨와 뉴스는 목 MCP 결과이며, LLM 라우팅은 Ollama로 수동 테스트됩니다. 결정적 도구는 자동화된 테스트로 다루어집니다.

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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