loading…
Search for a command to run...
loading…
Enables AI agents to communicate, coordinate, and collaborate on complex tasks through a local MCP server.
Enables AI agents to communicate, coordinate, and collaborate on complex tasks through a local MCP server.
MCP server enabling structured collaboration between AI agents.
Brainstorm allows multiple Claude Code instances on the same computer to communicate, coordinate, and collaborate on complex tasks through a local MCP server.
Brainstorm is a Model Context Protocol (MCP) server that enables AI agents to collaborate with each other. Instead of isolated single-agent workflows, multiple AI agent instances can coordinate through structured communication, shared resources, and persistent state management.
Think of it as Slack for AI agents — a local service where different Claude Code terminal windows join projects, exchange messages, and work together on tasks that benefit from multi-perspective analysis.
Complex software engineering tasks often require coordination across multiple domains: frontend, backend, infrastructure, security, testing. Traditional single-agent workflows struggle with:
Brainstorm provides the infrastructure for multi-agent collaboration patterns that mirror human team dynamics.
Brainstorm provides a three-layer architecture:
1. Agent instances connect to Brainstorm MCP server
↓
2. Agents join projects with friendly names
↓
3. Agents communicate via direct or broadcast messages
↓
4. Agents share resources within project scope
↓
5. Agents receive real-time updates via long-polling
Open multiple terminal windows on your computer, each running Claude Code:
All instances connect to the same local Brainstorm MCP server and collaborate in shared projects.
npm install
npm run build
Requirements: Node.js 18+
To automatically configure this MCP server in Claude Code:
npm run config
This builds the project and adds the server to ~/.claude/mcp_config.json. Restart Claude Code to activate.
See agent cooperation in action! Multiple demos showcase different collaboration patterns.
Two Claude Code agents play tic-tac-toe, coordinating moves and updating shared game state.
Terminal 1:
cd demos/tic-tac-toe && ./player-x.sh
Terminal 2:
cd demos/tic-tac-toe && ./player-o.sh
Two agents debate opposite stances using web search, challenging arguments until reaching evidence-based consensus.
Terminal 1:
cd demos/debate && ./agent-a.sh
Terminal 2:
cd demos/debate && ./agent-b.sh
See demos/README.md for complete documentation.
Add to ~/.claude/mcp_config.json:
{
"mcpServers": {
"brainstorm": {
"command": "node",
"args": ["/absolute/path/to/brainstorm/dist/src/index.js"]
}
}
}
Environment Variables:
BRAINSTORM_STORAGE: Custom storage path (default: ~/.brainstorm)BRAINSTORM_MAX_PAYLOAD_SIZE: Maximum file size for resources (default: 512000 bytes / 500KB)BRAINSTORM_CLIENT_ID: Manual client ID for containerized deployments or agents running in the same working directory (optional)MCP Protocol Layer (src/server.ts)
Storage Abstraction Layer (src/storage.ts)
O_CREAT|O_EXCLType System (src/types.ts)
ProjectMetadata, AgentMetadata, Message, ResourceManifestschema_version for forward compatibility~/.brainstorm/
├── projects/<project-id>/
│ ├── metadata.json
│ ├── members/<agent-name>.json
│ ├── messages/<agent-name>/<timestamp-uuid>.json
│ └── resources/<resource-id>/
├── clients/<client-id>/
│ ├── identity.json
│ └── memberships.json
└── system/
├── config.json
└── audit.log
Trust Model: Brainstorm assumes cooperative agents, not adversarial ones. Security features prevent accidental mistakes and conflicts, not malicious attacks.
Protections:
Use Case: Local development and trusted agent coordination, not multi-tenant or untrusted environments.
# Watch mode for development
npm run dev
# Run security tests
npm test
# Lint code
npm run lint
Test suite includes 57 tests covering security, concurrency, and feature functionality.
For detailed architecture information and contribution guidelines, see CLAUDE.md.
Brainstorm is a proof-of-concept optimized for local development:
Promise.allSettledFor production use, consider migrating to a database backend (SQLite/PostgreSQL). The architecture is migration-ready with all file operations mapping to SQL queries.
Business Source License 1.1 with automatic conversion to Apache 2.0 on October 29, 2029.
We chose BSL 1.1 to:
Production use? Contact the licensor for commercial licensing options.
See LICENSE for full legal terms.
DISCLAIMER: This project has "works on my computer™" status. I hope it works on yours too. Otherwise, feel free to fork.
Run in your terminal:
claude mcp add brainstorm -- npx Security
Low riskAutomated heuristic from public metadata — not a security guarantee.