AgentMesh MCP
# AgentMesh MCP (Lite Edition)
[](LICENSE)
[](https://modelcontextprotocol.io/)
[](https://python.org/)
**AgentMesh MCP** is a resilient Model Context Protocol (MCP) server designed to coordinate multi-agent AI swarms (Claude, Cursor, CrewAI, LangGraph, custom subagents) without cloud deadlocks, race conditions, or duplicated work.
Powered by a high-throughput, zero-dependency SQLite WAL engine, AgentMesh provides mutual-exclusion task claiming and atomic state transitions so multiple autonomous agents can collaborate seamlessly in parallel.
---
## ๐ฏ The Problem
When running multiple AI agents in parallel:
1. **Collision & Race Conditions:** Multiple agents attempt to tackle the same problem or modify the same files simultaneously, destroying each other's work.
2. **Zombie Locks:** If an agent times out or crashes during an API call, tasks get stuck indefinitely.
3. **Cloud Overhead:** Setting up Redis, RabbitMQ, or Celery just to let 3 local AI agents work together is overkill and introduces privacy leakage.
**AgentMesh** solves this locally and deterministically with a lightweight, standardized MCP server.
---
## โจ Features (Lite Edition)
- ๐ **Atomic Mutual Exclusion:** Guaranteed single-claim mechanics using SQLite WAL `BEGIN IMMEDIATE` transactions.
- โก **Zero External Dependencies:** Built with pure Python 3 standard library (`sqlite3`, `json`, `uuid`).
- ๐ ๏ธ **Full MCP Compliance:** Implements MCP standard (`tools/list`, `tools/call`, `initialize`, `ping`) over `stdio`.
- ๐ **Real-time Observability:** CLI and MCP tools to inspect swarm board status, active worker counts, and queue depth.
---
## ๐ Quickstart
### 1. Installation
```bash
git clone https://github.com/johannschiffer/agentmesh-mcp.git
cd agentmesh-mcp
pip install -e .
```
### 2. Configure in Claude Desktop or Cursor
Add to your `claude_desktop_config.json` or Cursor MCP settings:
```json
{
"mcpServers": {
"agentmesh": {
"command": "python",
"args": ["-m", "agentmesh.cli", "run"]
}
}
}
```
### 3. CLI Inspection
Check the current state of your swarm at any time:
```bash
# View board metrics
agentmesh status
# List pending or active tasks
agentmesh list --status pending
```
---
## ๐ ๏ธ MCP Tools Reference
| Tool | Parameters | Description |
|---|---|---|
| `create_task` | `title`, `description`, `priority`, `metadata` | Adds a task to the queue in `pending` state |
| `claim_task` | `agent_id` | Atomically claims the highest priority pending task |
| `complete_task` | `task_id`, `agent_id`, `result` | Marks task as completed with output payload |
| `fail_task` | `task_id`, `agent_id`, `error` | Marks task as failed with error details |
| `get_task` | `task_id` | Retrieves complete task state and payload |
| `list_tasks` | `status`, `agent_id`, `limit` | Queries tasks with status and worker filters |
| `get_board_status` | none | Returns high-level metrics of the entire swarm |
---
## ๐ Upgrade to AgentMesh Pro
Need enterprise capabilities for production autonomous swarms?
The **AgentMesh Pro Edition** adds:
- โ๏ธ **DAG Dependency Engine:** Complex multi-step task graphs (`depends_on`). Subtasks stay locked until parents pass. Cycle-detection prevents infinite deadlock loops.
- ๐ **Heartbeat & Zombie Lease Reclaimer:** Automatic detection of crashed or frozen agents. Automatically revokes expired leases back to the pool.
- ๐ง **ACID Shared Memory Blackboard:** Namespaced key-value store with TTL for inter-agent context and artifact sharing.
- ๐ **Swarm Cost & Token Ledger:** Telemetry tracking execution time, token burn, and API costs per agent.
- ๐ณ **Production Docker & Compose:** Ready-to-ship container configurations.
- ๐งช **Comprehensive Pytest Suite:** 100% test coverage ready for CI/CD.
๐ **[Get AgentMesh Pro on Gumroad ($14.99 USD)](https://johanld.gumroad.com/l/hbqhfh)**
---
## ๐ License
MIT ยฉ 2026 [Johann Schiffer](https://github.com/johannschiffer)
TDQS
Scored across 7 tools
Each tool maps to a distinct action in the task lifecycle: create, claim, complete, fail, get, list, and board status. The boundaries between query tools (get_task for a single ID vs list_tasks for filtered sets) and mutation tools are clear, so an agent can select confidently.
Every tool follows a consistent verb_noun snake_case pattern (create_task, claim_task, complete_task, fail_task, get_task, list_tasks, get_board_status). No deviations in style or casing.
Seven tools is well-scoped for a swarm task board, with each tool earning its place across create/read/state-transition operations. No redundancy or filler.
The core task lifecycle (create, claim, complete, fail) plus read/query operations is fully covered. Minor gaps exist, such as releasing/unclaiming a task or updating task fields (priority, metadata), but agents can work around these.