Universal AI Chat MCP Server

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.

Category
访问服务器

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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选