zulipmcp CLAUDE.md

zulipmcp CLAUDE.md is an instructions file for coding agents from windborne/zulipmcp. It costs 922 tokens per session, scanned B, a copy of zulipmcp CLAUDE.md, Apache-2.0.

A Claude Code instruction file for ZulipMCP, a project that connects the Zulip team-chat service to AI tools through MCP.

In plain words
What is it for?
Guiding changes to Zulip API wrappers, MCP tools, event listening, agent backends, and the Hermes gateway integration.
Why use it?
It documents the architecture, public-code safety rules, and implementation details that are easy to miss when editing the project.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/windborne/zulipmcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/windborne/zulipmcp

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for zulipmcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/windborne/zulipmcp/claude-md.svg)](https://agentmods.dev/instructions/windborne/zulipmcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/windborne/zulipmcp/claude-md"><img src="https://agentmods.dev/badge/instructions/windborne/zulipmcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 922 This file is loaded in full into every session.
When invoked 922 The same file — it is already loaded in full.
Security scan B 1 finding. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00922 $0.00922
Opus 5 $0.00461 $0.00461
Sonnet 5 $0.00184 $0.00184
Haiku 4.5 $0.00092 $0.00092

Measured 4d ago against content hash 0d401fa52144, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

zulipmcp CLAUDE.md scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads MCP configurationmediumAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

- **Codex MCP config is not `.mcp.json` native.** The listener translates `.mcp.json` into Codex `-c mcp_servers...` overrides. Keep secrets in env/header fields; env refs in command/args/cwd/url must fail closed to avoi
Origin

This is a copy

100% identical to zulipmcp CLAUDE.md — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

CLAUDE.md · 35 lines

How it starts

The opening of the file, as written. The whole thing — 35 lines — stays where its author put it; the contents beside it link to each section on GitHub.

zulipmcp

Public open-source repo. All code, commits, and PRs are visible to the world.

Rules

  • Nothing WindBorne-specific. No internal URLs, emails, Zulip instances, or infra references.
  • No internal context in PRs, commits, or comments.
  • Elegant, general code. Type hints everywhere. Minimal dependencies.

Architecture

  • core.py — Zulip API wrappers. No MCP dependency. Returns Python objects.
  • mcp.py — MCP tool layer + SessionState. Thin wrappers over core.py. Hooks system lives here.
  • agent_backends.py — Claude/Codex/OpenCode command builders for the listener. No Zulip API dependency.
  • hermes_plugin/zulip/ — Native Hermes gateway transport. It does not use MCP session state.

Separation is load-bearing: core.py must stay MCP-agnostic so it works as a standalone library import.

Gotchas

  • listen() is async, everything else is sync. It runs get_events() in a thread executor to interleave MCP keepalive pings. Don't make other tools async — FastMCP handles sync tools fine.
  • Event queue narrow does NOT filter reactions. is_dismiss_reaction() receives reactions from all streams — it fetches the reacted-on message to verify stream/topic. Don't remove that check.
  • _session is module-level singleton. One session per process. Don't add multi-session — MCP is one-client-per-server.
  • reply() checks for missed messages before sending. The last_seen_message_id bookkeeping is subtle — trace it carefully before changing.
  • Send tools enforce MAX_MESSAGE_LENGTH. Zulip silently truncates over-limit messages and still reports success — the guard returns an error to the caller instead. It measures the normalized form (post normalize_zulip_markdown()), since normalization can grow content. Override with ZULIP_MAX_MESSAGE_LENGTH for non-default realm caps.
  • Two dismiss-check paths exist intentionally. listen() catches via events, reply() via REST poll. Both needed — user might react during tool execution (not listening).
  • Interrupt-file reads must go through _consume_interrupt_file(). It claims via atomic rename before reading, so a writer replacing the file mid-consume can't have its content deleted unread — and it decodes with errors="replace" so a bad-bytes file can't wedge every future poll. Don't inline a read+delete elsewhere.
  • Private stream security is asymmetric on purpose. Unset BOT_ALLOWED_PRIVATE_STREAMS = no access (default-deny). Unset BOT_ALLOWED_WRITE_STREAMS = all writes allowed (backwards-compat). Don't "fix" the asymmetry.
  • configure() must be called before run_server(). run_server() may auto-init a session that reads hook state.
  • Codex MCP config is not .mcp.json native. The listener translates .mcp.json into Codex -c mcp_servers... overrides. Keep secrets in env/header fields; env refs in command/args/cwd/url must fail closed to avoid argv leaks.
  • OpenCode MCP config is not .mcp.json native. The listener translates .mcp.json into inline JSON via OPENCODE_CONFIG_CONTENT. Header values are embedded directly (no env-var indirection like Codex). Env refs in command/args/url are rejected.
  • core.py send paths (send_message/send_direct_message/edit_message) rewrite markdown via normalize_zulip_markdown(). Blank lines are injected before tables and bold/link combos Zulip breaks on are rewritten. Fenced/indented code is exempt from both fixes; inline code spans are exempt only for the bold/link rewrite. The Hermes gateway adapter sends via the raw client and is NOT normalized. ZULIPMCP_MARKDOWN_AUTOFIX=0 disables all of it.
  • remove_reaction() needs explicit reaction_type for custom emoji. Zulip's DELETE reactions endpoint defaults reaction_type to unicode_emoji — custom emoji removals fail silently without it. The listen indicator caches _listen_reaction_type alongside _listen_emoji; always pass both when removing.

Read the full file on GitHub · 35 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 35 lines · 922 tokens per session scan B 0d401fa52144

Subscribe to this mod's changes

zulipmcp CLAUDE.md is an instructions file published in the GitHub repository windborne/zulipmcp (0 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 922 tokens to every session, about $0.0046 per session on Opus 5. A static security scan graded it B with 1 finding (reads mcp configuration). It is 100% identical to zulipmcp CLAUDE.md, differing in 0 lines, and is treated as a copy.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens