agentsquad
Click on "Install 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., "@agentsquadregister me as an agent named Alice with coding capability"
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.
agentsquad
Overview
agentsquad is a message broker that lets AI agents coordinate through the Model Context Protocol. Any MCP client — Claude Code, Codex, or a custom agent — registers with the broker, discovers active peers, and exchanges messages with no custom protocol or shared runtime. Agents group into persistent squads with role-based membership for long-running work, or ad-hoc teams for cross-squad tasks, and communicate through direct point-to-point messaging, RPC request/response, or topic-based pub/sub. The broker buffers messages for offline agents and restores identity on reconnect, so an agent can drop and resume without losing state or subscriptions. It runs as a single process backed by SQLite in WAL mode and exposes 26 MCP tools across 6 categories over streamable-http, with no external services or message queues to operate.
Related MCP server: Agent Directory MCP Server
Architecture
MCP (streamable-http)
|
+----+----+
| MCP |
| Server |
+----+----+
|
+------------------------+------------------------+
| Broker Core |
| +----------+ +-----------+ +----------------+ |
| | Router | | Agent | | Squad | |
| | P2P/RPC/ | | Registry | | Manager | |
| | PubSub | | | | | |
| +----+-----+ +-----+-----+ +------+---------+ |
| |
| +---------------------------------------------+ |
| | Persistence Layer (SQLite WAL) | |
| | messages | agents | squads | subscriptions | |
| +---------------------------------------------+ |
+---------------------------------------------------+
| | |
Claude Code Codex Custom AgentFeatures
Central Broker -- single-process message broker with SQLite WAL persistence
26 MCP Tools -- agent management, squad operations, ad-hoc teams, messaging, subscriptions, health
Communication Patterns -- P2P direct messaging, RPC request/response, Pub/Sub topic subscriptions
Squad Model -- persistent named groups with role-based membership and shared state
Ad-hoc Teams -- lightweight temporary groups created from multiple squads
Message Polling & Wait -- agents poll or block-wait for messages with
anyio.Eventzero-latency notificationRetention Policy -- automatic cleanup of expired messages and stale agents
Quick Start
# Install dependencies
uv sync
# Start the broker on port 8000
uv run agentsquad-broker startFor the full walkthrough, see QUICKSTART.md.
Client Configuration
Claude Code (recommended: plugin)
Install the agentsquad plugin:
claude plugin add <marketplace>/agentsquadThis provides 10 slash commands (/agentsquad:register, /agentsquad:send, etc.) and connects to the broker automatically.
Claude Code (manual HTTP config)
Add to .claude/settings.json or .mcp.json:
{
"mcpServers": {
"agentsquad-broker": {
"type": "http",
"url": "http://localhost:8000/mcp"
}
}
}Codex
codex mcp add agentsquad-broker --transport streamable_http --url "http://localhost:8000/mcp"MCP Tools Reference
Agent Management (5 tools)
Tool | Description |
| Register a new agent with name and capabilities |
| Remove an agent and clean up its subscriptions |
| Reconnect a disconnected agent; restores identity, memberships, and buffered messages |
| List all registered agents |
| Get detailed information about a specific agent |
Squad Management (8 tools)
Tool | Description |
| Create a named squad (creator becomes leader) |
| Dissolve a squad (leader only) |
| List all active squads |
| Get squad details including member list |
| Add an agent to a squad (leader only) |
| Remove an agent from a squad |
| Remove a member from squad (leader only) |
| Change a member's role (leader only) |
Ad-hoc Team (4 tools)
Tool | Description |
| Create a temporary team from agents |
| Dismiss an ad-hoc team |
| List all active ad-hoc teams |
| Get team composition and purpose |
Messaging (6 tools)
Tool | Description |
| Send a P2P or RPC message to a specific agent |
| Broadcast a message to topic subscribers |
| Poll for pending messages |
| Block until messages arrive (zero-latency via anyio.Event) |
| Retrieve a single message by its msg_id |
| Query message history with filters |
Subscription (2 tools)
Tool | Description |
| Subscribe an agent to a topic |
| Unsubscribe from a topic |
Health (1 tool)
Tool | Description |
| Get broker health, agent count, queue depth |
Configuration
Environment variables use the AGENTSQUAD_ prefix:
Variable | Default | Description |
|
| SQLite database file path |
|
| Seconds to wait for RPC response |
|
| Max messages returned per poll call |
|
| Days to retain messages before cleanup |
|
| Port for streamable-http transport |
Communication Patterns
P2P (Point-to-Point)
Direct message from one agent to another. Best for targeted requests and responses.
Agent A Broker Agent B
| | |
|--- message_send(to=B) ------->| |
| |-- store message -------------->|
| | |
| |<-------- message_poll() -------|
| |--- deliver message ----------->|
| | |RPC (Request-Response)
Synchronous request/response with timeout. Caller blocks until responder replies.
Agent A Broker Agent B
| | |
|--- message_send(type=rpc) ---->| |
| |-- store RPC request ----------->|
| | |
| |<--- message_poll() -------------|
| |--- deliver request ----------->|
| | |
| |<--- message_send() ------------|
|<-- RPC response ---------------| |
| | |Pub/Sub (Publish-Subscribe)
Topic-based broadcasting. Subscribers receive messages posted to topics they follow.
Publisher Broker Subscriber
| | |
|--- message_broadcast(topic=X)->| |
| |-- lookup subscribers --------->|
| | |
| | Subscriber A Subscriber B
| |-- deliver --------->| |<-- deliver
| | |Squad and Team Model
Aspect | Squad | Ad-hoc Team |
Lifetime | Persistent | Temporary |
Creation |
|
|
Membership | Agents join/leave | Specified at creation |
Roles | Per-member roles | Flat membership |
Communication | Broadcast to squad | Broadcast to team |
Use case | Long-running teams, departments | Task forces, cross-squad projects |
Cleanup | Explicit | Explicit |
Development
# Run all tests
uv run pytest
# Run specific test layer
uv run pytest tests/test_broker/
# Smoke test (MCP client integration)
uv run python tests/smoke_test.py
# System test (lifecycle & messaging)
uv run python tests/system_test.pyProject Structure
agentsquad/
src/
common/ # Types, config
persistence/ # Database, stores
broker/ # Registry, managers, router, core
mcp_server/ # FastMCP tools (26 tools)
cli/ # Click CLI entry point
tests/ # Test suite (261 tests, incl. 13 integration)
samples/ # Demo scripts and slash commandsLicense
Licensed under the Apache License 2.0.
This server cannot be installed
Maintenance
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
- Alicense-qualityDmaintenanceMCP server that gives AI agents the ability to discover, match with, and build relationships with other autonomous agents. Supports agent registration, matchmaking, messaging, shared goals, relationship lifecycle management, and real-time event subscriptions.Last updated67MIT
- Alicense-qualityDmaintenanceMCP Server for agent and service discovery — register, search, rate, and manage AI agents and services in a local directory.Last updated3MIT
- Alicense-qualityDmaintenanceMCP server that enables AI coding agents to communicate, share state, and coordinate work in real time via MCP tools or REST API.Last updated1264MIT
- Alicense-qualityFmaintenanceMCP server that lets multiple coding-agent sessions on the same machine discover each other and collaborate through a shared SQLite database.Last updated351MIT
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server exposing the Backtest360 engine API as tools for AI agents.
Remote MCP server for The Colony — a social network for AI agents (posts, DMs, search, marketplace).
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/jhqian/agentsquad'
If you have feedback or need assistance with the MCP directory API, please join our Discord server