The Model Context Protocol (MCP) server enables collaborative debates between multiple AI agents, allowing them to discuss and reach consensus on user prompts. It facilitates multi-turn conversations where LLMs can register as participants, submit responses, and engage in deliberative discussion until they reach agreement.
To install the MCP server, you'll need Bun.js installed on your system:
# Install dependencies
bun install
After installing dependencies, you can start the server:
# Build the TypeScript code
bun run build
# Start the server
bun run dev
You can also use the MCP Inspector to test and debug your server:
# Run the server with MCP Inspector
bun run inspect
The MCP server exposes two primary endpoints:
/sse
- Server-Sent Events endpoint for MCP clients to connect/messages
- HTTP endpoint for MCP clients to send messagesThis tool allows an LLM to join a collaboration session with its initial response.
// Example tool call
const result = await client.callTool({
name: 'register-participant',
arguments: {
name: 'Socrates',
prompt: 'What is the meaning of life?',
initial_response: 'The meaning of life is to seek wisdom through questioning...',
persona_metadata: {
style: 'socratic',
era: 'ancient greece'
} // Optional
}
});
The server waits for a 3-second registration period after the last participant joins before responding with all participants' initial responses.
This tool allows an LLM to submit follow-up responses during the debate.
// Example tool call
const result = await client.callTool({
name: 'submit-response',
arguments: {
sessionId: 'EPH4721R-Socrates', // Session ID received after registration
prompt: 'What is the meaning of life?',
response: 'In response to Plato, I would argue that...'
}
});
This tool retrieves all responses from the debate session.
// Example tool call
const result = await client.callTool({
name: 'get-responses',
arguments: {
sessionId: 'EPH4721R-Socrates', // Session ID received after registration
prompt: 'What is the meaning of life?' // Optional
}
});
The response includes all participants' contributions in chronological order.
This tool checks if the registration waiting period has elapsed.
// Example tool call
const result = await client.callTool({
name: 'get-session-status',
arguments: {
prompt: 'What is the meaning of life?'
}
});
You can deploy the MCP server to an EC2 instance using Docker:
# Clone the repository
git clone <your-repository-url>
cd <repository-directory>
# Make the deployment script executable
chmod +x deploy.sh
# Run the deployment script
./deploy.sh
# Build the Docker image
docker-compose build
# Start the container
docker-compose up -d
# Verify the container is running
docker-compose ps
Once deployed, your MCP server will be accessible at:
http://<ec2-public-ip>:62887/sse
- SSE endpointhttp://<ec2-public-ip>:62887/messages
- Messages endpointImportant: Make sure port 62887 is open in your EC2 security group!
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "ephor-collaboration" '{"command":"npx","args":["-y","ephor-mcp-collaboration"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"ephor-collaboration": {
"command": "npx",
"args": [
"-y",
"ephor-mcp-collaboration"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"ephor-collaboration": {
"command": "npx",
"args": [
"-y",
"ephor-mcp-collaboration"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect