- Node.js 18+ and npm
- Docker and Docker Compose (optional, for Redis/Relay Server)
- Git (for cloning)
- Claude Desktop (for MCP integration)
# Navigate to MCP server package
cd packages/mcp-server
# Install dependencies
npm install
# Build the project
npm run build# Generate a secure shared token (on Windows/Git Bash)
node -e "console.log('cct_' + require('crypto').randomBytes(32).toString('hex'))"
# Save the output - you'll need it for all agents
# Example output: cct_a3f8d9e2c1b4f7a6e8d2c9b1f4a7e3d2c6b9f1e4a8d3c7b2f5e9a1d4c8b3f6You have 3 options - pick the easiest for you:
# Start Redis using Docker
docker run -d --name coorchat-redis -p 6379:6379 redis:7-alpine
# Or install Redis locally on Windows:
# Download from: https://github.com/microsoftarchive/redis/releases- Go to https://discord.com/developers/applications
- Create a new application
- Go to "Bot" → "Add Bot"
- Copy the bot token
- Enable "Message Content Intent"
- Invite bot to your server using OAuth2 URL generator
- Create a channel and copy its ID (right-click → Copy ID)
# From repo root
cd packages/relay-server
# Build and run with Docker
docker build -t coorchat-relay .
docker run -d -p 5001:5001 -e Authentication__SharedToken=YOUR_TOKEN coorchat-relayCreate a config file at: C:\Users\YourUser\.claude\claude_desktop_config.json
{
"mcpServers": {
"coorchat": {
"command": "node",
"args": [
"C:\\projects\\coorchat\\packages\\mcp-server\\dist\\index.js"
],
"env": {
"CHANNEL_TYPE": "redis",
"REDIS_HOST": "localhost",
"REDIS_PORT": "6379",
"SHARED_TOKEN": "cct_YOUR_TOKEN_FROM_STEP2",
"AGENT_ID": "agent-claude-1",
"AGENT_ROLE": "developer",
"LOG_LEVEL": "info"
}
}
}
}For Discord instead:
{
"mcpServers": {
"coorchat": {
"command": "node",
"args": [
"C:\\projects\\coorchat\\packages\\mcp-server\\dist\\index.js"
],
"env": {
"CHANNEL_TYPE": "discord",
"DISCORD_BOT_TOKEN": "YOUR_BOT_TOKEN",
"DISCORD_CHANNEL_ID": "YOUR_CHANNEL_ID",
"SHARED_TOKEN": "cct_YOUR_TOKEN_FROM_STEP2",
"AGENT_ID": "agent-claude-1",
"AGENT_ROLE": "developer",
"LOG_LEVEL": "info"
}
}
}
}{
"mcpServers": {
"coorchat": {
"command": "node",
"args": [
"C:\\projects\\coorchat\\packages\\mcp-server\\dist\\index.js"
],
"env": {
"CHANNEL_TYPE": "redis",
"REDIS_HOST": "localhost",
"REDIS_PORT": "6379",
"SHARED_TOKEN": "cct_YOUR_TOKEN",
"AGENT_ID": "agent-claude-1",
"AGENT_ROLE": "developer",
"GITHUB_TOKEN": "ghp_YOUR_GITHUB_PAT",
"GITHUB_OWNER": "your-org",
"GITHUB_REPO": "your-repo",
"GITHUB_WEBHOOK_SECRET": "your_webhook_secret",
"LOG_LEVEL": "info"
}
}
}
}Get GitHub Token:
- Go to https://github.com/settings/tokens
- Generate new token (classic)
- Select scopes:
repo,read:org - Copy the token
Close and reopen Claude Desktop to load the MCP server.
In Claude Desktop, type:
Can you check if the coorchat MCP server is connected?
You should see the MCP tools available in Claude's context.
cd packages/mcp-server
npm testExpected output:
Test Files 2 passed (2)
Tests 34 passed (34)
Create a test script test-connection.js:
import { ChannelFactory } from './dist/channels/base/ChannelFactory.js';
const config = {
type: 'redis',
token: 'cct_YOUR_TOKEN',
connectionParams: {
host: 'localhost',
port: 6379,
},
};
const channel = ChannelFactory.create(config);
await channel.connect();
console.log('✅ Connected to channel!');
channel.onMessage((message) => {
console.log('📨 Received:', message);
});
await channel.disconnect();Run it:
node test-connection.js| Variable | Required | Description | Example |
|---|---|---|---|
CHANNEL_TYPE |
Yes | Channel type | redis, discord, signalr |
SHARED_TOKEN |
Yes | Auth token (16+ chars) | cct_a3f8d9... |
AGENT_ID |
Yes | Unique agent identifier | agent-claude-1 |
AGENT_ROLE |
Yes | Agent role | developer, tester, architect |
REDIS_HOST |
If redis | Redis hostname | localhost |
REDIS_PORT |
If redis | Redis port | 6379 |
REDIS_PASSWORD |
If redis | Redis password | your_password |
REDIS_TLS |
If redis | Enable TLS | true, false |
DISCORD_BOT_TOKEN |
If discord | Discord bot token | MTk4... |
DISCORD_CHANNEL_ID |
If discord | Discord channel ID | 123456789... |
SIGNALR_HUB_URL |
If signalr | SignalR hub URL | https://localhost:5001/agentHub |
GITHUB_TOKEN |
Optional | GitHub PAT | ghp_... |
GITHUB_OWNER |
Optional | GitHub org/user | your-org |
GITHUB_REPO |
Optional | GitHub repo | your-repo |
GITHUB_WEBHOOK_SECRET |
Optional | Webhook secret | your_secret |
LOG_LEVEL |
Optional | Log verbosity | debug, info, warn, error |
To test multiple agents coordinating:
cd packages/mcp-server
CHANNEL_TYPE=redis \
REDIS_HOST=localhost \
REDIS_PORT=6379 \
SHARED_TOKEN=cct_YOUR_TOKEN \
AGENT_ID=agent-dev-1 \
AGENT_ROLE=developer \
node dist/index.jscd packages/mcp-server
CHANNEL_TYPE=redis \
REDIS_HOST=localhost \
REDIS_PORT=6379 \
SHARED_TOKEN=cct_YOUR_TOKEN \
AGENT_ID=agent-test-1 \
AGENT_ROLE=tester \
node dist/index.jsdocker exec -it coorchat-redis redis-cli
> SUBSCRIBE coorchat:channelcd packages/mcp-server
npm run build# Check Redis is running
docker ps | grep redis
# Or start it
docker run -d --name coorchat-redis -p 6379:6379 redis:7-alpine- Check Claude Desktop logs:
%APPDATA%\Claude\logs\ - Verify paths in
claude_desktop_config.jsonuse absolute paths - Ensure backslashes are escaped:
C:\\projects\\... - Restart Claude Desktop completely
- Ensure
SHARED_TOKENis the same across all agents - Token must be 16+ characters
- Use the
cct_prefix for channel tokens
- Verify
GITHUB_TOKENhasreposcope - Check
GITHUB_OWNERandGITHUB_REPOare correct - Ensure repo exists and token has access
From repo root:
# Start everything (Redis + Relay Server)
docker-compose up -d
# View logs
docker-compose logs -f
# Stop everything
docker-compose downThen configure Claude Desktop to use Redis at localhost:6379.
Once installed:
- Test basic coordination: Create a task and assign it to an agent
- Set up GitHub sync: Connect to a repo and sync issues
- Add more agents: Create multiple Claude Desktop profiles or standalone agents
- Monitor coordination: Watch agents communicate and coordinate work
For active development:
cd packages/mcp-server
# Watch mode (auto-rebuild on changes)
npm run dev
# Run tests on save
npm test -- --watch# Remove Docker containers
docker-compose down -v
docker rm -f coorchat-redis
# Remove MCP server from Claude config
# Edit: C:\Users\YourUser\.claude\claude_desktop_config.json
# Remove the "coorchat" entry
# Remove node_modules
cd packages/mcp-server
rm -rf node_modules dist