Collaborative MCP Proxy Server
Enables multi-AI collaborative analysis by proxying requests to existing login-based MCP servers (Gemini CLI and Codex CLI) from Claude Desktop or Claude Code.
README
š¤ Collaborative MCP Proxy Server
Multi-AI collaborative analysis system for Claude Desktop and Claude Code using existing login-based MCP servers.
⨠Features
- Multi-AI Collaboration: Integrates Ollama, Gemini CLI, Codex CLI, and Serena MCP
- ARM64 Mac Optimized: Native Apple Silicon performance
- Login-Based Authentication: Uses existing CLI configurations (no API keys needed)
- Privacy-Focused: Local processing with Ollama for sensitive data
- Pressure Vessel Analysis: Specialized engineering analysis capabilities
- Claude Integration: Works with both Claude Desktop and Claude Code
Installation
Prerequisites
- Node.js 18+
- Existing Gemini CLI MCP and Codex CLI MCP installed and logged in
- Claude Desktop or Claude Code
Setup
- Clone/Create the project:
mkdir collaborative-mcp-proxy
cd collaborative-mcp-proxy
# Copy the files: package.json, index.js, proxy-handler.js
- Install dependencies:
npm install
- Make executable:
chmod +x index.js
Configuration
Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"collaborative-proxy": {
"command": "node",
"args": ["/path/to/collaborative-mcp-proxy/index.js"]
}
}
}
Claude Code Configuration
Add to your MCP configuration:
{
"collaborative-proxy": {
"command": "node",
"args": ["/path/to/collaborative-mcp-proxy/index.js"]
}
}
Usage
Once configured, you can use the collaborative analysis in Claude:
Basic Analysis
Use the collaborate tool to analyze this pressure vessel specification...
Planning Mode
{
"tool": "collaborate",
"arguments": {
"task": "Create analysis plan for pressure vessel design",
"mode": "plan"
}
}
Full Analysis Mode
{
"tool": "collaborate",
"arguments": {
"task": "Analyze pressure vessel compliance with ASME standards",
"content": "Vessel specifications...",
"mode": "apply"
}
}
Review Mode
{
"tool": "collaborate",
"arguments": {
"task": "Review completed analysis",
"content": "Previous analysis results...",
"mode": "review"
}
}
Collaboration Modes
1. Plan Mode (mode: "plan")
- Creates detailed analysis plan using Gemini
- Identifies objectives, focus areas, and deliverables
- Best for complex tasks requiring upfront planning
2. Apply Mode (mode: "apply") - Default
- Performs full collaborative analysis
- Gemini: Comprehensive analysis and risk assessment
- Codex: Technical implementation and compliance analysis
- Generates synthesized consensus
- Most comprehensive option
3. Review Mode (mode: "review")
- Reviews and validates existing analysis
- Provides quality assessment and improvements
- Best for validation of completed work
How It Works
Architecture
Claude Desktop/Code
ā
Collaborative MCP Proxy
ā
āāāāāāāāāāāāāāā¬āāāāāāāāāāāāāā
ā Gemini CLI ā Codex CLI ā
ā MCP ā MCP ā
ā (logged in) ā (logged in) ā
āāāāāāāāāāāāāāā“āāāāāāāāāāāāāā
Workflow
- Request: Claude sends collaboration request to proxy
- Distribution: Proxy calls individual MCPs via subprocess
- Collection: Proxy gathers results from each MCP
- Synthesis: Proxy generates consensus using Gemini
- Response: Combined analysis returned to Claude
Agent Specializations
- Gemini: System-level analysis, risk assessment, comprehensive evaluation
- Codex: Technical implementation, code quality, standards compliance
- Consensus: Synthesis of all perspectives with unified recommendations
Implementation Details
Subprocess Calling
The proxy server calls existing MCPs as subprocesses, preserving their login sessions:
const geminiProcess = spawn('gemini-cli-command', args);
const codexProcess = spawn('codex-cli-command', args);
Error Handling
- Timeout protection (2 minutes per MCP call)
- Graceful degradation if one MCP fails
- Detailed error logging for debugging
Mock Implementation
Current implementation includes mock responses for demonstration. To connect to real MCPs:
- Update
callGeminiMCP()to spawn actual Gemini CLI process - Update
callCodexMCP()to spawn actual Codex CLI process - Ensure proper JSON-RPC message formatting
Development
Testing
# Start the server in development mode
npm run dev
# Test with manual JSON-RPC calls
echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | node index.js
Debugging
The server logs to stderr, so you can monitor activity:
node index.js 2> debug.log
Extending
To add new MCPs or capabilities:
- Add new methods to
ProxyHandler - Update tool schema in
handleToolsList() - Implement subprocess calling logic
Troubleshooting
Common Issues
1. MCP Not Recognized
- Verify
claude_desktop_config.jsonpath is correct - Restart Claude Desktop after configuration changes
- Check file permissions on
index.js
2. Subprocess Errors
- Ensure Gemini CLI and Codex CLI are installed and logged in
- Verify MCP command paths are correct
- Check Node.js version (18+ required)
3. Timeout Issues
- Increase timeout in
proxy-handler.jsif needed - Check network connectivity for external MCP calls
- Monitor stderr logs for detailed error information
Logging
All server activity is logged to stderr:
# View logs while running
node index.js 2>&1 | grep "MCP Proxy"
License
MIT License - See LICENSE file for details
Contributing
- Fork the repository
- Create feature branch
- Add tests for new functionality
- Submit pull request
Roadmap
- [ ] Real MCP subprocess integration
- [ ] Configuration file support
- [ ] Advanced workflow orchestration
- [ ] Result caching and persistence
- [ ] Web UI for collaboration management
- [ ] Integration with more AI models
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.