mcp-research-collective
mcp-research-collective
Model Context Protocol(MCP)을 기반으로 구축된 다중 에이전트 연구 시스템입니다. 전문 에이전트(기획자 → 연구원 → 추론자)가 공유 신념의 스레드 안전 블랙보드를 통해 협업하며, Claude Desktop이나 다른 MCP 호스트에 연결할 수 있는 MCP 도구로 노출됩니다.
이 프로젝트가 보여주는 것
Model Context Protocol — 7개의 도구(
blackboard_set,blackboard_get,blackboard_query,blackboard_dump및add/subtract/multiply/divide)를 갖춘 실제 실행 가능한 FastMCP 서버입니다.블랙보드 아키텍처 — 스레드 안전 공유 신념 저장소(
Belief데이터 클래스 +RLock으로 보호된 upsert/read/query, TTL, 정규식 쿼리 및 태그 필터 기능을 갖춘Blackboard클래스).다중 에이전트 오케스트레이션 — 기획자가 프롬프트를 분해하고 → 연구원이 JSON KB에서 사실을 가져오며 → 추론자가 최종 답변을 종합합니다. 에이전트는 커넥터에 대해서만 알 뿐 서로를 알지 못하며, 오직 블랙보드를 통해서만 조정됩니다.
두 가지 상호 교환 가능한 전송 방식 — 빠른 노트북/테스트 실행을 위한 인프로세스
MCPConnector와 프로덕션/Claude Desktop 통합을 위한 실제 STDIOFastMCP서버.
Related MCP server: deep-research
기술 스택
Model Context Protocol Python SDK (
mcp[cli]) —FastMCP서버,ClientSession, STDIO 전송Python 3.10+,
asyncio,threading.RLock결정론적 블랙보드/에이전트 테스트를 위한 pytest
LLM 의존성 없음 — 이 데모의 에이전트는 구조화된 KB를 통해 오케스트레이션합니다. MCP 서버는 사용자(또는 모든 MCP 호스트)가 LLM을 연결할 수 있는 인터페이스입니다.
아키텍처
flowchart TB
U[User Prompt] --> P[PlannerAgent<br/>decomposes into subtasks]
P -->|publishes 'task.list'| BB[(Blackboard<br/>thread-safe<br/>belief store)]
BB -->|reads tasks| R[ResearchAgent<br/>fetches from kb/*.json]
R -->|publishes belief.what / why / how| BB
BB -->|reads beliefs| S[ReasonerAgent<br/>synthesizes answer]
S -->|publishes answer.v1| BB
S --> Out[Final answer<br/>+ full blackboard state]
subgraph "MCP Surface"
BB <-->|set/get/query/dump| MCP[FastMCP server<br/>STDIO transport]
MCP <-->|JSON-RPC| Claude[Claude Desktop /<br/>any MCP host]
end빠른 시작
# 1. Python env
python -m venv .venv
source .venv/Scripts/activate # Windows: .venv\Scripts\activate
pip install -e .[dev]
# 2. Run the deterministic tests
pytest
# 3. Run the in-process orchestrator from the CLI
mcp-research-orchestrator "What is a Faculty Senate, why have one, and how is it built?"
# 4. Run the standalone MCP server (for Claude Desktop or another MCP host)
mcp-research-collective프로그래밍 방식 사용 (인프로세스, STDIO 없음)
from mcp_research_collective import run_collective
answer, blackboard_state_json = run_collective(
"What is the role of a Faculty Senate and why have one?"
)
print(answer)
# # Synthesized Answer
#
# **What it is**
# - Elected body of faculty that represents the academic community...
# ...
# **Why it matters**
# - Ensures academic decisions are not solely administrative
# ...Claude Desktop과 함께 사용
이것이 차별점입니다. 인프로세스 데모를 실행하는 동일한 코드가 Claude Desktop에 연결할 수 있는 작동하는 MCP 서버이기도 합니다. claude_desktop_config.json에 다음을 추가하세요:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"research-collective": {
"command": "python",
"args": ["-m", "mcp_research_collective.entrypoints.run_server"],
"env": {
"PYTHONPATH": "/absolute/path/to/mcp-research-collective/src"
}
}
}
}Claude Desktop을 재시작하면 Claude UI에서 4개의 blackboard_* 도구와 4개의 수학 도구를 사용할 수 있습니다. 다음을 시도해 보세요:
blackboard_set도구를 사용하여 내 프로젝트 마감일에 대한 사실을 게시한 다음,blackboard_query를 사용하여 다시 찾아보세요.
새로운 연구 주제 추가
src/mcp_research_collective/kb/에 다음 스키마를 가진 JSON 파일을 넣으세요:
{
"key": "topic.subkey",
"what": ["fact 1", "fact 2"],
"why": ["fact 1", "fact 2"],
"how": ["fact 1", "fact 2"]
}그런 다음 topic_key="topic.subkey"로 오케스트레이터를 구성하세요. 코드 변경은 필요하지 않습니다.
배운 점
블랙보드를 사용하는 기획자→연구원→추론자 패턴은 각 에이전트의 책임을 격리된 상태에서 추론할 수 있을 만큼 작게 만듭니다. 시스템은 프롬프트에 따라 동적으로 노력을 확장합니다. "무엇"과 "왜"만 물어보면 기획자는 define.what과 explain.why만 게시합니다. 연구원은 필요한 것만 정확히 가져오며, 블랙보드는 이러한 선택적 컨텍스트 수집을 추적합니다.
가장 큰 성과는 MCP 와이어 형식이 아니라 모든 상태 변경을 mcp.call("blackboard.set", ...)을 통하도록 강제한 규율입니다. 그 단일 병목 지점 덕분에 전체 시스템을 관찰하기가 매우 쉬워졌습니다. dump_state()는 각 에이전트가 언제, 어떤 확신을 가지고 무엇을 기여했는지 정확히 보여줍니다. 네 번째 에이전트(예: 비평가 또는 캐시)를 추가하는 것도 계약이 단순히 "태그된 신념 읽기, 태그된 신념 쓰기"이기 때문에 간단합니다.
프로젝트 레이아웃
mcp-research-collective/
├── src/mcp_research_collective/
│ ├── blackboard.py # Belief + thread-safe Blackboard
│ ├── connector.py # In-process MCPConnector (set/get/query/dump)
│ ├── kb/*.json # Knowledge base topics (drop-in JSON files)
│ ├── knowledge_base.py # Loader for kb/*.json
│ ├── agents.py # PlannerAgent, ResearchAgent, ReasonerAgent
│ ├── orchestrator.py # CollectiveOrchestrator + run_collective
│ ├── mcp_server.py # FastMCP server exposing blackboard + math tools
│ └── entrypoints/
│ ├── run_server.py # `python -m ... run_server`
│ └── run_orchestrator.py # `python -m ... run_orchestrator "<q>"`
├── tests/ # blackboard + connector + orchestrator + KB tests
└── notebooks/demo.ipynb # walkthrough with full blackboard state dumpAvailable Tools
8 toolsaddB
Sum two numbers.
Inputs: a (required), b (required). Returns: result
blackboard_dumpA
Return the full (non-expired) blackboard state.
Inputs: no named parameters. Returns: object
blackboard_getA
Read a single belief by key. Returns None if absent or expired.
Inputs: key (required). Returns: result
blackboard_queryB
Query beliefs by regex pattern (over key or string value) and/or tag.
Inputs: pattern, tag. Returns: result
blackboard_setB
Publish a belief to the shared blackboard.
Returns the stored belief as a dict (with timestamp + provenance).
Inputs: key (required), value (required), source, confidence, +1 more. Returns: object
divideA
Divide a by b. Raises if b == 0.
Inputs: a (required), b (required). Returns: result
multiplyA
Multiply two numbers.
Inputs: a (required), b (required). Returns: result
subtractA
Subtract b from a.
Inputs: a (required), b (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
All tools have clearly distinct purposes: the four arithmetic operations are separate, and the four blackboard operations (set, get, query, dump) each serve unique functions. There is no overlap or ambiguity.
Arithmetic tools use single verbs (add, subtract, multiply, divide) while blackboard tools use a noun_verb pattern (blackboard_dump, blackboard_get, blackboard_query, blackboard_set). This inconsistency in naming convention across the server reduces coherence.
With 8 tools covering two distinct subdomains (arithmetic and blackboard), the count feels well-scoped. Each tool serves a clear purpose without unnecessary duplication or bloat.
The arithmetic set is complete for basic operations. The blackboard tools are mostly complete but lack a delete/remove operation, which could be a gap for typical blackboard use cases. Minor gap.
Maintenance
Related MCP Connectors
Shared memory and mail for your AI agents. Verified with Claude Code; other MCP clients in testing.
Shared blackboard and MCP control plane for multi-agent teams.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Cross-tool persistent memory and context for AI assistants over MCP.
Related MCP Servers
- AlicenseCqualityBmaintenanceFile-based multi-agent coordination with persistent tasks, reports, issues and reviews. FCoP 4.0.5 provides 25 canonical MCP tools and 6 read-only resources over local stdio. Work stays in your project as Markdown records, with task lifecycle validation and branch workflows. Includes a Python API and a CLI for setup, inspection and diagnostics.2550 PyPI4MIT
- AlicenseNot gradedqualityDmaintenanceEnables deep research tasks using a multi-agent architecture that integrates any LLM and MCP tools. Available via MCP stdio, streamable HTTP, and SSE transports.16MIT
- FlicenseNot gradedqualityDmaintenanceA multi-tool task agent MCP server with file search, SQLite query, calculator, and report writing tools. Enables Claude Code, Claude Desktop, or Cursor to control the same tools used by the agent, with guardrails for safety.-
- FlicenseNot gradedqualityDmaintenanceShared memory and orchestration for coding agents, enabling persistent knowledge, multi-agent coordination, and a canonical workflow across MCP-compatible AI clients.83-