Remote MCP server for SwitchX communities, channels, groups, and messages.
概览
A remote Model Context Protocol server for SwitchX, deployed on Cloudflare Workers. SwitchX MCP exposes a small, focused set of tools for AI clients to work with SwitchX social primitives: - communities - channels - groups - messages It is designed for clients such as Hermes, Cursor, Claude Desktop via a remote MCP adapter, or any MCP-compatible host that supports Streamable HTTP. The MCP endpoint uses the connecting SwitchX user's own auth token. The Worker does use a shared MCP token. It forwards the user token to the SwitchX backend so permissions remain user-scoped. - a valid SwitchX user token is required to connect; - backend authorization still decides what the user can do; - tools that create, update, or delete resources run with the user's permissions. /health is public and does not require auth.
README
以下为原文 README 节选,完整内容请查看原文。
SwitchX MCP
A remote Model Context Protocol server for SwitchX, deployed on Cloudflare Workers.
SwitchX MCP exposes a small, focused set of tools for AI clients to work with SwitchX social primitives:
- communities
- channels
- groups
- messages
It is designed for clients such as Hermes, Cursor, Claude Desktop via a remote MCP adapter, or any MCP-compatible host that supports Streamable HTTP.
Public endpoints
MCP endpoint: https://mcp.switchx.gg/mcp
Health endpoint: https://mcp.switchx.gg/health
Health check:
curl https://mcp.switchx.gg/health
Expected response:
{"status":"ok","service":"switchx-mcp"}
Authentication
The MCP endpoint uses the connecting SwitchX user’s own auth token.
Every MCP request to /mcp must include:
Authorization: Bearer
The Worker does not use a shared MCP token. It forwards the user token to the SwitchX backend so permissions remain user-scoped.
This means:
- a valid SwitchX user token is required to connect;
- backend authorization still decides what the user can do;
- tools that create, update, or delete resources run with the user’s permissions.
/health is public and does not require auth.
Available tools
Tool names are registered as MCP tools by the server. Hermes prefixes remote MCP tools with the configured server name, for example:
mcp_switchx_switchx_create_community
The raw MCP tool names are:
Communities
| Tool | Purpose |
|---|---|
switchx_create_community |
Create a SwitchX community and initialize creator admin access using the same admin setup flow used by the React Native app. |
switchx_list_communities |
List or search communities. |
switchx_get_community |
Get a community by ID or username. |
switchx_update_community |
Update community metadata. |
Channels
| Tool | Purpose |
|---|---|
switchx_list_channels |
List channels in a community. |
switchx_create_channel |
Create a channel in a community. |
switchx_update_channel |
Update a channel. |
switchx_delete_channel |
Delete a channel. |
Groups
| Tool | Purpose |
|---|---|
switchx_list_groups |
List groups in a community. |
switchx_create_group |
Create a group in a community. |
switchx_update_group |
Update a group. |
switchx_delete_group |
Delete a group. |
Messages
| Tool | Purpose |
|---|---|
switchx_send_message |
Send a message to a channel, group, or direct user target. |
switchx_get_channel_chat_history |
Get channel chat history. |
switchx_get_group_chat_history |
Get group chat history. |
switchx_get_message |
Get a message by ID. |
switchx_edit_message |
Edit a message. |
switchx_delete_messages |
Delete one or more messages. |
Intentional v1 non-goals
SwitchX MCP v1 intentionally does not expose:
- quests;
- roles;
- moderation tools;
- stickers;
- organizations;
安装
npx wrangler deploy --dry-run