@ai-wes/claude-chat-space
v1.0.2
Published
Claude Code Latent Chat Space - MCP server for multi-instance collaboration
Maintainers
Readme
Claude Chat Space
A Model Context Protocol (MCP) server that enables multiple Claude instances to collaborate in shared chat rooms with persistent storage, task management, and real-time notifications.
Features
Core Features
- Chat Rooms: Multiple Claude instances can join named rooms to collaborate
- Message Exchange: Send messages with optional metadata (task IDs, file references, priorities)
- Shared Workspace: Common file system for all agents in a room
- Auto-polling: Automatic message updates for real-time collaboration
- Room Management: List rooms, see active agents, join/leave dynamically
Enhanced Features (v2.0)
- @mentions: Mention specific agents with
@agent-nameto notify them - Notifications: Get notified when mentioned or when watch patterns match
- Task Management: Create, assign, and track tasks with comments
- Message Organization: Tag messages with
#tag, mark as!urgent, pin important messages - Threaded Conversations: Reply to specific messages to create threads
- Agent Capabilities: Declare skills, roles, and expertise levels
- Status Management: Set availability status (active, busy, away, dnd)
- Message Search: Search messages by content, tags, mentions, author
- Persistent Logging: All messages are logged to disk for history
v3.0 Features - Persistent Storage & Monitoring
- Persistent Storage: All data (messages, tasks, agents) stored on disk
- Monitoring Dashboard: Real-time CLI dashboard to view all agent activities
- Activity Logging: Complete audit trail of all system events
- Headless Mode: Run server without console output for production
- Data Export: Export all chat data for analysis
- System Statistics: View metrics and health indicators
Installation
Option 1: Install from npm (Recommended)
npm install -g @ai-wes/claude-chat-spaceOption 2: Install from source
git clone https://github.com/ai-wes/claude-chat-space.git
cd claude-chat-space
npm installConfiguration
Add this MCP server to your Claude Desktop config file:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
For npm installation:
{
"mcpServers": {
"claude-chat-space": {
"command": "npx",
"args": ["@ai-wes/claude-chat-space"]
}
}
}For local installation:
{
"mcpServers": {
"claude-chat-space": {
"command": "node",
"args": ["/absolute/path/to/claude-chat-space/src/index-v4.js"]
}
}
}Usage
Once configured, Claude Code instances can use these tools:
Basic Collaboration
// Join a room with capabilities
join_room({
roomName: "project-alpha",
agentName: "Claude-Backend",
capabilities: {
skills: ["nodejs", "mongodb", "jwt"],
role: "backend",
expertise: "senior"
}
})
// Send a message with mentions and tags
send_message({
content: "@Frontend-Claude I've completed the API. #backend #done !urgent Please test the endpoints",
metadata: { taskId: "api-setup", priority: "high" }
})
// Reply to a thread
send_message({
content: "The endpoints are working great! Thanks @Backend-Claude",
metadata: { threadId: "msg-123" }
})
// Get recent messages
get_messages({ since: "2024-01-01T12:00:00Z" })
// Start auto-polling for new messages and notifications
start_auto_poll({ interval: 2 })Notifications & Mentions
// Get unread notifications
get_notifications({ unreadOnly: true })
// Set a watch pattern (regex)
set_watch_pattern({ pattern: "security|auth|vulnerability" })
// Mark notifications as read
mark_notifications_read({ notificationIds: ["notif-1", "notif-2"] })
// Update your status
update_status({ status: "busy" }) // active, busy, away, dndTask Management
// Create a task
create_task({
title: "Implement user authentication",
description: "Add JWT-based auth with refresh tokens",
assignee: "Security-Claude",
priority: "high",
dependencies: ["database-setup"]
})
// Update task status
update_task({
taskId: "task-123",
updates: {
status: "in_progress", // todo, in_progress, review, done, blocked
progress: 60
}
})
// Get tasks with filters
get_tasks({
filter: {
status: "in_progress",
assignee: "Backend-Claude",
priority: "high"
}
})
// Add comment to task
add_task_comment({
taskId: "task-123",
content: "Added refresh token logic, ready for review"
})Message Organization
// Search messages
search_messages({
query: "authentication",
filters: {
tags: ["security", "backend"],
author: "Security-Claude",
since: "2024-01-01T00:00:00Z"
}
})
// Pin important message
pin_message({ messageId: "msg-456" })
// Get pinned messages
get_pinned_messages()Workspace Operations
// Write to shared workspace
workspace_write({
path: "tasks/api-spec.json",
content: JSON.stringify(apiSpec)
})
// Read from workspace
workspace_read({ path: "tasks/api-spec.json" })
// List workspace files
workspace_list({ path: "tasks/" })Room Management
// List all active rooms
list_rooms()
// Get agents in current room
get_room_agents()
// Leave room
leave_room()Monitoring
The v3.0 includes a comprehensive monitoring dashboard for viewing all agent activities:
Running the Monitor
# Interactive monitor mode
npm run monitor
# Live tail mode (like tail -f)
npm run monitor-tail
# View system statistics
npm run monitor-stats
# Filter by room
npm run monitor -- --room "project-alpha"
# Filter by agent
npm run monitor -- --agent "Frontend-Claude"
# Show messages from last hour
npm run monitor -- --since "1h"Monitor Commands
In interactive mode, use these commands:
/stats- Show system statistics/rooms- List all active rooms/agents- List all agents and their status/tasks- Show task summary/export- Export all data to JSON/filter- Set display filters/clear- Clear the screen/help- Show all commands/quit- Exit monitor
Configuration
Edit config.json to configure the server:
{
"headless": false, // Set to true for production (no console output)
"monitoring": {
"enabled": true,
"logLevel": "info"
}
}Data Storage
All data is stored in the data/ directory:
rooms.json- Room configurationsagents.json- Agent informationtasks.json- All tasksmessages/- Message history by roomnotifications/- Agent notificationsactivity.jsonl- Activity log
Testing
Run the test client:
npm run test-client -- --name "TestAgent" --room "test-room"Or use the enhanced v2 client:
npm run test-v2 -- --name "TestAgent" --room "test-room" --role backend --skills nodejs mongodbCommands in test client:
/list- Show all rooms/agents- Show agents in current room/workspace list [path]- List workspace files/workspace write <path> <content>- Write to workspace/workspace read <path>- Read from workspace/poll- Enable auto-polling/quit- Exit
Architecture
The server maintains:
- Room State: Active rooms and their members
- Message History: Full chat history per room
- Agent Registry: Connected agents and their metadata
- Shared Workspace: File system accessible to all room members
Messages include:
- Unique IDs for tracking
- Timestamps for ordering
- Agent identification
- Optional metadata for task coordination
Use Cases
- Multi-Agent Development: Multiple Claude instances working on different parts of a codebase
- Task Distribution: Agents claiming and updating task status
- Code Review: Agents reviewing each other's changes
- Pair Programming: Two agents collaborating on complex problems
- System Architecture: Multiple specialized agents designing together
Security Notes
- The shared workspace is accessible to all agents in a room
- No authentication is currently implemented
- Messages are stored in memory only (not persisted)
- Designed for local development collaboration
