textbee-mcp CLAUDE.md

A set of Claude Code instructions for the textbee-mcp project, an MCP server that sends and reads SMS through a textbee.dev account. It documents project rules, commands, and the architecture of the source files.

In plain words
What is it for?
Use it when modifying textbee-mcp so agents follow its project conventions and avoid exposing API keys, phone numbers, or message contents.
Why use it?
It gives coding agents consistent rules for security, naming, errors, logging, and the supported SMS API routes.

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/textbee/textbee-mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/textbee/textbee-mcp
Per session 728 This file is loaded in full into every session.
When invoked 728 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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.00728 $0.00728
Opus 5 $0.00364 $0.00364
Sonnet 5 $0.00146 $0.00146
Haiku 4.5 $0.00073 $0.00073

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

Security

Grade A, and why

textbee-mcp CLAUDE.md scanned grade A with 0 findings 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 58 lines

How it starts

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

CLAUDE.md

Project instructions for Claude when working in the textbee-mcp repo.

What this is

@textbee/mcp: a stdio MCP server that lets Claude Desktop, Claude Code, Cursor, and any MCP client send and read SMS through a textbee.dev account. A thin wrapper over @textbee/sdk; the SDK is the only HTTP client, there is no code generation.

Hard rules

  • NEVER use em dashes or en dashes anywhere: code, comments, docs, commit messages.
  • Branding is lowercase "textbee" / "textbee.dev"; PascalCase identifiers use Textbee.
  • Acronyms are words in identifiers: sendSms, never sendSMS.
  • stdout is the MCP JSON-RPC channel. No console.log in src/; diagnostics go to stderr via stderrLogger.
  • Never log, echo, or embed API key values, phone numbers, or message bodies in errors.
  • Nothing throws across the MCP boundary: every handler returns isError: true with an actionable message via errorResult.
  • Never expose or document the deprecated device-scoped routes (send or history). Agent-facing surfaces show only account-level POST /gateway/send-sms and GET /gateway/messages.
  • The library entry (src/index.ts) must stay side-effect free: no process globals, no transport, no fetch patching. Only src/bin.ts touches process.
  • Tool handlers never close over a process-global API key; credentials come from the per-call CredentialResolver.

Commands

  • pnpm build compiles to dist/.
  • pnpm test runs vitest (capped at 2 workers).
  • pnpm run typecheck checks src and tests.
  • pnpm run check:hygiene enforces the dash, casing, and console.log rules.
  • pnpm inspect lists the tools through the MCP Inspector CLI.

Architecture (one bullet per src file)

  • bin.ts stdio bootstrap: loads env config, installs the fetch timeout, connects.
  • index.ts library entry, re-exports only.
  • tools.ts the 3 tool definitions, descriptions, zod shapes, and the McpServer factory.
  • config.ts env parsing, normalizeBaseUrl, VERSION, stderr logger.
  • credentials.ts static (stdio) and authInfo-extra (remote host) credential resolvers.
  • errors.ts the single error-to-text mapper, including the two distinct 429s.
  • format.ts message and device rendering; messageDirection is the only place that reads a message's direction.
  • dedupe.ts cross-request duplicate-send store for HTTP hosts.
  • fetch-timeout.ts opt-in process-wide fetch timeout, entrypoints only.

Read the full file on GitHub · 58 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. 2d ago First seen · 58 lines · 728 tokens per session scan A 9b61532986f7

Subscribe to this mod's changes

textbee-mcp CLAUDE.md is an instructions file published in the GitHub repository textbee/textbee-mcp (0 stars, last pushed 11d ago), licensed MIT. It adds 728 tokens to every session, about $0.0036 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.