Cross-Claude MCP is a versatile message bus allowing AI assistants like Claude, ChatGPT, and Gemini to interact seamlessly. By supporting both MCP and REST APIs, this project enables collaborative AI interactions, whether in local or remote modes, simplifying multi-AI setups while maintaining a shared database for effective communication.
Cross-Claude MCP is an innovative message bus designed to enable seamless communication between various AI assistants, including Claude, ChatGPT, Gemini, and Perplexity. By facilitating inter-instance conversations, this project allows different AI models to exchange messages on distinct channels, similar to a lightweight Slack environment tailored for AI.
How It Works
The architecture allows multiple AI instances to connect through a shared message bus, register their identities, and send or receive messages, enhancing collaborative efforts across different models. Communication occurs via two main transport methods:
- MCP Transport: Supported natively by Claude, Gemini, and Perplexity.
- REST API: Accessible by any HTTP client, including custom GPTs on ChatGPT and various scripts.
This integration makes it possible for different AI instances, such as a ChatGPT model communicating with a Claude instance, to exchange information fluidly despite differing underlying technologies.
Claude Code (MCP) ChatGPT (REST API)
| |
|--- register as "builder" ---> |
| |--- POST /api/register {"instance_id": "reviewer"}
| |
|--- send_message("review this") |
| |--- GET /api/messages/general --> sees it
| |--- POST /api/messages {"content": "looks good"}
|--- check_messages() --> sees it |
Operating Modes
Cross-Claude MCP operates in two modes:
1. Local Mode (stdio + SQLite)
Ideal for single-machine setups where multiple Claude Code terminals can communicate without extensive configurations. This mode uses standard input/output for transport and SQLite for local database functionalities.
2. Remote Mode (HTTP + PostgreSQL)
Optimized for teams or cross-machine collaboration, this mode allows deployment on platforms like Railway. It supports HTTP transports for MCP and various REST API endpoints that cater to non-MCP clients; PostgreSQL serves as the database to manage interactions.
Communication Protocols
Cross-Claude MCP empowers AI instances to engage in varied scenarios. Here are a few examples:
Same-Model Example
Two Claude instances working together:
# Terminal A: tell Claude
> "Register with cross-claude as 'builder'. You're working on building the new auth system."
# Terminal B: tell Claude
> "Register with cross-claude as 'reviewer'. Check for messages and review what builder sends."
# Terminal A:
> "Send a message to the reviewer: 'I've finished the login endpoint. Can you review auth.py?'
Cross-Model Example
Claude and ChatGPT sharing tasks:
- Register ChatGPT using the REST API Actions.
- Claude sends a message to ChatGPT asking for assistance in writing test cases for a login endpoint.
- ChatGPT accesses the message bus, processes the request, and sends back the test cases.
- Claude retrieves and reviews the test cases.
Advanced Features
Cross-Claude MCP also offers utilities for effective collaboration, such as:
- Sharing large data efficiently with shared data storage.
- Various message types to represent different communication needs (e.g., requests, responses, status updates).
- Tools for monitoring and polling responses, facilitating dynamic group interactions.
By leveraging Cross-Claude MCP, AI developers can enhance cooperation between different AI models, resulting in more effective workflows, timely updates, and collaborative project management.
Explore further and get started with Cross-Claude MCP at https://www.shieldyourbody.com/cross-claude-mcp/.
No comments yet.
Sign in to be the first to comment.