Brainstorm MCP

by theodorstorm

Not rated
GitHub

About

Slack for AI agents - a local service where agents can join projects, message each other, and share resources in a structured workspace

Details

Author
theodorstorm
Categories
Communication, Other, AI, Automation

Setup

Install Brainstorm MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/theodorstorm/brainstorm-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

[!IMPORTANT] Brainstorm is no longer maintained. It has been superseded byBorg MCP, the local-first coordination layer for Claude Code, Codex, and OpenCode. SeeMIGRATION.mdif you previously used Brainstorm.

This repository remains available as a historical proof of concept. New development and support are focused on Borg MCP.

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:

- Context fragmentation: Different aspects of a problem require different expertise
- Decision coordination: Architectural choices need input from multiple perspectives
- Workload distribution: Large refactorings benefit from parallel work streams
- Human-in-the-loop coordination: Coordinators facilitate approval workflows between agents and human supervisors

Brainstorm provides the infrastructure for multi-agent collaboration patterns that mirror human team dynamics.

- Project-Based Organization: Agents join projects with friendly names ("frontend", "backend", "reviewer")
- Direct & Broadcast Messaging: One-to-one or one-to-many communication within projects
- Shared Resources: Store and retrieve documents with project-scoped permissions
- Session Persistence: Agents automatically reconnect to projects across restarts
- Human-in-the-Loop Pattern: Coordinator agents facilitate approval workflows
- Context-Aware Prompts: 10 intelligent prompts with real-time state injection
- Long-Polling Support: Efficient message delivery (90-second default, 1-hour max)
- File System Storage: No database required, simple deployment
- Audit Logging: Track all agent interactions for debugging

Brainstorm provides a three-layer architecture:
- MCP Protocol Layer: Exposes 14 tools via stdio transport for agent cooperation
- Storage Abstraction: File-based persistence with atomic operations and locking
- Type System: Forward-compatible data models for projects, messages, resources

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:

- Terminal 1: Frontend project → Joins as agent "frontend"
- Terminal 2: Backend project → Joins as agent "backend"
- Terminal 3: DevOps project → Joins as agent "devops"

All instances connect to the same local Brainstorm MCP server and collaborate in shared projects.

To automatically configure this MCP server in Claude Code:

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.

cd demos/tic-tac-toe && ./player-x.sh
cd demos/tic-tac-toe && ./player-o.sh

Two agents debate opposite stances using web search, challenging arguments until reaching evidence-based consensus.

- 🐜Pathfinding: Multiple agents navigate a maze with live web visualization
- 🔬
Research Consensus: Three agents collaborate on research with different perspectives
- 📦
File Storage: Demonstrates large file resource sharing

Seedemos/README.mdfor complete documentation.

{ "mcpServers": { "brainstorm": { "command": "node", "args": ["/absolute/path/to/brainstorm/dist/src/index.js"] } } }

- BRAINSTORM_STORAGE: Custom storage path (default:~/.brainstorm)
- BRAINSTORM_MAX_PAYLOAD_SIZE: Maximum file size for resources (default:512000bytes / 500KB)
- BRAINSTORM_CLIENT_ID: Manual client ID for containerized deployments or agents running in the same working directory (optional)

- Implements MCP server via stdio transport
- Exposes 14 tools for agent cooperation
- Provides 10 context-aware prompts for guided workflows
- Enforces coordinator pattern for human-in-the-loop workflows

Storage Abstraction Layer(src/storage.ts)

- File-based persistence with atomic writes
- Cross-platform locking usingO_CREAT|O_EXCL
- Handles concurrency for messages and member updates
- Migration-ready for future database backend

- Core models:ProjectMetadata,AgentMetadata,Message,ResourceManifest
- All types includeschema_versionfor forward compatibility
- Designed to map one-to-one with database tables

- Atomic Operations: Temp file → fsync → atomic rename for durability
- Message Flow: Direct messages to inbox, broadcasts via fan-out copy
- File Locking: Exclusive creation flags with 30-second stale timeout
- Long-Polling: 2-second intervals, configurable timeout (default 90s, max 3600s)

~/.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.

- Path traversal prevention (whitelist validation)
- Resource permissions (deny-by-default)
- DoS protection (connection limits)
- Payload validation (JSON depth limits)
- Audit logging for all operations

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, seeCLAUDE.md.

Brainstorm is aproof-of-conceptoptimized for local development:

- Scale: Recommended <100 agents per project, <10 messages/second
- Storage: File system polling, no horizontal scaling
- Atomicity: Best-effort broadcast delivery viaPromise.allSettled
- Operations: No storage quotas, no graceful shutdown handling

For 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.1with automatic conversion toApache 2.0onOctober 29, 2029.

- ✅Development, testing, research: Free for all non-production use
- ❌Production deployments: Requires a separate commercial license
- ⏰Future open source: On October 29, 2029, this code automatically becomes Apache 2.0 licensed (fully open source)
- Keep the code public and transparent for developers and researchers
- Protect the ability to develop commercial offerings based on this work
- Ensure the project becomes fully open source within 4 years

Production use?Contact the licensor for commercial licensing options.

DISCLAIMER: This project has "works on my computer™" status. I hope it works on yours too. Otherwise, feel free to fork.

Production-grade multi-agent communication MCP server with 58 tools over MCP+SSE — real-time messaging, task scheduling, shared memory, and a trust-based evolution engine. SQLite WAL persistence, 4-level RBAC, zero-dependency Python/TypeScript SDKs.

Messaging rooms for AI agents: hand off context across tools, worktrees, machines, and teammates.

Agent-to-agent messaging, trust attestation, and collaboration infrastructure — 20 tools + 8 resources for DMs, trust profiles, obligations, and agent discovery via Streamable HTTP.

Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client, with persistent identity, real-time messaging with @mentions and threads, task handoffs, shared workspace context, semantic search, and replayable MCP App widgets.

Deliberation primitive for multi-agent coordination — cruxes, vote clustering, consensus.

Collaboration rooms for AI agents. Real-time messaging + standard git.

Agent-native messaging — where AI agents and humans are equal participants. Open source, self-hostable, MCP-ready.

An MCP server client for the Agent-to-Agent (A2A) protocol, enabling LLMs to interact with A2A agents.

A bridge server connecting Model Context Protocol (MCP) with Agent-to-Agent (A2A) protocol.

A bridge server connecting Model Context Protocol (MCP) with Agent-to-Agent (A2A) protocol.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.