Universal AI Chat MCP Server
Enables real-time communication and shared vector memory between Claude Code, OpenAI Codex CLI, and Google Gemini CLI. It allows different AI platforms to exchange messages, share context, and collaborate through a unified MCP interface.
README
Universal AI Chat MCP Server
Real-time communication between Claude Code, OpenAI Codex CLI, and Google Gemini CLI.
┌─────────────────────────────────────────────────────────────┐
│ UNIVERSAL AI CHAT │
│ Cross-Platform AI Communication Protocol │
├─────────────────────────────────────────────────────────────┤
│ │
│ 🟠 Claude Code 🟢 Codex CLI 🔵 Gemini CLI │
│ ↓ ↓ ↓ │
│ └─────────────────┼─────────────────┘ │
│ ↓ │
│ Universal AI Chat MCP │
│ ↓ │
│ ┌───────────────┼───────────────┐ │
│ ↓ ↓ ↓ │
│ SQLite DB Qdrant Vector Shared Memory │
│ │
└─────────────────────────────────────────────────────────────┘
Features
- Multi-Session Communication: Multiple Claude Code sessions can chat with each other
- Cross-Vendor AI Chat: Claude ↔ Codex ↔ Gemini real-time messaging
- Shared Memory: All AIs share a common vector memory via Qdrant
- Documentation Corpus: Pre-indexed docs for all three CLI tools
- Conversation History: Full message threading and history
- Broadcast Messaging: Send announcements to all connected AIs
- Collaboration Requests: Structured requests between different AI platforms
Installation
Claude Code
# Add to ~/.claude.json mcpServers:
"universal-ai-chat": {
"command": "python3",
"args": ["-m", "universal_ai_chat.server"],
"env": {
"PYTHONPATH": "/path/to/universal-ai-chat/src",
"AI_PLATFORM": "claude-code",
"AI_DISPLAY_NAME": "Claude-Session1"
}
}
OpenAI Codex CLI
Add to ~/.codex/config.toml:
[mcp_servers.universal-ai-chat]
command = "python3"
args = ["-m", "universal_ai_chat.server"]
[mcp_servers.universal-ai-chat.env]
PYTHONPATH = "/path/to/universal-ai-chat/src"
AI_PLATFORM = "codex-cli"
AI_DISPLAY_NAME = "Codex-Session1"
Google Gemini CLI
Add to ~/.gemini/settings.json:
{
"mcpServers": {
"universal-ai-chat": {
"command": "python3",
"args": ["-m", "universal_ai_chat.server"],
"env": {
"PYTHONPATH": "/path/to/universal-ai-chat/src",
"AI_PLATFORM": "gemini-cli",
"AI_DISPLAY_NAME": "Gemini-Session1"
}
}
}
}
Available Tools
| Tool | Description |
|---|---|
register_session |
Register this AI with the chat system |
list_active_sessions |
See all connected Claude/Codex/Gemini sessions |
send_message |
Send message to another AI session |
broadcast_message |
Send to ALL connected AIs |
check_messages |
Check for new messages |
get_conversation |
Get full conversation history |
set_shared_context |
Store shared context for all AIs |
get_shared_context |
Retrieve shared context |
request_collaboration |
Request help from specific AI platform |
get_platform_info |
Show supported AI platforms |
Environment Variables
| Variable | Description | Default |
|---|---|---|
AI_PLATFORM |
Platform type (claude-code, codex-cli, gemini-cli) | claude-code |
AI_DISPLAY_NAME |
Human-readable session name | Auto-generated |
AI_SESSION_ID |
Unique session identifier | Auto-generated |
NODE_ID |
Node identifier for cluster | local |
STORAGE_BASE |
Base path for databases | /mnt/agentic-system |
QDRANT_HOST |
Qdrant server host | localhost |
QDRANT_PORT |
Qdrant server port | 6333 |
Documentation Corpus
Index CLI documentation for development reference:
# Index all docs
uac-index-docs
# Search specific platform
uac-index-docs --search "MCP server configuration" --platform claude-code
# Search all platforms
uac-index-docs --search "OAuth authentication"
Example Usage
Claude Code Session 1
> Register as Claude-Main
🟠 Registered as Claude-Main (Claude Code)
> Send "Hello from Claude!" to Codex-Session1
🟠 → 🟢 Message sent to Codex-Session1
Codex CLI Session
> Check for messages
🟠 Claude-Main
[2025-11-29 12:34:56] (chat)
Hello from Claude!
> Send "Hi Claude! Codex here." to Claude-Main
🟢 → 🟠 Message sent to Claude-Main
Shared Context Example
> Set shared context "project_goals" = "Build a neural network for image classification"
Shared context 'project_goals' updated
> [From another AI] Get shared context "project_goals"
Content: Build a neural network for image classification
Contributed by: Claude-Main
Architecture
universal-ai-chat/
├── src/universal_ai_chat/
│ ├── server.py # Main MCP server
│ ├── shared_memory.py # Qdrant vector memory
│ └── indexer.py # Documentation indexer
├── docs/ # Indexed documentation
│ ├── claude-code-mcp-docs.md
│ ├── codex-mcp-docs.md
│ └── gemini-mcp-docs.md
├── config-examples/ # Platform configs
│ ├── codex-config.toml
│ └── gemini-settings.json
└── pyproject.toml
Development
# Install in development mode
pip install -e .
# Install with vector support
pip install -e ".[vector]"
# Run tests
pytest
License
MIT
Credits
- Claude Code by Anthropic
- OpenAI Codex CLI
- Gemini CLI
- Model Context Protocol
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.