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で保護されたアップサート/読み取り/クエリ、TTL、正規表現クエリ、タグフィルタを備えたBlackboardクラス)。マルチエージェントオーケストレーション — プランナーがプロンプトを分解し、リサーチャーがJSON形式の知識ベースから事実を取得し、推論者が最終的な回答を統合します。エージェントはコネクタの存在のみを知っており、互いの存在は知りません。すべてブラックボードを介して調整されます。
2つの交換可能なトランスポート — 高速なノートブック/テスト実行のためのインプロセス
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依存なし — このデモのエージェントは構造化された知識ベース上でオーケストレーションを行います。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を再起動すると、4つの blackboard_* ツールと4つの数学ツールがClaude UIで使用可能になります。以下を試してみてください:
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" を指定してオーケストレーターを構築します。コードの変更は不要です。
学んだこと
ブラックボードを使用した「プランナー→リサーチャー→推論者」パターンにより、各エージェントの責任範囲が小さくなり、個別に推論しやすくなりました。システムはプロンプトに基づいて動的に労力を調整します。「何(what)」と「なぜ(why)」だけを尋ねると、プランナーは define.what と explain.why のみを公開します。リサーチャーは必要なものだけを正確に取得し、ブラックボードがこの選択的なコンテキスト収集を追跡します。
最大の収穫はMCPのワイヤーフォーマットではなく、すべての状態変更を mcp.call("blackboard.set", ...) を通すように強制した規律です。その単一のボトルネックにより、システム全体が容易に観測可能になります。dump_state() は、各エージェントがいつ、どのような確信度で何を提供したかを正確に示します。(批評家やキャッシュのような)4番目のエージェントを追加することも、「タグ付けされた信念を読み、タグ付けされた信念を書く」という契約に従うだけでよいため、非常に簡単です。
プロジェクト構成
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-