patter-mcp
MCP server for the Patter Voice AI SDK — make and receive phone calls from any MCP-compatible client (Claude Code, Cursor, ChatGPT, OpenClaw, Hermes Agent, Codex). Streamable HTTP transport, self-hosted via git clone + npm start.
Install / Use
claude mcp add PatterAI -- npx -y github:PatterAI/patter-mcpIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of patter-mcp
patter-mcp scores 83/100 on our quality scale, 477th of 762 AI & Machine Learning skills we index.
Its MCP Server is 15 KB long, well organised into 30 sections with 19 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 3 months ago, so patter-mcp is actively maintained.
- Our last check on 2026-09-26 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
patter-mcp compared with similar skills
All 4 of these similar skills score higher than patter-mcp; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| patter-mcp (this skill)by PatterAI | 83 | 3 | 3mo ago | MCP Server |
| claude-memby thedotmack | 100 | 94.8k | 1d ago | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 85.7k | 12d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 84.3k | 15d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 73.9k | today | CLAUDE.md |
Frequently asked questions
- How do I install patter-mcp?
- Run
claude mcp add PatterAI -- npx -y github:PatterAI/patter-mcp. The install tabs above show the steps for each supported agent. - Which AI agents does patter-mcp work with?
- It is written for Claude Code, Claude Desktop, Cursor and OpenAI Codex, as a MCP Server file. Other agents that read the same format can often use it too.
- Is patter-mcp safe to use?
- It is MIT-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is patter-mcp still maintained?
- The repository was last updated about 3 months ago, so patter-mcp is actively maintained.
Skill content
View source on GitHubAn MCP server that gives your AI agent a phone number. Answer calls, dial out, edit code, call APIs, book meetings — all over voice.
Built on the Patter Voice AI SDK. Claude Code connects over Streamable HTTP or stdio and gets access to voice calling tools. During calls, the AI agent can read files, run commands, and search code in real time.
Quickstart
1. Clone and install
git clone https://github.com/PatterAI/patter-mcp
cd patter-mcp
npm install
cp .env.example .env # fill in your API keys
2. Start the server
npm run dev # development
# or
npm run build && npm start # production
3. Connect Claude Code
Two transports are supported. HTTP (default) runs a long-lived server you connect to by URL; stdio lets an MCP client spawn the server as a subprocess (no port, no URL).
HTTP (default):
npm run dev # or: npm run build && npm start — serves Streamable HTTP at :3000/mcp
claude mcp add --transport http patter-mcp http://localhost:3000/mcp
stdio: pass --stdio and the client launches the server itself:
claude mcp add patter-mcp -- npx -y getpatter-mcp --stdio
See stdio transport for OpenClaw and Hermes config.
4. Use it
Ask Claude:
"Call +15551234567 and ask them about their order status"
"Call this restaurant and ask if there's a table for 2 tonight"
"Show me the transcript from the last call"
Features
MCP Tools
| Tool | Description |
|---|---|
| make_call | Place an outbound call with an AI voice agent; waits for the call to end and returns the outcome + transcript |
| call_third_party | Call a third party with an autonomous task (e.g. restaurant reservation); waits and returns the transcript |
| get_calls | List all calls with status, duration, and cost |
| get_transcript | Get the full conversation transcript of a call |
| end_call | Hang up an in-progress call |
| get_metrics | Read latency / token / cost metrics |
| configure_inbound | Configure how inbound calls are answered |
Both make_call and call_third_party are completion-aware: they block until
the call reaches a terminal state and return a structured outcome
(answered / voicemail / no_answer / busy / failed), duration, transcript,
and cost — see How It Works.
Claude Code Integration (used by the AI agent during calls)
During a phone call, the voice agent has access to a full Claude Code session via the Agent SDK. This means the agent can:
- Read, write, and edit files
- Run shell commands and tests
- Search codebases with Glob and Grep
- Create git commits
- Install dependencies
- Anything Claude Code can do interactively
How It Works
<table> <tr> <th align="center">Claude Code</th> <th align="center"></th> <th align="center">Patter MCP</th> <th align="center"></th> <th align="center">Phone Calls</th> </tr> <tr> <td align="center"> <strong>You</strong><br><sub>Claude Code / Desktop</sub><br><br> <code>make_call</code><br> <code>call_third_party</code><br> <code>get_transcript</code> </td> <td align="center">→</td> <td align="center"> <strong>MCP Server</strong><br> <em>Streamable HTTP :3000</em><br><br> <strong>Patter SDK</strong><br> <em>Twilio + STT/TTS :8000</em><br><br> <strong>Claude Code</strong><br> <em>Agent SDK (in-call)</em> </td> <td align="center">→</td> <td align="center"> <strong>Outbound</strong><br><sub>Call users & third parties</sub><br><br> <strong>Inbound</strong><br><sub>Answer on your number</sub> </td> </tr> </table>SDK contract (getpatter ≥ 0.6.3)
patter-mcp leans on one SDK primitive for every outbound call:
const result = await phone.call({ to, agent, machineDetection, voicemailMessage, wait: true });
// result: { callId, outcome, status, durationSeconds, transcript, cost, metrics }
-
Outbound (
make_call,call_third_party).call({ wait: true })blocks until the call hangs up (timeout-bounded by the SDK) and resolves with aCallResult. Every field comes from a real carrier signal:outcomeis the carrier-agnostic projection (answered/voicemailfrom answering-machine detection + media-stream end;no_answer/busy/failedstraight from the carrier status callback). patter-mcp maps that result directly into aCallRecord— there is no provisional id and no polling.Before 0.4.0 the outbound path stitched the carrier call together by hand with a
pending_<ts>provisional id that never matched the real carrier SID, so the lifecycle callbacks never correlated andcall_third_partypolled a record that stayedringinguntil it timed out. It is now functional end-to-end. -
Inbound. Inbound calls have no initiator to await, so the server-wide
onCallStart/onCallEndcallbacks wired onphone.serve(...)create and finalise their records. Those callbacks fire for every call but filter ondirectionand ignore outbound events (whichmakeCallowns). -
Teardown. On
SIGTERM/SIGINTthe server callsphone.disconnect()— closing the cloudflared tunnel, the WebSocket server, and any pendingcall({ wait: true })awaiters — so nothing is left running on exit.
Example: Claude Code calls the user
1. Claude Code needs approval for a plan
2. → make_call({ to: "+39...", systemPrompt: "Describe the plan..." })
3. Phone rings, user answers
4. AI agent: "Hi, I have a plan for the auth refactor..."
5. User: "Show me the current auth.ts file"
6. → claude_code({ task: "read src/auth.ts" }) [Claude Code Agent SDK]
7. AI agent: "The file has 45 lines, it uses JWT tokens..."
8. User: "Fix the token expiration bug"
9. → claude_code({ task: "fix the token expiration bug in auth.ts" })
10. AI agent: "Done. I updated line 23 to use a 24h expiration..."
11. User: "Run the tests"
12. → claude_code({ task: "run the tests" })
13. AI agent: "All 42 tests passing."
14. Call ends → transcript returned to Claude Code
Example: Call a restaurant
1. User: "Call the restaurant and ask if there's a table for 2 at 8pm"
2. → call_third_party({ to: "+39...", task: "ask for a table for 2 at 8pm" })
3. AI agent calls restaurant autonomously
4. Agent: "Buonasera, c'è un tavolo per due stasera alle 20?"
5. Restaurant: "Sì, abbiamo disponibilità"
6. → transcript returned to Claude Code
7. Claude: "The restaurant confirmed a table for 2 at 8pm tonight."
Configuration
Environment Variables
| Variable | Required | Description |
|---|---|---|
| TWILIO_ACCOUNT_SID | Yes | Twilio account SID |
| TWILIO_AUTH_TOKEN | Yes | Twilio auth token |
| TWILIO_PHONE_NUMBER | Yes | Your Twilio phone number (E.164) |
| OPENAI_API_KEY | Yes | OpenAI API key |
| DEEPGRAM_API_KEY | Yes | Deepgram STT key (for voice tools) |
| ELEVENLABS_API_KEY | Yes | ElevenLabs TTS key (for voice tools) |
| MCP_PORT | No | MCP server port (default: 3000) |
| PATTER_PORT | No | Patter server port (default: 8000) |
| AGENT_SYSTEM_PROMPT | No | Default system prompt for inbound calls |
| AGENT_VOICE | No | Default TTS voice (default: nova) |
cp .env.example .env
# Edit .env with your API keys
Lifecycle modes
The embedded Patter server (HTTP + cloudflared tunnel) is expensive to boot. By default it starts lazily on the first tool call, so MCP sessions that never place a call pay zero startup cost. Four modes are supported:
| Mode | Trigger | When to use |
|---|---|---|
| Lazy (default) | No env var set | Local dev, Claude Code sessions where calls are occasional |
| Eager | PATTER_EAGER=1 | CI smoke tests, demos where the first call must be instant |
| Stable tunnel | PATTER_TUNNEL_HOSTNAME=patter.example.com | Long-running deployments — named cloudflared tunnel, stable webhook URL across restarts |
| Production webhook | WEBHOOK_URL=https://your.api/webhook | Hosted deployments behind your own ingress, no tunnel |
Lazy (default)
npm start
# MCP server up immediately; Patter HTTP/tunnel boots on first make_call.
The first make_call (or any other tool) triggers a one-time boot. Concurrent tool calls during boot coalesce on a single in-flight promise — no double-boot. If boot fails (e.g. tunnel handshake error), the next tool call retries cleanly.
Eager
PATTER_EAGER=1 npm start
Boots the Patter server during MCP startup. Same behaviour as patter-mcp ≤ 0.2.x. Use when you need the first call to be instant or you want startup errors to surface immediately (rather than at first tool call).
Stable tunnel (named cloudflared)
PATTER_TUNNEL_HOSTNAME=patter.your-domain.com npm start
Patter uses a named cloudflared tunnel with a stable hostname instead of the default quick tunnel (which generates a fresh *.trycloudflare.com URL on every restart). Required when you've configured a Twilio/Telnyx webhook to point at a fixed URL.
Prerequisites: a cloudflared tunnel created with cloudflared tunnel create patter and the corresponding DNS CNAME pointing to <tunnel-id>.cfargotunnel.com.
Production webhook (no tunnel)
WEBHOOK_URL=https://your-domain.com/webhook npm start
Skip cloudflared entirely. Use when the MCP server is deployed behind your own ingress (nginx, Caddy, k8s ingress, Fly.io, Railway, etc.) and the carrier webhook can reach it directly. The Patter SDK will not attempt to start a tunnel — it just listens on PATTER_PORT and trusts the URL you provided.
Health check
/health exposes the current lifecycle state:
{
"status": "ok",
"mode": "mcp",
"phone": "+15551234567",
"serverRunning": false, // ← true after first tool call (lazy mode)
"activeSessions": 1
}
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"patter-mcp": {
"type": "http",
"url": "http://localhost:3000/mcp"
}
}
}
stdio transport (OpenClaw / Hermes / Claude Desktop)
Local MCP clients that prefer to spawn the server as a subprocess (rather
than connect to a URL) use the stdio transport. Launch it with the --stdio
flag (or MCP_TRANSPORT=stdio):
npx -y getpatter-mcp --stdio
# stdout carries the raw JSON-RPC stream; all logs go to stderr.
In stdio mode no HTTP port is opened, so /health, the /inspector UI, and
Auth0 OAuth are unavailable — the subprocess boundary is the trust boundary, so
the client owns the process. Tools, resources, and lazy lifecycle behave
exactly as
Truncated for display — read the full file on GitHub.
Related Skills
claude-mem
94.8kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
85.7kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
84.3kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
73.9kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
