Yunxin MCP Server for IM/RTC/DATA Open-API Integration
Integrate an MCP server with Yunxin's IM, RTC, and DATA Open-API to enable real-time messaging, calls, and data syncing.
npx -y @netease-im/yunxin-mcp-serverOverview
The Yunxin MCP Server is a lightweight bridge that connects external AI or backend services with Yunxin’s IM, RTC, and DATA Open-API surfaces using the Model Context Protocol (MCP). It acts as a middle-tier service that receives model-generated intents or events (chat messages, call actions, data updates), interprets them, and calls Yunxin Open-APIs to deliver real-time messaging, manage audio/video sessions, or sync application data across clients.
This server is useful when you want to combine large language models, bots, or other automated systems with Yunxin’s real-time capabilities without exposing credentials or implementing protocol handling inside the model runtime. The MCP server normalizes incoming model context messages, performs authentication and retries for Yunxin APIs, and provides webhook/callback endpoints for bidirectional integration.
Features
- Bridge between MCP-compliant model output and Yunxin IM/RTC/DATA Open-APIs
- Authenticated, configurable calls to Yunxin services (IM messages, RTC signaling, DATA sync)
- Webhook endpoints to accept model context and/or Yunxin callbacks
- Simple configuration via environment variables or config file
- Deployable as a container or run from source
- Extensible routing for custom actions and business logic
- Logging and basic error handling for API interactions
Installation / Configuration
Below are common installation and configuration patterns. Adjust values for your environment and follow Yunxin’s official docs to obtain API credentials.
Clone the repository:
Run locally (example using Node.js/npm — the repo can be built/run similarly if implemented in another runtime):
# install dependencies
# run with environment variables
Docker (recommended for production):
Example configuration file (config.yml):
server:
port: 8080
yunxin:
appKey: "your_app_key"
appSecret: "your_app_secret"
mcp:
secret: "mcp_shared_secret"
model:
endpoint: "https://your-model-endpoint.example.com"
logging:
level: info
Common environment variables:
- YUNXIN_APP_KEY — Yunxin application key
- YUNXIN_APP_SECRET — Yunxin application secret
- MCP_SECRET — shared secret to validate MCP messages
- MODEL_ENDPOINT — optional URL for model callbacks or context fetching
- PORT — HTTP port for the MCP server
Available Resources
- Source repository: https://github.com/netease-im/yunxin-mcp-server
- Yunxin Open-API documentation: consult your Yunxin account or vendor docs for up-to-date IM/RTC/DATA API reference and authentication guidelines
- Example config and Dockerfile in the repo for quick deployment
- Webhook/Curl examples in the repo demonstrating IM message forwarding and RTC signaling
Use Cases
Chatbot in IM
- A hosted LLM generates reply payloads and sends them to the MCP endpoint.
- The MCP server validates and converts the payload to Yunxin IM send-message calls.
- Example flow (model → MCP → Yunxin IM):
Automated call orchestration (RTC)
- A service triggers a voice/video call via the MCP server when a user requests human assistance.
- MCP translates the request into Yunxin RTC signaling and sends push notifications or SDP offers as required.
Data synchronization across devices (DATA)
- When a model decides to update user session state or shared documents, it posts updates to MCP.
- MCP writes the update to Yunxin DATA API so all connected clients receive consistent state.
Moderation and compliance