ZulipChat MCP Server

io.github.akougkas由 GitHub 账号 akougkas 发布v0.4.2更新于 Oct 24, 2026

ZulipChat MCP: Connect AI to Zulip with 60+ tools for messaging, streams, events, and analytics

概览

AI 生成的概览

将 AI 助手连接到 Zulip 工作区,用于读取、搜索、发送和回应消息,并管理代理会话。

可以做什么
通过 MCP 将兼容的 AI 助手连接到 Zulip 服务器,默认提供 20 个核心工具,扩展模式下提供 60 个。核心工具涵盖消息的发送、编辑、读取和回应,搜索历史记录,列出频道和话题,解析用户,以及将代理会话绑定到 Zulip 话题并支持话题内审批请求。扩展模式增加定时消息、草稿、事件队列、文件上传、在线状态、用户组和分析功能。可选的 LLM 分析使用服务器端的 Anthropic 提供程序。
适用场景
当助手需要在 Zulip 组织内工作时适用:了解频道动态、发送公告或私信、搜索对话历史,或运行长期代理会话以接收提及并在话题中请求审批。
运行要求
通过 PyPI 包 zulipchat-mcp 以 stdio 方式在本地运行,通常用 uvx 启动。需要 Zulip API 密钥和账户邮箱,可通过 zuliprc 文件或 ZULIP_API_KEY、ZULIP_EMAIL、ZULIP_SITE 环境变量提供。可选 HTTP 传输需要 bearer 令牌;可选 LLM 分析需要 ANTHROPIC_API_KEY。
安装前请注意
ZULIP_API_KEY 可访问所配置的 Zulip 账户,请妥善保管 zuliprc 文件和环境变量。助手可以发送、编辑、回应和删除消息以及上传文件,会改变工作区数据。HTTP 传输会将账户暴露给持有 bearer 令牌的任何人;本地文件操作和身份切换请使用 stdio。管理工具需要 --unsafe 标志。

安装

在 SourceWeft 中

  1. 打开 控制台中的 ZulipChat MCP Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

ZulipChat MCP Server

Model Context Protocol server for Zulip Chat. Connect Claude Code, Codex, Clio Coder, OpenCode, Copilot, Antigravity CLI, Gemini CLI, and other MCP clients to Zulip.

[PyPI] [CI] [Publish] [Coverage Gate] [Downloads] [GitHub stars] [Python] [License] [MCP]

Quick Start · Setup Wizard · Integrations · Two-Tier Tools · Contributing


Quick Start

bash
uvx zulipchat-mcp --zulip-config-file ~/.zuliprc

Configure this command in your MCP client to let the assistant read and write Zulip messages with the configured account.

Need a zuliprc? Zulip Settings > Personal > Account & privacy > API key — download the file, save it as ~/.zuliprc.

Interactive onboarding:

bash
uvx --from zulipchat-mcp zulipchat-mcp-setup

What This Does

ZulipChat MCP bridges any MCP-compatible AI assistant (Claude Code, Gemini CLI, Cursor, Windsurf, etc.) to your Zulip workspace. The assistant can:

  • Send and read messages — stream messages, DMs, replies, reactions
  • Search conversation history — full-text search with filters for sender, stream, time range
  • Resolve people by name — verify a unique recipient before sending; ambiguous names need clarification
  • Switch identities — post as yourself or as a bot, in the same session
  • Monitor activity — search recent messages, get stream info, check who's online
  • Bind sessions to Zulip topics — give long-running agent sessions a stable control topic
  • Receive ordinary bot mentions — an event-fed local inbox that your own host adapter polls to wake an agent and reply in the source topic, without /reply for conversation. The server is the transport; it does not launch or supervise coding agents
  • Reuse dated snapshots — short-lived message caches and rate-aware request admission reduce repeated API reads
  • Request approvals in-topic — owner replies with /approve REQUEST_ID or /deny REQUEST_ID in the session topic; each decision names the request it answers
  • Load Agent Skills — four packaged instructions for messaging, session control, notifications, and bounded work loops, available as local files and MCP Resources
  • Export agent packages — native host configuration and skills, Claude's hook/plugin assets, or an Agent Plugins 1.0.0 package

Agent setup

bash
# Substitute another supported client as needed.uvx --from zulipchat-mcp zulipchat-mcp-integrate export --client clio-coder \  --output-dir /absolute/path/to/project \  --zulip-config-file /absolute/path/to/.zuliprc --extended-tools

Exports support claude-code, codex, opencode, copilot, vscode, antigravity-cli, clio-coder, and generic. Add --mode plugin for a package. For several Zulip organizations, export once per organization with --server-id zulipchat-<org>; exports merge into one host configuration. Account state lives under ~/.local/state/zulipchat-mcp/. Host trust remains explicit; Clio configures MCP execution separately from plugin content. See the capability matrix, Clio guide, and complete workflow.

For read-only access, add --tool-profile read-only: discovery and execution both expose nine core reads or 23 extended reads. The default full profile retains 20/60 tools. See API coverage and efficiency for cache freshness, rate limits and the boundary between message transport and host execution. The live Luna experiment records normal mention-to-bot replies from a real Clio TUI driven by a private, unshipped host adapter. Other hosts were tested through exported configuration and fake-credential checks, not live sessions.

Two-Tier Tool Architecture

v0.6.0 introduced a deliberate split: 20 core tools by default, 60 tools when you need more.

Core Mode (default)

The 20 tools that cover most daily use:

CategoryTools
Messagingsend_message, edit_message, get_message, add_reaction
Searchsearch_messages, get_streams, get_stream_info, get_stream_topics
Usersresolve_user, get_users, get_own_user
Agent Commsteleport_chat, register_agent, ensure_agent_session, agent_message, request_user_input, wait_for_response
Systemswitch_identity, server_info, manage_message_flags

Why 20 instead of 60? Fewer tools means faster tool selection, lower token overhead, and less confusion for the AI. Most tasks — sending messages, searching, reacting, and binding an agent session to Zulip — only need the core set.

Extended Mode

Need scheduled messages, event queues, file uploads, analytics, or advanced search?

bash
uvx zulipchat-mcp --zulip-config-file ~/.zuliprc --extended-tools

Or via environment variable:

bash
ZULIPCHAT_EXTENDED_TOOLS=1 uvx zulipchat-mcp --zulip-config-file ~/.zuliprc

Extended mode adds: toggle_reaction, cross_post_message, advanced_search, construct_narrow, get_scheduled_messages, manage_scheduled_message, get_drafts, create_draft, edit_draft, delete_draft, register_events, get_events, listen_events, upload_file, manage_files, get_daily_summary, manage_user_mute, get_user, get_presence, get_user_groups, and more.

Installation

Full per-client setup guide: docs/integrations/README.md

Claude Code

bash
claude mcp add zulipchat -- uvx zulipchat-mcp --zulip-config-file ~/.zuliprc

With dual identity (you + a bot):

bash
claude mcp add zulipchat -- uvx zulipchat-mcp \  --zulip-config-file ~/.zuliprc \  --zulip-bot-config-file ~/.zuliprc-bot

Optional Claude hook bridge for lifecycle and approval routing:

bash
uvx --from zulipchat-mcp zulipchat-mcp-hook \  --zulip-config-file ~/.zuliprc \  --zulip-bot-config-file ~/.zuliprc-bot

Optional Claude package export for project-local hooks, skills, and subagents:

bash
uvx --from zulipchat-mcp zulipchat-mcp-integrate export \  --client claude-code \  --mode standalone \  --output-dir . \  --zulip-config-file ~/.zuliprc \  --zulip-bot-config-file ~/.zuliprc-bot

Gemini CLI

Add to ~/.gemini/settings.json under mcpServers:

json
{  "zulipchat": {    "command": "uvx",    "args": ["zulipchat-mcp", "--zulip-config-file", "/path/to/.zuliprc"]  }}

Claude Desktop / Cursor / Any MCP Client

Add to your MCP configuration:

json
{  "mcpServers": {    "zulipchat": {      "command": "uvx",      "args": ["zulipchat-mcp", "--zulip-config-file", "/path/to/.zuliprc"]    }  }}

Configuration Options

OptionDescription
--zulip-config-file PATHPath to your zuliprc file
--zulip-bot-config-file PATHBot zuliprc for dual identity
--extended-toolsRegister all 60 tools instead of the 20-tool core set
--tool-profile {full,read-only}Filter discovery and enforce read-only Zulip calls; default: full
--transport {stdio,http}Transport to serve on (default: stdio)
--host HOSTBind host for HTTP transport (default: 127.0.0.1)
--port PORTBind port for HTTP transport (default: 8000)
--auth-token TOKENBearer auth token for HTTP transport (or ZULIPCHAT_HTTP_AUTH_TOKEN)
--allowed-host HOSTAdditional trusted HTTP hostname; repeat for multiple names
--allowed-origin URLAdditional trusted browser origin; repeat for multiple origins
--unsafeEnable administrative tools (use with caution)
--debugEnable debug logging
--associate-existing-dbDeliberately associate an unbound legacy database with the verified current account

Remote HTTP Transport

ZulipChat MCP supports stateless HTTP deployments under the MCP 2026-07-28 protocol:

bash
# Run server over HTTP with bearer authenticationZULIPCHAT_HTTP_AUTH_TOKEN=your-secret-token \  uvx zulipchat-mcp --zulip-config-file ~/.zuliprc --transport http --host 0.0.0.0 --port 8000 --allowed-host mcp.internal

Generate client integration snippets for remote HTTP connections:

bash
uvx --from zulipchat-mcp zulipchat-mcp-integrate print --client claude-code --remote-url http://mcp.internal:8000/mcp --remote-token your-secret-token

HTTP startup requires a bearer token for non-loopback binds and validates Host and Origin headers. Configure --allowed-host for the hostname used by clients or a reverse proxy; terminate TLS at the proxy for remote connections. A token grants access to the configured Zulip account: deploy a separate instance per trusted account, rather than sharing it across unrelated users.

HTTP tools reject server-local file paths, outbound event callbacks, and switch_identity. Upload text with file_content or binary bytes with file_content_base64; download without download_path to obtain a URL. Use stdio for local file operations and runtime identity switching. Attachment deletion requires --unsafe.

Persistent state defaults to an account-scoped directory. An explicitly selected ZULIPCHAT_DB_PATH is associated with the normalized realm and user/bot principals; a different account cannot reuse it. Legacy state is left intact and requires deliberate association. See database migration.

Agent sessions, approvals, listener cursors, and default background-task storage remain local state. Use a single instance for these workflows. Separate DuckDB paths avoid writer conflicts but do not share session data; ordinary round-robin routing across such replicas is not supported. Legacy HTTP clients may also retain transport sessions.

AI Analytics & LLM Provider

AI-powered analytics tools (analyze_stream_with_llm, analyze_team_activity_with_llm, intelligent_report_generator) execute using a server-side Anthropic LLM provider:

  • Set ANTHROPIC_API_KEY on the server process for LLM generation.
  • Optionally set ANTHROPIC_MODEL to override the default model (claude-opus-5).
  • Without an API key, analytics tools return structured data summaries with llm_unavailable: true so your client assistant can analyze the data directly.

More clients

Dedicated setup pages:

Dual Identity

Configure both a user and a bot zuliprc to let your assistant switch between identities mid-session:

bash
uvx zulipchat-mcp \  --zulip-config-file ~/.zuliprc \  --zulip-bot-config-file ~/.zuliprc-bot

The assistant posts as you by default. Call switch_identity to post as the bot — useful for automated notifications, agent-to-agent communication, or keeping human vs. bot messages distinct.

Real-World Examples

"Catch me up on what happened in #engineering today" → Assistant calls search_messages with stream + time filter, summarizes the thread.

"Tell the team we're deploying at 3pm" → Assistant calls send_message to #engineering with the announcement.

"Who sent that message about the API migration?" → Assistant calls search_messages with keywords, returns sender and context.

"React with :thumbs_up: to Sarah's last message" → Assistant calls resolve_user ("Sarah"), search_messages (sender), then add_reaction.

"DM Jaime that the PR is ready" → Assistant calls teleport_chat with fuzzy name resolution — no email needed.

Development

bash
git clone https://github.com/akougkas/zulipchat-mcp.gitcd zulipchat-mcpuv syncuv run zulipchat-mcp --zulip-config-file ~/.zuliprc

Run checks:

bash
uv run pytest -q              # full test suite, 60% coverage gateuv run ruff check .           # Lintinguv run mypy src               # Type checking

For packaging, dependency, FastMCP, or startup changes, run the release smoke:

bash
uv buildscripts/pre_release_smoke.sh --version X.Y.Z --allow-dirty

See CONTRIBUTING.md for the full guide, and CLAUDE.md / AGENTS.md for AI agent instructions.

Architecture

src/zulipchat_mcp/├── core/           # Client wrapper, identity, caching, security├── tools/          # MCP tool implementations (two-tier registration)├── services/       # Background listener and session event routing├── utils/          # Logging, DuckDB persistence, metrics└── config.py       # config loading (zuliprc + environment fallback)

Built on FastMCP with async-first design, DuckDB for agent state persistence, and smart user/stream caching for fast fuzzy resolution.

Privacy

  • No data collection — nothing leaves your machine except Zulip API calls
  • No telemetry — zero analytics, tracking, or usage reporting
  • Local execution — all processing happens on your hardware
  • Credentials stay local — API keys are never logged or transmitted beyond your Zulip server

Full policy: PRIVACY.md

License

MIT — See LICENSE

Links


Built for the Zulip community

来源:README.md,提交 31d4611

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.4.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分