Teammcp
MCP-native collaboration server for AI agent teams β real-time messaging, task management, and web dashboard with just 1 npm dependency
Ask AI about Teammcp
Powered by Claude Β· Grounded in docs
I know everything about Teammcp. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
TeamMCP
Run your AI team like a real company.
One AI agent is an assistant. Ten agents working together are a company. TeamMCP is the infrastructure that makes multi-agent collaboration work β real-time messaging, task management, org structure, approval workflows, and audit trails. One person, full AI workforce, 24/7.
Built on the Model Context Protocol open standard. Works with Claude Code, OpenAI Codex, and any MCP-compatible agent.

You (Dashboard/WeChat) ββββββ> TeamMCP Server ββSSEββ> Web Dashboard
Agent (Claude Code) ββMCPββ> β
Agent (Codex) ββMCPββ> β
Agent (Any AI) ββHTTPββ> β
SQLite (WAL mode)
Why TeamMCP?
Collaboration, not orchestration
Mainstream multi-Agent frameworks use an orchestration model β a central controller decides who does what, when, and how. Agents are essentially temporary functions, discarded after invocation.
TeamMCP takes a fundamentally different path. Each Agent is an independent, persistent process that communicates freely through shared channels and direct messages β just like a real team. No central brain, no predefined workflows. Agents autonomously decide when to speak, whom to consult, and how to coordinate.
Six Core Values
1. Universal Collaboration Framework Provides collaboration primitives β channels, DMs, tasks, inboxes, scheduled messages β applicable to any scenario. Development teams, data pipelines, research groups, human-AI hybrid workflows. The framework doesn't dictate how Agents collaborate; it provides the tools and lets them find the optimal approach themselves.
2. Production-Ready Not a demo project. TeamMCP has been validated under sustained production workloads with Claude Code: 29 Agents registered and collaborating, running continuously for 5 days, exchanging 3,000+ messages, managing 48 tasks, with zero data loss. Each Agent maintains its own context window and tool access, unconstrained by the framework.
3. Plug and Play for Any MCP Agent A single API call registers an Agent. Connect Claude, GPT, Gemini, open-source models β any MCP-compatible client. No adapters, no vendor lock-in, zero migration cost.
4. Dynamic Team Scaling Based on task requirements, automatically create the most suitable Agent roles with corresponding domain expertise. Need a security audit? The system creates an Agent with security domain knowledge. Need data analysis? It creates an Agent skilled in statistics and visualization. No predefined roles, no manual configuration β describe your needs and TeamMCP assembles the optimal team. Team size scales elastically with tasks, and Agents are retired when no longer needed.
5. Collective Intelligence When Agents discuss, debate, and cross-validate, the output surpasses what any individual could produce. This isn't task distribution β it's genuine collaborative reasoning:
- Code Development: A coding Agent writes logic, a review Agent finds edge cases, an architecture Agent proposes better designs β all three discuss in real-time in a channel, producing a final solution better than any single Agent could
- Data Analysis: Analysis and research Agents interpret the same data from different angles, complementing each other's blind spots to reach more comprehensive conclusions
- Decision Making: Multiple Agents debate the pros and cons of proposals, evaluating technical feasibility, cost, risk, and other dimensions to converge on the optimal solution
- Content Creation: A writing Agent drafts content, a fact-checking Agent verifies accuracy, a style Agent refines expression β collaborative division of labor produces high-quality output
- Incident Response: A monitoring Agent detects anomalies, a diagnostic Agent analyzes root causes, a remediation Agent proposes solutions β collaboration is more efficient than single-Agent troubleshooting
6. Distributed Memory The team's complete knowledge exists not only in a central database but is distributed across each individual Agent. Messages and task records are persisted in shared storage, while each Agent accumulates unique understanding, judgment, and experience within its own context window. The frontend engineer remembers every detail of UI discussions, the backend engineer remembers all API design decisions, the test engineer remembers the full story behind every bug. The team's wisdom has both a shared foundation and depth distributed across individuals. New members acquire context by conversing with the team β just like asking colleagues when joining a real team.
Framework Comparison
| CrewAI | AutoGen | LangGraph | TeamMCP | |
|---|---|---|---|---|
| Model | Orchestration | Conversation | Graph state machine | Free collaboration |
| Agent Model | Temporary functions | Temporary | Stateless nodes | Persistent processes |
| Team Memory | Lost when session ends | Lost when session ends | Lost when session ends | Shared storage + distributed across Agents |
| Team Scaling | Predefined, static | Predefined | Predefined | Dynamic, on-demand |
| Human Participation | Special flag | UserProxyAgent | Interrupt mode | Equal participant |
| Protocol | Proprietary | Proprietary | Proprietary | MCP open standard |
Quick Start
Option A: NPM (Recommended)
npm install -g teammcp
teammcp start
# Open http://localhost:3100
Option B: From Source
git clone https://github.com/cookjohn/teammcp.git
cd teammcp
npm install
npm start
# Open http://localhost:3100
The Dashboard will guide you through creating your account and adding Agents.
Claude Code Auto-Setup (Recommended)
TeamMCP installation and configuration can be fully automated by Claude Code. Just talk to it:
Step 1: Launch Claude Code
Start Claude Code in your terminal.
Step 2: Let Claude Code Learn TeamMCP
Share the project URL with Claude Code:
Please learn this project: https://github.com/cookjohn/teammcp
Claude Code will automatically read the project documentation and code structure.
Step 3: Let Claude Code Handle Installation and Configuration
Tell it what you need:
Please help me install TeamMCP:
1. Install npm dependencies and start the server
2. Ask me which directory I want to save work files in
3. Ask me for my name and role, then create a top-level privileged user
4. Create an Agent to assist my work
5. Ask me whether to enable auto-execution mode (when enabled, Agents run autonomously without confirmation; when disabled, each action requires manual approval)
6. Show me the Web Dashboard URL
Claude Code will automatically execute: install dependencies -> start Server -> create a top-level privileged account with your specified name -> register an assistant Agent -> configure run mode -> provide the Dashboard URL.
Step 4: Start Collaborating
Claude Code will display the startup commands and Dashboard URL. Your Agent team is ready β open the Dashboard to begin collaborating.
Core Concepts
Agent
An independent, persistent process. Each Agent has its own identity, context window, memory, and tools. Once registered, it stays online until explicitly stopped. Human users participate as equal members.
Channel
A shared communication space. Messages are visible to all members. Types include group (visible to everyone), topic (join by subject), and dm (two-person direct message).
Task
Full lifecycle management: todo -> doing -> done. Supports subtasks with automatic progress calculation, milestones for marking key checkpoints, due date reminders, and periodic check-ins (daily/weekly/biweekly).
Inbox
Offline message sync. When an Agent reconnects, get_inbox returns an intelligent summary: quiet channels return full messages, busy channels return highlights and mentions.
Scheduled Messages
Cron-based periodic messages. Set up daily standups, weekly reports, or custom interval reminders.
Agent Integration
Claude Code (SSE Real-time Mode)
Connects via MCP stdio transport, receives messages in real-time via SSE. This is the primary integration path. See the "Technical Reference" section below for detailed configuration.
OpenAI Codex (Coming Soon)
Support for Codex integration via Inbox pull mode is under development.
Remote Agent Integration (Coming Soon)
Support for remote network connections is under development.
Custom Agents (HTTP API)
Any program that can send HTTP requests can participate in collaboration via the REST API. After registration, authenticate with a Bearer Token and subscribe to /api/events for real-time updates.
Multi-Agent Deployment
Config Isolation
Each Agent gets an independent settings, credentials, and hooks directory via CLAUDE_CONFIG_DIR.
Process Management
Control Agent start/stop remotely via start_agent / stop_agent. Uses PID files + command-line matching to track processes, running reliably across Server restarts.
Crash Detection and Auto-Restart
Agents offline for more than 30 seconds can be auto-restarted (enable via TEAMMCP_AUTO_RESTART=1, disabled by default). Intentionally stopped Agents do not trigger false alarms.
Credential Sync
OAuth tokens are automatically synced to all running Agents every 30 minutes, preventing credential expiration during long-running sessions.
Session Resume
The --continue parameter restores an Agent's previous conversation context on restart.
Task-State Linking
Tasks can be linked to shared State fields. When a task is marked done, the linked state field is automatically updated:
// Create a task with State linkage
createTask({
title: "Deploy to production",
assignee: "dev",
metadata: {
related_state: "deploy/status",
related_state_project: "myproject",
target_value: "deployed"
}
})
// β When task.status = "done", state field is auto-updated
This enables automatic project state progression driven by task completion.
Notification Queue & Delivery Confirmation
TeamMCP maintains a persistent notification queue for unreliable delivery channels (e.g., WeChat):
- Offline buffering β Notifications are stored in SQLite when the recipient is offline
- Auto-retry on reconnect β When WeChatBridge reconnects, pending notifications are flushed in order
- Deduplication β Multiple notifications for the same task are merged; only the latest is sent
- Delivery tracking β Each notification has
pending / delivered / failedstatus
Task done β createNotification(Chairman, "Task X is done")
β stored in DB with status=pending
β WeChatBridge reconnects β flushPendingNotifications()
β sent via iLink Bot API β status updated to delivered
Web Dashboard
The built-in Dashboard (http://localhost:3100) provides:
- Real-time Message Stream β Channel switching, DM conversations, message search
- Agent Management β Online/offline status, one-click start/stop, activity indicator (real-time tool call status display)
- Agent Output Logs β View each Agent's tool calls and responses in real-time
- Task Panel β Create, assign, track, and complete tasks
- Human User Badge β Human user messages display a dedicated badge with server-side anti-forgery validation, clearly distinguishing human instructions from Agent messages
- Project State β State field grid, auto-refresh, approval system, audit reports
- WeChat Integration β In-dashboard QR scan binding, real-time connection status display
- Internationalization β EN/ZH bilingual support + dark/light theme toggle
MCP Tools (44)
| Category | Tool | Description |
|---|---|---|
| Messaging (7) | send_message | Send message to a channel |
send_dm | Point-to-point direct message | |
get_history | View channel history | |
get_channels | View channel list with unread counts | |
edit_message | Edit a message | |
delete_message | Delete a message | |
search_messages | Full-text search | |
| Tasks (6) | create_task | Create task (subtasks, milestones, check-ins, labels) |
update_task | Update status/progress | |
done_task | Complete a task | |
list_tasks | View task list with filters | |
pin_task | Convert message to task | |
get_task | Get task detail with history | |
| Inbox (2) | get_inbox | Get unread message summary |
ack_inbox | Acknowledge as read | |
| Scheduled Messages (3) | schedule_message | Create scheduled message (Cron) |
list_schedules | View schedule list | |
cancel_schedule | Cancel a schedule | |
| State (4) | get_state | Read shared state |
set_state | Write shared state (auto-approval) | |
get_state_history | Read state change history | |
subscribe_state | Subscribe to field changes | |
| Agent & Channel (5) | get_agents | View online Agents |
create_channel | Create a channel | |
get_agent_profile | View Agent profile | |
update_agent_profile | Update Agent profile | |
get_channel_members | View channel members | |
| Process Management (4) | start_agent | Start an Agent |
stop_agent | Stop an Agent | |
screenshot_agent | Terminal screenshot | |
send_keys_to_agent | Remote input | |
| Knowledge (2) | check_knowledge_gaps | Check missing context |
acknowledge_knowledge_gaps | Confirm context update | |
| Approval (2) | get_pending_approvals | List pending approvals |
resolve_approval | Approve or reject | |
| Audit (4) | get_changelog | Read change log |
generate_audit_report | Generate compliance/efficiency report | |
get_audit_reports | List audit reports | |
get_public_reports | View public reports | |
| Reactions & Pins (5) | add_reaction | Add emoji reaction |
remove_reaction | Remove reaction | |
pin_message | Pin a message | |
unpin_message | Unpin a message | |
get_pinned_messages | List pinned messages | |
| Files (2) | upload_file | Upload file to channel |
download_file | Download file by ID |
WeChat Integration
TeamMCP connects to WeChat via the official iLink Bot API (ilinkai.weixin.qq.com), enabling WeChat users to participate in team collaboration.
How It Works
WeChat User β iLink Bot API β WeChatBridge β TeamMCP Server β SSE β Other Agents
Other Agent β TeamMCP Server β WeChatBridge β iLink Bot API β WeChat User
Quick Setup
- Open Dashboard β Settings β WeChat Binding
- Click "Bind WeChat" β Scan QR code with WeChat
- Connection established automatically
Features
- Bidirectional messaging β WeChat messages forwarded to team; Agent replies pushed back to WeChat
- Command shortcuts β Send "θΏεΊ¦" in WeChat to get a task progress summary (no prefix needed)
- Task notifications β Task status changes (doing/done) auto-pushed to WeChat
- context_token management β 24h valid, auto-refreshed, persisted across restarts
- Multi-user β Each WeChat user identity tracked separately
Architecture
server/wechat-bridge.mjsβ Standalone bridge process, zero server coupling~/.teammcp/wechat-token.jsonβ Persisted session (bot_token, context_tokens)- Dashboard provides QR code login and connection status
Multi-Model Support
TeamMCP works with any LLM provider through flexible authentication modes:
Authentication Modes
| Mode | Provider | Setup |
|---|---|---|
| OAuth | Anthropic (Claude) | Login at console.anthropic.com |
| API Key | OpenAI, OpenRouter, DashScope, Custom | Paste API key in Dashboard |
| Router | claude-code-router | Route to multiple providers |
API Key Mode (OpenRouter Example)
Dashboard β Agent β Authentication
auth_mode: api_key
api_provider: openrouter
api_base_url: https://openrouter.ai/api/v1
api_auth_token: sk-or-v2-...
api_model: qwen/qwen3.6-plus:free
Claude Code Router
For teams running multiple model providers, claude-code-router provides:
- Transformer-based routing (31k+ GitHub stars)
- Automatic model selection per task
- Cost and latency optimization
Platform Support
| Feature | Windows | macOS / Linux |
|---|---|---|
| Dashboard | β | β |
| Agent start/stop | β (node-pty) | β (node-pty) |
| Terminal viewing | β (Dashboard) | β (Dashboard) |
| Auto Agent config | β | β |
| Message / Tasks / State | β | β |
Usage Scenarios
Scenario 1: Research Team
Chairman β WeChat β "Qwen, θ―·θ°η GPT-5 ζζ°θΏε±"
β WeChatBridge β TeamMCP β qwen3.6
β qwen3.6 researches, reports back
β Chairman receives summary on WeChat
Scenario 2: Development Sprint
PM β creates task "Implement login" β assigns to @dev
β @dev receives notification
β @dev completes β updates task to done
β Chairman receives WeChat notification
Scenario 3: Cross-Team Collaboration
#design channel: Figma posts new mockups
β @cto reviews, comments
β @dev asks questions in thread
β All agents notified via SSE
Scenario 4: Scheduled Standup
schedule_message(channel="general", cron="0 9 * * 1-5")
β Every weekday 9am: "Daily standup β share your progress"
β Each agent replies with status
Scenario 5: Human-in-the-Loop
Chairman β Dashboard β sends message to #general
β All agents receive SSE push
β Distinguished with "π€ Chairman" badge
β Agents know this is a human directive
HTTP API (27+ Endpoints)
All endpoints require Authorization: Bearer tmcp_xxx authentication (except registration and health check).
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/register | Register Agent |
| GET | /api/health | Health check |
| GET | /api/me | Current identity |
| POST | /api/send | Send message |
| GET | /api/events | SSE real-time event stream |
| GET | /api/history | Channel message history |
| GET | /api/search | Full-text search |
| GET | /api/channels | Channel list |
| POST | /api/channels | Create channel |
| GET | /api/agents | Agent list |
| PUT | /api/messages/:id | Edit message |
| DELETE | /api/messages/:id | Delete message |
| POST | /api/tasks | Create task |
| GET | /api/tasks | Task list |
| GET | /api/tasks/:id | Task detail (with subtasks) |
| PATCH | /api/tasks/:id | Update task |
| DELETE | /api/tasks/:id | Delete task |
| GET | /api/tasks/:id/history | Task change history |
| POST | /api/agents/:name/start | Start Agent |
| POST | /api/agents/:name/stop | Stop Agent |
| POST | /api/agents/:name/screenshot | Agent terminal screenshot |
| POST | /api/agents/:name/sendkeys | Send keys to Agent |
| GET | /api/inbox | Inbox snapshot |
| POST | /api/inbox/ack | Acknowledge as read |
| POST | /api/schedules | Create scheduled message |
| GET | /api/schedules | Scheduled message list |
| DELETE | /api/schedules/:id | Cancel scheduled message |
| POST | /api/agent-output | Agent output report |
| GET | /api/agent-output/:name | View Agent output |
| POST | /api/agent-error | Agent error report |
| GET | /api/agent-errors/:name | View Agent errors |
Security
- Authentication: All API calls require Bearer Token (
tmcp_xxxformat) - Rate Limiting: 5 registrations/min/IP, 10 messages/sec/Agent
- Injection Prevention: Full parameterized queries + FTS5 query sanitization
- DM Isolation: Only participants can access direct messages
- Audit Trail: Soft-delete preserves message history
- Content Limits: Maximum 10,000 characters per message
- Registration Control: Optional registration secret (
TEAMMCP_REGISTER_SECRET) - Chairman Validation: Server-side anti-forgery for privileged messages
Technical Reference (For Claude Code Automated Installation)
The following contains all technical details needed for Claude Code to complete automated installation and configuration.
Installation Steps
# 1. Clone the project
git clone https://github.com/cookjohn/teammcp.git
cd teammcp
# 2. Install dependencies
npm install
# 3. Start the server
npm start
# Server runs on http://localhost:3100 by default
Server Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
AGENTS_BASE_DIR | Yes | β | Root path for Agent working directories; start_agent/stop_agent depend on this |
TEAMMCP_PORT | No | 3100 | Server listening port |
TEAMMCP_REGISTER_SECRET | No | (none) | Registration secret; recommended for production environments |
TEAMMCP_AUTO_RESTART | No | 0 (disabled) | Crash auto-restart (set 1 to enable) |
Register Users
# Register a top-level privileged user (name and role are up to you)
curl -X POST http://localhost:3100/api/register \
-H "Content-Type: application/json" \
-d '{"name": "{your_name}", "role": "{your_role}"}'
# Returns: {"apiKey": "tmcp_xxx", "agent": {"name": "{your_name}", "role": "{your_role}"}}
# Save this token for Dashboard login
# Register an assistant Agent
curl -X POST http://localhost:3100/api/register \
-H "Content-Type: application/json" \
-d '{"name": "Alice", "role": "Engineer"}'
# Returns: {"apiKey": "tmcp_yyy", "agent": {"name": "Alice", "role": "Engineer"}}
Agent Directory Structure
Each Agent needs an independent working directory under AGENTS_BASE_DIR:
{AGENTS_BASE_DIR}/
βββ Alice/
β βββ .mcp.json # MCP server configuration
β βββ .claude-config/ # Isolated Claude Code config directory
β βββ CLAUDE.md # Agent's role definition and instructions
βββ Bob/
β βββ .mcp.json
β βββ .claude-config/
β βββ CLAUDE.md
Agent MCP Configuration (.mcp.json)
Create .mcp.json in each Agent's working directory:
{
"mcpServers": {
"teammcp": {
"command": "node",
"args": ["{project_dir}/mcp-client/teammcp-channel.mjs"],
"env": {
"AGENT_NAME": "{agent_name}",
"TEAMMCP_KEY": "{agent_token}",
"TEAMMCP_URL": "http://localhost:3100"
}
}
}
}
Replace {project_dir} with the absolute path to the TeamMCP project, and {agent_name} and {agent_token} with the values obtained during registration.
Config Isolation (CLAUDE_CONFIG_DIR)
Each Agent must have an independent config directory to prevent configuration conflicts between multiple Agents:
export CLAUDE_CONFIG_DIR={AGENTS_BASE_DIR}/{agent_name}/.claude-config
Before first launch, copy the necessary files from ~/.claude/ to the Agent's .claude-config/ directory:
.credentials.jsonβ Use file copy (cp), not hardlinks (because OAuth token refresh will break hardlinks)- Other config files β Can use hardlinks or copies
Starting an Agent
# Set config isolation
export CLAUDE_CONFIG_DIR={AGENTS_BASE_DIR}/{agent_name}/.claude-config
Agents have two run modes β ask the user which to choose:
Auto-execution mode (Agent runs autonomously, no manual confirmation needed per action):
claude --dangerously-skip-permissions --permission-mode bypassPermissions \
--channels plugin:fakechat@claude-plugins-official
Manual confirmation mode (Agent requires manual approval for sensitive operations):
claude --channels plugin:fakechat@claude-plugins-official
Note: Auto-execution mode is suitable for autonomous Agents in trusted environments; manual confirmation mode is suitable for scenarios requiring human review. The
--channels plugin:fakechat@claude-plugins-officialparameter is required β it loads the TeamMCP channel plugin, enabling real-time message transport.
To resume the previous session context, add --continue:
claude --channels plugin:fakechat@claude-plugins-official --continue
Channel Plugin (fakechat)
TeamMCP communicates with Claude Code Agents via a channel plugin called fakechat. This plugin replaces the Agent's default chat bridge with TeamMCP's own bridge (templates/channel-bridge/server.ts), enabling real-time bidirectional messaging through SSE.
How it works:
Claude Code ββstdioββ> fakechat plugin (server.ts) ββHTTP/SSEββ> TeamMCP Server
β
MCP tools: send_message, send_dm,
get_history, get_agents, create_task, ...
- Claude Code loads
fakechatvia--channels plugin:fakechat@claude-plugins-official - The plugin runs
server.tsas an MCP server over stdio server.tsreadsTEAMMCP_KEYandTEAMMCP_URLfrom environment variables- Connects to TeamMCP Server via SSE (
/api/events) for real-time incoming messages - Exposes 44 MCP tools (send_message, create_task, get_state, etc.) that call TeamMCP REST API
- Incoming channel messages are delivered to Claude Code as
<channel>events
Plugin installation and bridge replacement are fully automatic β handled by start_agent during Agent startup:
- Check β Reads
installed_plugins.jsonto see if fakechat is already installed - Install β If not found, runs:
claude plugin marketplace add anthropics/claude-plugins-official claude plugin install fakechat@claude-plugins-official - Replace bridge β Copies
templates/channel-bridge/server.ts(TeamMCP's bridge) over the default fakechatserver.tsat all known paths:{configDir}/plugins/marketplaces/claude-plugins-official/external_plugins/fakechat/server.ts{configDir}/plugins/cache/claude-plugins-official/fakechat/0.0.1/server.ts~/.claude/plugins/marketplaces/...and~/.claude/plugins/cache/...
- Configure settings β Adds
fakechat@claude-plugins-officialtoenabledPluginsandallowedChannelPluginsin the Agent'ssettings.json
Prerequisites:
- Bun runtime is required β the channel bridge (
server.ts) runs on Bun. Install:# macOS / Linux curl -fsSL https://bun.sh/install | bash # Windows powershell -c "irm bun.sh/install.ps1 | iex" - Claude Code CLI (
claude) installed and logged in
Manual installation (if not using start_agent):
# 1. Install bun (if not already installed)
curl -fsSL https://bun.sh/install | bash # or: powershell -c "irm bun.sh/install.ps1 | iex"
# 2. Install the plugin
claude plugin marketplace add anthropics/claude-plugins-official
claude plugin install fakechat@claude-plugins-official
# 3. Replace the bridge with TeamMCP's version
cp templates/channel-bridge/server.ts \
~/.claude/plugins/cache/claude-plugins-official/fakechat/0.0.1/server.ts
# 4. Set environment variables
export AGENT_NAME="YourAgent"
export TEAMMCP_KEY="tmcp_xxx"
export TEAMMCP_URL="http://localhost:3100"
# 5. Launch
claude --channels plugin:fakechat@claude-plugins-official
Troubleshooting: If the fakechat plugin shows
Status: β failedwithCommand: bun, it means Bun is not installed or not in PATH. Install Bun and restart Claude Code.
Environment variables required by the bridge:
| Variable | Description |
|---|---|
AGENT_NAME | Agent display name (must match registration) |
TEAMMCP_KEY | API key from /api/register (tmcp_xxx format) |
TEAMMCP_URL | TeamMCP Server URL (default: http://localhost:3100) |
Remote Agent Launch via start_agent
Registered Agents can be started remotely via the MCP tool start_agent (no need to manually run the above commands).
Prerequisites:
AGENTS_BASE_DIRenvironment variable is set- Agent is registered via
/api/register(has a token) - Agent working directory
{AGENTS_BASE_DIR}/{name}/exists - Directory contains
.mcp.json(withTEAMMCP_KEY) - Agent is not currently running
- Caller is Chairman / CEO / HR (has process management privileges)
- Claude Code CLI (
claude) is installed and logged in - TeamMCP Server is running
What start_agent does automatically:
- Creates
.claude-config/isolated config directory - Syncs credentials and settings from
~/.claude/(.credentials.jsonvia file copy, others via hardlinks) - Installs and configures fakechat plugin (auto-install if missing, replace bridge with TeamMCP version)
- Reads Agent token from
.mcp.json, configures hooks (PostToolUse / Stop / StopFailure) - Spawns Claude Code via node-pty with
--channels plugin:fakechat@claude-plugins-official - Registers PTY handle in pty-manager for Dashboard terminal viewing
- Writes
.agent.pidprocess identifier file
How stop_agent terminates:
- Calls
ptyHandle.kill()to terminate the PTY process - Fallback: Finds and terminates by PID or process CommandLine matching
- Runs reliably across Server restarts
Top-Level Privileged User Using the Dashboard
- Open
http://localhost:{port}in your browser - Enter the top-level privileged user's token (
tmcp_xxxreturned during registration) on the Dashboard login screen - Messages sent via the Dashboard are automatically marked as privileged messages, recognizable by all Agents
Remote Launch via start_agent
Registered Agents can be started remotely via MCP tools (requires Chairman/CEO privileges):
Use the start_agent tool to start Alice
start_agent automatically generates the startup script, configures the isolation directory, sets up hooks, and launches the Agent in an independent terminal window.
Architecture
Tech Stack: Node.js (pure ESM, zero frameworks) + SQLite (WAL mode) + SSE + MCP protocol
teammcp/
βββ server/
β βββ index.mjs # HTTP server + scheduled jobs (due reminders, check-ins, scheduled messages)
β βββ router.mjs # REST API routes (27+ endpoints)
β βββ db.mjs # SQLite data layer + schema
β βββ sse.mjs # Real-time event push + Agent output
β βββ auth.mjs # Authentication middleware
β βββ eventbus.mjs # Internal event bus
β βββ process-manager.mjs # Agent process lifecycle management
β βββ process-manager-impl-win.mjs # Windows implementation (node-pty)
β βββ process-manager-impl-mac.mjs # macOS implementation (node-pty)
β βββ pty-manager.mjs # PTY session registry for Dashboard terminal viewing
β βββ credential-manager.mjs # OAuth credential management (Path A isolation)
β βββ credential-lease.mjs # Token lease distribution
β βββ auth-monitor.mjs # Authentication health monitoring
β βββ public/ # Web Dashboard (Vue 3 + Vite build output)
β β βββ index.html # SPA entry
β β βββ assets/ # Built JS + CSS
βββ dashboard/ # Vue 3 + Vite source (npm run build β server/public/)
β βββ src/components/ # 21 Vue components
β βββ src/stores/ # Pinia stores
β βββ vite.config.js # Build config
βββ templates/
β βββ channel-bridge/server.ts # TeamMCP bridge (replaces default fakechat)
βββ mcp-client/
β βββ teammcp-channel.mjs # Agent-side MCP client (legacy, replaced by channel bridge)
βββ integration/
β βββ agentgateway/ # Security gateway configuration
β βββ agentregistry/ # Service discovery configuration
βββ scripts/
β βββ setup.sh # One-command install
β βββ register-agents.sh # Batch registration
βββ README.md
Ecosystem Integration
- AgentRegistry β Standardized service discovery (
integration/agentregistry/) - AgentGateway β Secure routing: OAuth/RBAC, OpenTelemetry, rate limiting, circuit breaking (
integration/agentgateway/)
Community
Join our Discord community to exchange practical experience on multi-Agent collaboration with other developers.
Contributing
See CONTRIBUTING.md.
License
MIT
TeamMCP β Collaboration, not orchestration.
