rocketchat-mcp-server
A FastMCP (Python) server for Rocket.Chat with 28 tools covering channels, messages, threads, DMs, files, users, and analytics, plus AI governance, observability, and security features.
README
rocketchat-mcp-server
A FastMCP (Python) server for Rocket.Chat — 28 tools with AI governance,
observability, and monitoring built in. A ground-up rewrite of the Go server
rocketchat-mcp-go, applying the systematic MCP-server approach in
ADR 0001.
Highlights
- 28 tools across channels, messages, threads, DMs, files, users, and analytics.
- Token economy: message grouping (consecutive same-user merge), compact mode, parallel thread expansion, server-side channel digests.
- Governance:
READ_ONLYmode (write tools hidden), per-toolreadOnlyHint/destructiveHintannotations, optional human-in-the-loop approval for consequential writes, structured audit events, and a bearer-token gateway. - Observability: structlog JSON logs with secret redaction, per-tool logging
middleware,
/metrics(Prometheus), optional OpenTelemetry tracing, and/healthz+/readyz. - Security: SSRF host guard + 25 MB cap on downloads, filename escaping on uploads, URL scheme validation, bounded pagination. See the security review.
Quick start
uv sync --extra dev --extra metrics
export ROCKETCHAT_URL="https://chat.example.com"
export ROCKETCHAT_AUTH_TOKEN="<personal access token>"
export ROCKETCHAT_USER_ID="<user id>"
# HTTP (Streamable) transport on :8000, endpoint /mcp
uv run rocketchat-mcp --mode http
# stdio transport (local MCP clients)
uv run rocketchat-mcp --mode stdio
Configuration
Go-compatible env vars are preserved: ROCKETCHAT_URL, ROCKETCHAT_AUTH_TOKEN,
ROCKETCHAT_USER_ID, READ_ONLY, MCP_PORT. New settings use the RCMCP_
prefix — notably RCMCP_APPROVE_WRITES, RCMCP_GATEWAY_TOKENS
(token:principal,...), RCMCP_READ_ONLY, RCMCP_ENABLE_METRICS,
RCMCP_LOG_JSON. See config.py.
Security note: the HTTP transport should sit behind the bearer-token gateway (
RCMCP_GATEWAY_TOKENS) and TLS termination (Traefik/nginx). The server holds a single Rocket.Chat identity — every authorised caller shares its permission ceiling.
Development
uv run ruff check .
uv run mypy src
uv run pytest -m "not live" # default: respx-mocked, no live server needed
Live integration tests
tests/test_live.py exercises the server against a real Rocket.Chat. They
are excluded from the default suite and CI, and only touch a dedicated test
channel (default mcp-test), cleaning up every message they create. The
configured account must be a member of that channel.
RCMCP_LIVE=1 RCMCP_TEST_CHANNEL=mcp-test \
ROCKETCHAT_URL=... ROCKETCHAT_AUTH_TOKEN=... ROCKETCHAT_USER_ID=... \
uv run pytest -m live
Pin/react tests skip automatically when the account lacks those permissions.
Deployment
- Docker / Podman:
Dockerfilebuilds a non-root OCI image. A systemd quadlet unit is indeploy/quadlet/. - Release: tag
v*triggers the multi-arch nexus push workflow.
Architecture Decision Records
This server is built to a documented, systematic standard. The design rationale
lives in ADRs under docs/adr/:
- ADR 0001 — A systematic approach to building MCP servers — the house standard for architecture, AI governance, observability, and engineering practice that this repository implements.
- ADR 0002 — Per-principal upstream identity (multi-tenant) — opt-in per-caller Rocket.Chat credentials so actions are attributable.
New consequential decisions are recorded as additional numbered ADRs.
Documentation
- System design — FastMCP adoption design, tool parity, delivery phases.
- Bot identity — message alias vs a dedicated bot account, and how to set one up.
- Cutover runbook — migrating from the Go server and retiring it.
- Architecture Decision Records — see above.
- Security review — Snickers / Snyk agent-security findings and their dispositions.
Provenance
A ground-up FastMCP (Python) rewrite of the Go server rocketchat-mcp-go,
applying lessons from openproject-gt-mcp-server (layered architecture,
observability, human-in-the-loop) and redmine-mcp-server (tag-based tool
visibility, {error, hint, code} envelope, secret scrubbing). Tracked under
OpenProject AI and Automation / EPIC #9810.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。