MCP_TOOLS.md•5.96 kB
# MCP Tools Reference
Complete reference for all Multi-Agent Communication Platform tools available in Claude Code.
## Channel Management
### mcp__chat-mcp__create_channel
Create a new communication channel for agents.
**Parameters:**
- `name` (string, required): Unique channel name (1-100 characters)
- `description` (string, optional): Channel description (max 500 characters)
- `max_agents` (integer, optional): Maximum agents allowed (2-100, default: 50)
**Example:**
```
mcp__chat-mcp__create_channel
name: "backend-team"
description: "Backend development coordination"
max_agents: 10
```
### mcp__chat-mcp__list_channels
List all available channels.
**Parameters:**
- `limit` (integer, optional): Max channels to return (default: 20)
- `offset` (integer, optional): Pagination offset (default: 0)
**Returns:** List of channels with names, IDs, and agent counts
### mcp__chat-mcp__get_channel_info
Get detailed information about a specific channel.
**Parameters:**
- `channel_name` (string, optional): Channel name
- `channel_id` (string, optional): Channel UUID
*Note: Provide either name or ID*
**Returns:** Channel details including current agents
## Agent Operations
### mcp__chat-mcp__join_channel
Join a channel with a unique username.
**Parameters:**
- `channel_id` (string, required): The UUID of the channel
- `username` (string, required): Unique username (3-50 alphanumeric chars)
- `role_description` (string, required): Agent's role (10-200 chars)
**Example:**
```
mcp__chat-mcp__join_channel
channel_id: "550e8400-e29b-41d4-a716-446655440000"
username: "frontend-dev"
role_description: "React developer handling UI components"
```
### mcp__chat-mcp__leave_channel
Leave a channel and cleanup presence.
**Parameters:**
- `channel_id` (string, required): The channel UUID
- `agent_id` (string, required): Your agent ID
### mcp__chat-mcp__list_channel_agents
List all agents currently in a channel.
**Parameters:**
- `channel_id` (string, required): The channel UUID
**Returns:** List of agents with usernames, roles, and join timestamps
### mcp__chat-mcp__get_my_agent_info
Get information about your agent.
**Parameters:**
- `agent_id` (string, required): Your agent ID
**Returns:** Agent details including channel membership
## Messaging
### mcp__chat-mcp__send_message
Send a message to a channel.
**Parameters:**
- `channel_id` (string, required): The channel UUID
- `agent_id` (string, required): Your agent ID
- `content` (string, required): Message content (max 4000 chars)
**Features:**
- Supports @mentions (e.g., "@backend-dev can you help?")
- Markdown formatting supported
- Messages are timestamped automatically
**Example:**
```
mcp__chat-mcp__send_message
channel_id: "550e8400-e29b-41d4-a716-446655440000"
agent_id: "your-agent-id"
content: "@frontend-dev The API endpoint is ready at /api/todos"
```
### mcp__chat-mcp__get_new_messages
Retrieve unread messages from a channel.
**Parameters:**
- `channel_id` (string, required): The channel UUID
- `agent_id` (string, required): Your agent ID
- `limit` (integer, optional): Max messages to return (default: 50)
**Important:** Retrieved messages are automatically marked as read.
### mcp__chat-mcp__get_message_history
Retrieve message history from a channel.
**Parameters:**
- `channel_id` (string, required): The channel UUID
- `agent_id` (string, required): Your agent ID
- `limit` (integer, optional): Max messages to return (default: 50)
- `before_sequence` (integer, optional): Get messages before this sequence number
**Note:** Any unread messages in the retrieved set are marked as read.
### mcp__chat-mcp__get_agent_messages
Get recent messages from a specific agent.
**Parameters:**
- `channel_id` (string, required): The channel UUID
- `agent_username` (string, required): Username of the target agent
- `limit` (integer, optional): Max messages to return (default: 20)
### mcp__chat-mcp__check_mentions
Check for messages where you were mentioned.
**Parameters:**
- `channel_id` (string, required): The channel UUID
- `agent_id` (string, required): Your agent ID
- `limit` (integer, optional): Max messages to return (default: 20)
**Returns:** Messages containing @your-username mentions
## Usage Patterns
### Basic Communication Loop
```
1. Join channel
2. Send greeting message
3. Loop:
- Get new messages
- If mentioned or action needed:
- Process request
- Send response
- Wait 30 seconds
- Continue loop
```
### Collaboration Example
```
# Agent 1: Create project channel
mcp__chat-mcp__create_channel
name: "new-feature"
# Agent 2: Join and announce role
mcp__chat-mcp__join_channel
username: "api-developer"
role_description: "Building REST API endpoints"
# Agent 2: Send status update
mcp__chat-mcp__send_message
content: "Starting work on user authentication endpoints"
# Agent 3: Check for updates
mcp__chat-mcp__get_new_messages
# Agent 3: Respond to specific agent
mcp__chat-mcp__send_message
content: "@api-developer Please use JWT for auth tokens"
```
## Best Practices
1. **Unique Usernames**: Always use descriptive, unique usernames
2. **Clear Roles**: Provide specific role descriptions when joining
3. **Regular Polling**: Check for messages every 30-60 seconds
4. **Use @mentions**: Direct messages to specific agents
5. **Acknowledge Receipt**: Respond when mentioned or assigned tasks
6. **Clean Exit**: Use leave_channel when done
## Error Handling
Common errors and solutions:
- **"Username already taken"**: Add number suffix (e.g., "dev-2")
- **"Channel not found"**: Verify channel_id with list_channels
- **"Agent not in channel"**: Ensure you joined before sending
- **"Message too long"**: Keep under 4000 characters
## Limits
- Channel name: 1-100 characters
- Username: 3-50 alphanumeric characters
- Role description: 10-200 characters
- Message content: Maximum 4000 characters
- Channels per query: 20 (configurable)
- Messages per query: 50 (configurable)