build-mcp-server

A guide for designing and scaffolding an MCP server for webhook.co. MCP is a standard way for AI assistants to call tools, and the guide covers how those tools should fit the product’s command-line, API, and web interfaces.

In plain words
What is it for?
Use it when adding MCP tools, extending the MCP interface, deciding how it should be deployed, or connecting webhooks to agents.
Why use it?
It helps prevent a new assistant-facing interface from using different data formats, bypassing tenant security, or exposing sensitive request data incorrectly.

Skill for Claude CodeCodexCursor

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 skills/webhook-co/webhook/build-mcp-server
Any agent
npx skills add webhook-co/webhook --skill build-mcp-server
Clone the repo
git clone --depth 1 https://github.com/webhook-co/webhook

Made for: Claude Code, Codex, Cursor.

Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 960 The whole file, excluding the scripts and references it only reads on demand.
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.00047 $0.00960
Opus 5 $0.00023 $0.00480
Sonnet 5 $0.00009 $0.00192
Haiku 4.5 $0.00005 $0.00096

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

Security

Grade A, and why

build-mcp-server 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.

.cursor/skills/build-mcp-server/SKILL.md · 76 lines

How it starts

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

Build MCP server

MCP is a first-class, non-negotiable surface here: every capability is reachable identically from CLI / API / web / MCP, and the MCP server ships as a real product surface (including the webhook → agent trigger), not an afterthought. New work lives in apps/mcp and reuses the same shared/ types as the other surfaces — never invent an MCP-only payload shape.

Work through five phases. Don't skip to scaffolding.

Phase 1 — interrogate the use case

Before any code, get crisp answers:

  • What capability is being exposed, and does it already exist on CLI/API/web? If so, mirror its contract; if not, design for all four surfaces from the start (parity is the rule).
  • Who calls it — an interactive agent, an automation, the webhook → agent trigger? What's the auth and tenant context? (Tenant isolation is enforced by Postgres RLS; the MCP layer must carry tenant identity, never bypass it.)
  • What data crosses the boundary, and does any of it carry PII/PHI or raw payloads? Raw payloads live in R2 and are referenced by event id — don't pull bodies through MCP tool output.

Phase 2 — recommend a deployment model

State a recommendation, don't list every option:

  • Remote streamable-HTTP on Workers (default here). Our stack is TypeScript on Cloudflare Workers; host the MCP server as a Worker so it shares auth, bindings, and observability with the rest of the platform. This is the right answer for almost everything.
  • Elicitation when a tool needs to ask the user for a missing input mid-call.
  • MCP app (interactive UI) only when a widget genuinely beats text — see build-mcp-app, and respect the human-UI-testing hard stop.
  • MCPB bundle only for a local stdio server a user installs on their machine — see build-mcpb.
  • Local stdio only when the tool must touch the user's local environment (e.g. the CLI tunnel); otherwise prefer remote.

Phase 3 — select a tool-design pattern

  • One tool per action for a small, stable capability set — clearest for the model and the user.
  • Search + execute when wrapping a large or open-ended API: a search/list tool to discover, then a focused execute tool, so the model isn't drowning in dozens of near-duplicate tools.
  • Name tools for intent, validate every input at the boundary with a schema, and return typed, actionable errors — never leak stack traces, secrets, or tenant data in tool output.

Read the full file on GitHub · 76 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 · 76 lines · 47 tokens per session scan A 85bee513e588

Subscribe to this mod's changes

build-mcp-server is a skill published in the GitHub repository webhook-co/webhook (0 stars, last pushed 7d ago), licensed Apache-2.0. It adds 47 tokens to every session and 960 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

flaim-fantasy

Use when a user wants analysis of a Flaim-connected ESPN, Yahoo, or Sleeper fantasy league, or help with Flaim setup, capabilities, or permissions. This includes rosters, standings, matchups, available players, transactions, historical seasons, and lineup, waiver, or trade advice. Do not use for generic sports news…

jdguggs10/flaim · 100 tokens

mcp-migration

Diagnose and carry out the migration of an MCP server to the 2026-07-28 specification — the revision that made the transport stateless, formalized OAuth 2.1, and deprecated the logging, sampling, and roots capabilities. Use this skill whenever someone mentions migrating, upgrading, or checking an MCP server against…

AlpayC/mcp-migration-check · 162 tokens

activity-brief

Give a time-bucketed league activity briefing on recent fantasy moves, including who moved who, when, and why. Use when the user explicitly wants a transaction roundup or invokes /activity-brief.

jdguggs10/flaim · 44 tokens

analyze-matchup

Analyze the current fantasy matchup with scores, remaining players or games, and a fact-based forecast. Use when the user explicitly wants a matchup-state breakdown or invokes /analyze-matchup.

jdguggs10/flaim · 42 tokens

gw1-build-assistant

Use when the user asks about Guild Wars 1 (the original 2005 game, not GW2) — designing or reviewing skill bars, decoding or producing template codes (strings like "OgCjkurIrSuXaXPXBYihygvlYcA"), hero team composition, skill lookups or comparisons, or pasting a paw-ned2 team blob ("pwnd0001..."). Use the gw1-mcp tools…

Graphmaxer/gw1-mcp · 127 tokens

sandbox-sdk

Build sandboxed applications for secure code execution. Load when building AI code execution, code interpreters, CI/CD systems, interactive dev environments, or executing untrusted code. Covers Sandbox SDK lifecycle, commands, files, code interpreter, and preview URLs. Biases towards retrieval from Cloudflare docs…

kevyder/banrepco_mcp · 66 tokens