ForgeSwarm
ForgeSwarm is an MCP server that coordinates independent AI agents into a structured engineering team through shared task management, context, enforced review workflows, and decision-tracking.
Project & Task Management
Create projects and decompose goals into dependency-ordered task graphs
Use pre-wired workflow templates for common patterns (e.g.,
ship-feature,refactor-module,debug-issue)Browse, atomically claim (race-free, with timed leases), and update tasks; visualize the full dependency graph with blockers and critical path
Agent Coordination
Register agents with stable IDs, roles, and capabilities for attribution and self-review prevention
Receive comprehensive task briefings bundling project goals, constraints, completed dependencies, decisions, relevant context, and prior review feedback
Shared Context & Memory
Write and search a shared blackboard for facts, schemas, or notes
Record binding architectural decisions with rationale so agents stop re-litigating settled choices
Enforced Review Workflow
Submit completed work for mandatory peer review (self-review is server-rejected)
Reviewers approve (completing the task) or request changes (returning it with feedback and bumping the iteration counter)
Discussion & Consensus
Open structured discussions, post positions with reasoning, and resolve them into binding project decisions (requires โฅ2 distinct agents)
Automated Verification
Run allowlisted test/lint/build commands (pytest, ruff, mypy, cargo, etc.) with hard timeouts; results are recorded as objective review evidence
Retrospectives
Generate performance reports covering review bounce rates, check pass rates, per-agent statistics, and hotspot tasks to drive process improvements
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ForgeSwarm create a project to refactor the authentication module and assign tasks to agents"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ForgeSwarm ๐ ๏ธ๐
An MCP server that turns independent AI agents into a coordinated engineering team.
Most MCP servers give agents data (GitHub, databases, web). ForgeSwarm gives them coordination: a shared task board with atomic claiming, a shared context blackboard, a decision log, and an enforced plan โ implement โ review โ iterate loop โ the same workflow shape that powers orchestration harnesses like CyOps, distilled into an open protocol primitive any MCP client can plug into.
Connect Claude Code, Codex, OpenCode, or a MiniMax M3-powered script to the same ForgeSwarm server, and they instantly become citizens of one swarm: claiming tasks without collisions, briefing each other through shared memory, and reviewing each other's work before anything counts as done.
Built for the CyOps Arena Hackathon โ MCP Server Sprint (co-hosted with MiniMax).
Why this exists
Multi-agent coding fails in predictable ways: two agents grab the same task, an agent starts work with no idea what the others decided, "done" means "the model said done", and a crashed agent silently stalls the project. ForgeSwarm fixes each one server-side, so correctness doesn't depend on prompt discipline:
Failure mode | ForgeSwarm mechanism |
Two agents do the same work |
|
Agent starts cold, repeats settled debates |
|
"Done" is just an assertion |
|
"Tests pass, trust me" |
|
Crashed agent stalls the swarm | Claims carry leases; expired leases put tasks back on the board automatically |
Disagreements evaporate into chat |
|
The swarm never learns |
|
State lost between sessions | Everything persists in SQLite (WAL) โ swarms survive restarts and work across both transports |
Related MCP server: agent-comm
Install
From source (not yet on PyPI):
git clone https://github.com/H2SO4620/forgeswarm && cd forgeswarm
pip install -e ".[dev]"
pytest # 20 tests, including end-to-end MCP client sessions
forgeswarmTransports
forgeswarm # stdio (local clients spawn it)
forgeswarm --transport http --port 8765 # one shared endpoint for a whole swarm
forgeswarm --db ./myproject.db # or set FORGESWARM_DBState is SQLite either way (default ~/.forgeswarm/forgeswarm.db), so stdio clients โ
which each spawn their own server process โ still share one swarm.
Claude Code
claude mcp add forgeswarm -- uvx forgeswarmOr in any MCP client config:
{
"mcpServers": {
"forgeswarm": { "command": "uvx", "args": ["forgeswarm"] }
}
}The loop
flowchart LR
G[Goal] --> P[create_project<br/>submit_plan]
P --> B[Task board]
B -->|claim_task<br/>atomic| W[Agent works<br/>get_briefing ยท save_context ยท run_checks]
W --> S[submit_for_review]
S --> R{post_review<br/>by a different agent}
R -->|approve| D[done โ]
R -->|request_changes<br/>iteration++| W
D --> BTools (24)
Planning โ create_project, submit_plan (whole dependency graph in one call), list_projects, register_agent
Task board โ list_tasks (with ready_only), claim_task (atomic, leased), update_task (progress + lease renewal), complete_task, get_task_graph
Shared context โ save_context, search_context, record_decision, get_briefing โญ
Review loop โ submit_for_review, get_review_queue, post_review
Discussion & consensus โ open_discussion, post_to_discussion, resolve_discussion (consensus becomes a recorded decision automatically), list_discussions
Workflow templates โ list_workflow_templates, get_workflow_template (ship-feature, refactor-module, debug-issue โ dependency-wired task graphs ready for submit_plan)
Verification & reflection โ run_checks (allowlisted: pytest, ruff, mypy, npm, cargo, go, โฆ; no shell, hard timeout, evidence recorded), get_retrospective (swarm performance evidence: bounce rates, iterations, per-agent stats)
Resources & Prompts
Live swarm state, readable without tool calls:
swarm://projects ยท swarm://agents ยท swarm://project/{id}/status ยท
swarm://project/{id}/tasks ยท swarm://project/{id}/decisions ยท
swarm://project/{id}/discussions ยท swarm://project/{id}/retrospective ยท
swarm://project/{id}/context
Role prompts that make any MCP client swarm-ready in one message:
planner ยท implementer ยท reviewer ยท standup_summary (rendered from live board state)
Demo: a MiniMax M3 swarm builds software through ForgeSwarm
examples/minimax_swarm_demo.py runs three
MiniMax M3 agents โ planner, implementer, reviewer โ that coordinate entirely
through ForgeSwarm tools over a real MCP stdio session: the planner decomposes a
goal into a task graph, the implementer claims tasks and submits work, the reviewer
approves or bounces it, and the loop runs until the board is green.
pip install -e ".[demo]"
set MINIMAX_API_KEY=sk-... # export on macOS/Linux
python examples/minimax_swarm_demo.py "Build a CLI pomodoro timer in Python"M3 is also available through OpenRouter (same model, smaller minimum top-up):
set MINIMAX_API_KEY=sk-or-...
set MINIMAX_BASE_URL=https://openrouter.ai/api/v1
set MINIMAX_MODEL=minimax/minimax-m3No API key handy? examples/quickstart_client.py
walks the identical workflow with a scripted client โ no LLM required:
python examples/quickstart_client.pyVerified run
A real run of the M3 swarm against "Build a CLI pomodoro timer in Python"
went from a bare goal to a finished, reviewed project with zero human
intervention โ three M3 agents talking only through ForgeSwarm tools:
m3-plannerregistered itself, created the project, decomposed the goal into 8 dependency-ordered tasks (scaffold โ timer state machine โ config โ notifier โ CLI โ tests โ docs), and recorded 4 architectural decisions (stdlib-only, foreground blocking timer, XDG config path, stderr UI honoringNO_COLOR).m3-impl-1claimed each ready task in dependency order, wrote the source viasave_context, andsubmit_for_review'd every deliverable.m3-reviewer-1pulled the review queue, cross-checked each submission againstget_briefing(goal, constraints, decisions, prior feedback), andpost_review'd a verdict for each.
The board went 8/8 done, and the closing standup_summary prompt โ also
answered by M3, purely from live board state โ correctly reported:
All planned work is complete โ 8/8 tasks closed... The project is feature-complete: scaffold, timer FSM, config, notifications, CLI, tests, and docs are all landed.
Single Most Important Next Action: Run a full end-to-end smoke test of the shipped CLI... and, if green, tag
v0.1.0and cut a release. Until we exercise the integrated binary, the "done" labels reflect unit-level completion only.
No agent ever had to be told what another agent decided, claimed, or reviewed โ every coordination fact came from ForgeSwarm's shared state.
Architecture
src/forgeswarm/
โโโ server.py # FastMCP app + stdio/streamable-HTTP entrypoint
โโโ store.py # SQLite (WAL): atomic claims, leases, review state machine
โโโ models.py # Pydantic contracts returned by every tool
โโโ tools/ # planning ยท tasks ยท context ยท review ยท checks
โโโ resources.py # swarm:// live state
โโโ prompts.py # planner / implementer / reviewer / standupDesign choices worth knowing:
SQLite over in-memory โ over stdio every client spawns its own server process; shared swarm state must live on disk. WAL mode + a busy timeout keeps concurrent agents safe, and one conditional
UPDATEmakes claims race-free.The loop is server-enforced โ review outcomes mutate task state in the same transaction as the verdict. An agent cannot skip review by prompt injection or forgetfulness; the state machine simply won't move.
run_checksis verification, not execution โ clients already execute code. The server's job is evidence: allowlisted executables, no shell, hard timeout, output recorded where reviewers can see it.
License
MIT
Available Tools
24 toolsclaim_taskA
Atomically claim an open task. Fails if it is taken or not ready.
The claim carries a lease: if you stop renewing it (update_task renews automatically) the task returns to the board so the swarm never stalls on a crashed agent. After claiming, call get_briefing before starting.
Inputs: task_id (required), agent_id (required), lease_seconds. Returns: id, project_id, title, description, +11 more
complete_taskA
Mark your claimed task done WITHOUT review (for trivial/mechanical tasks).
For anything substantive, prefer submit_for_review so another agent
checks the work. summary is what future briefings will show to agents
whose tasks depend on this one โ write it for them.
Inputs: task_id (required), agent_id (required), summary (required), artifacts. Returns: id, project_id, title, description, +11 more
create_projectA
Register a new engineering goal and get a project id.
Call this once per goal, then decompose it with submit_plan.
constraints holds non-negotiables (stack, deadline, style rules)
that every agent should respect.
Inputs: goal (required), constraints. Returns: id, goal, constraints, status, +1 more
get_briefingA
Get an onboarding packet for a task: everything needed to start cold.
Bundles the project goal and constraints, the task itself, summaries of its completed dependencies, all recorded decisions, related shared context, and reviewer feedback from earlier iterations. Call this right after claim_task, and again after a review requests changes.
Inputs: task_id (required). Returns: Everything an agent needs to start a task cold.
get_retrospectiveA
Compile the project's performance evidence for a swarm retrospective.
Returns totals (review bounce rate, check pass rate, iterations), per-agent stats (tasks completed, submissions bounced, reviews given), and hotspots โ the tasks that needed the most review round-trips. Analyze it to propose concrete process improvements, and record the ones the swarm adopts via record_decision.
Inputs: project_id (required).
get_review_queueB
List submissions waiting for review on this project.
Includes each submission's task title and iteration count, so reviewers can prioritise work that has already bounced.
Inputs: project_id (required). Returns: result
get_task_graphA
See the whole dependency graph: every task, its status, blockers, and who holds it.
Use this to find the critical path or to check whether the project is done.
Inputs: project_id (required).
get_workflow_templateA
Get a workflow template: recommended swarm + a task list shaped for submit_plan.
Available: ship-feature, refactor-module, debug-issue. Adapt the task titles/descriptions to your concrete goal, then pass the tasks straight to submit_plan โ depends_on indexes are already wired.
Inputs: name (required).
list_discussionsB
List discussions on a project ('open' or 'resolved'), with their posts.
Inputs: project_id (required), status, include_posts. Returns: result
list_projectsA
List all projects in this swarm with their status.
Inputs: no named parameters. Returns: result
list_tasksA
List tasks on the project board.
Use ready_only=true to see only tasks you could claim right now (open, with all dependencies done). Status filter accepts: open, claimed, in_progress, in_review, done.
Inputs: project_id (required), status, ready_only. Returns: result
list_workflow_templatesA
List battle-tested engineering workflow templates with what each is for.
Inputs: no named parameters. Returns: result
open_discussionA
Open a discussion when agents disagree or a choice needs multiple perspectives.
Frame the topic as a decidable question ('Postgres or SQLite for the cache?'), then invite positions via post_to_discussion.
Inputs: project_id (required), topic (required), agent_id. Returns: id, project_id, topic, status, +4 more
post_reviewA
Post a verdict on a submission: 'approve' or 'request_changes'.
approve completes the task. request_changes sends it straight back to the author as in_progress with your comments attached to their next briefing โ be specific and actionable. You cannot review your own submission.
Inputs: submission_id (required), agent_id (required), verdict (required), comments. Returns: id, submission_id, task_id, verdict, +3 more
post_to_discussionA
State your position in an open discussion, with reasoning.
Read the existing posts first (list_discussions / get_briefing show them) and respond to the strongest opposing argument, not past it.
Inputs: discussion_id (required), agent_id (required), position (required). Returns: id, discussion_id, agent_id, position, +1 more
record_decisionA
Log an architectural/engineering decision so the swarm stops re-litigating it.
Decisions appear in every briefing. Record the WHY in rationale โ
future agents only see what is written here.
Inputs: project_id (required), decision (required), rationale, agent_id. Returns: id, project_id, decision, rationale, +2 more
register_agentA
Introduce yourself to the swarm. Call once at startup.
Pick a stable, unique agent_id (e.g. 'impl-1', 'reviewer-claude') and use the same id in every later call: claims, submissions and reviews are attributed to it, and self-review is rejected based on it.
Inputs: agent_id (required), role, capabilities.
resolve_discussionA
Close a discussion with the consensus and make it binding project memory.
Requires positions from at least 2 distinct agents. The resolution is automatically recorded as a project decision (with a digest of the debate as rationale), so every future briefing carries it โ the swarm will not re-litigate.
Inputs: discussion_id (required), agent_id (required), resolution (required), rationale.
run_checksA
Run an allowlisted verification command (tests/linters/builds) for a task.
Allowed executables: pytest, python, uv, pip, ruff, mypy, black, flake8, npm, pnpm, yarn, npx, node, tsc, eslint, jest, vitest, go, cargo, make. The command runs without a shell (no pipes/redirects), with a hard timeout, and the result is recorded on the task as review evidence. Include the relevant output in your submit_for_review content.
Inputs: task_id (required), command (required), cwd (required), timeout_seconds.
save_contextA
Write a fact to the shared blackboard so every agent can find it.
Use stable, descriptive keys ('api-schema', 'auth-flow'); writing the same key again updates it. Tag entries with 'task-' to make them show up in that task's briefing.
Inputs: project_id (required), key (required), content (required), tags, +1 more. Returns: id, project_id, key, content, +3 more
search_contextC
Search the shared blackboard by substring over keys, content, and tags.
An empty query returns the most recently updated entries.
Inputs: project_id (required), query, limit. Returns: result
submit_for_reviewA
Submit your claimed task's work product for peer review.
content is what the reviewer will judge: a diff, a list of changed
files with explanations, or a results summary. self_assessment is
your honest note on risks and what you did not verify. The task moves
to in_review until a different agent posts a verdict.
Inputs: task_id (required), agent_id (required), content (required), self_assessment. Returns: id, task_id, content, self_assessment, +3 more
submit_planA
Decompose a project goal into a dependency-ordered task graph in one call.
depends_on entries are zero-based indexes into the tasks list itself
(task 2 depending on [0, 1] waits for the first two tasks). Returns the
created tasks with their real ids; agents then claim ready tasks with
claim_task.
Inputs: project_id (required), tasks (required).
update_taskA
Report progress on your claimed task and renew its lease.
status may be 'claimed' or 'in_progress'. Any notes you pass are saved to shared context (tagged with the task id) so other agents can see what you are doing. Finishing goes through submit_for_review or complete_task instead.
Inputs: task_id (required), agent_id (required), status, notes. Returns: id, project_id, title, description, +11 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 24 tools
All 24 tools have clearly distinct purposes, from task lifecycle (claim, update, complete, submit) to project management (create, plan) and collaboration (discussions, reviews, context). No two tools overlap in functionality.
Every tool follows a consistent verb_noun pattern in snake_case (e.g., claim_task, submit_plan, list_projects). The naming conventions are uniform and predictable across the entire set.
With 24 tools, the count is slightly above the typical well-scoped range (3-15) but remains reasonable given the complexity of swarm orchestration. None feel redundant.
The tool surface covers the full lifecycle of project creation, task management, review, discussions, decisions, and context sharing. Minor gaps exist (e.g., no project editing or task deletion), but core workflows are supported.
Maintenance
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Team memory for AI coding agents and code reviews, reviewed by humans and served over MCP.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that turns multiple AI coding agents into a coordinated team that chats, debates, remembers, audits security, and works in parallel on the same project.MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that enables AI coding agents to communicate, share state, and coordinate work in real time via MCP tools or REST API.79 npm10MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that enables AI agents to run a deterministic orchestration loop with decomposition, subagent execution, and review feedback across multiple LLM backends.62MIT
- AlicenseBqualityDmaintenanceMCP server that gives AI coding assistants persistent memory, structural code graph analysis, and safe multi-agent coordination, enabling them to answer architectural questions, track decisions across sessions, and coordinate safely in multi-agent workflows.394MIT