惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
GbyAI
GbyAI
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
B
Blog
博客园 - 叶小钗
V
Visual Studio Blog
小众软件
小众软件
阮一峰的网络日志
阮一峰的网络日志
博客园 - 聂微东
S
SegmentFault 最新的问题
Engineering at Meta
Engineering at Meta
博客园 - Franky
V
V2EX
人人都是产品经理
人人都是产品经理
H
Hackread – Cybersecurity News, Data Breaches, AI and More
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
IT之家
IT之家
T
The Blog of Author Tim Ferriss
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
Check Point Blog
N
Netflix TechBlog - Medium
博客园 - 【当耐特】

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I Built MCP Servers for 9 SaaS APIs — Here's What I Learn...
George Forger · 2026-06-07 · via DEV Community

George Forger

I Built MCP Servers for 9 SaaS APIs — Here's What I Learned About the Pattern

I've spent the last few weeks building MCP (Model Context Protocol) servers for various APIs — CoinGecko, Stripe, Jira, PostHog, Plausible, Etherscan, DeFiLlama, Jobber, and Resend. Nine servers, 68 tools, all published to npm and indexed on Glama.

Along the way, I noticed the same architecture keeps working. If you're building an MCP server for your own API — or thinking about hiring someone to do it — here's the pattern.

The Three-Layer Architecture

Every MCP server I build has three layers:

1. Tool Definitions (the contract)

Each API endpoint becomes an MCP tool with a typed input schema. I use Zod for validation — it catches bad inputs before they hit your API.

{
  name: "send_email",
  description: "Send a single email via Resend",
  inputSchema: {
    from: z.string().email(),
    to: z.union([z.string().email(), z.array(z.string().email())]),
    subject: z.string().min(1),
    html: z.string().optional(),
    text: z.string().optional(),
  },
}

The description matters more than you think. LLMs read these descriptions to decide which tool to call. A vague description like "send email" wastes tokens. A specific one like "Send a single transactional email via Resend API. Supports HTML and plain text. Returns message ID and delivery status." gets used correctly.

2. API Client (the plumbing)

This layer handles auth, rate limiting, and error transformation. The key insight: don't leak HTTP errors to the LLM. Transform them into structured, actionable messages.

// Bad: "Error: 429"
// Good: "Rate limited by Resend API. Retry after 30 seconds. You've sent 100 emails in the last hour."

3. Output Formatter (the presentation)

Raw JSON dumps are terrible for LLM consumption. Format responses as markdown tables, bullet points, or structured text. The LLM reads this output to decide what to do next — make it scannable.

## Email Sent Successfully
- **Message ID:** abc123
- **From:** alerts@yourcompany.com
- **To:** user@example.com
- **Subject:** Your weekly report
- **Status:** Queued for delivery

The Patterns That Keep Working

Mock Mode

Every server includes a mock mode that returns realistic fake data. This lets developers test without live API credentials. It's also how I test during development — no API keys needed.

Progressive Disclosure

Don't dump all 18 tools on the LLM at once if it only needs 3. Group tools by use case. The Resend server has tools for emails, contacts, domains, and API keys — a developer sending an email doesn't need to see the domain management tools.

Error Recovery

APIs fail. Networks timeout. Rate limits hit. The server should handle retries internally and surface clear "try again" instructions to the LLM, not raw stack traces.

What I Deliver

When someone commissions an MCP server from me, they get:

  • TypeScript MCP server with full tool definitions
  • Input validation via Zod schemas
  • Error handling with structured messages
  • Clean markdown output optimized for LLM consumption
  • Mock mode for testing without credentials
  • npm publication under their scope (e.g., @yourcompany/mcp-server)
  • Glama/directory listing for discoverability
  • README with install instructions and tool catalog

Typical turnaround: 1-3 days for standard REST APIs.

Why This Matters

MCP is becoming the standard way AI assistants connect to external services. Claude Desktop, Cursor, Windsurf, and other clients all support it. But most SaaS APIs don't have MCP servers yet. That gap means:

  1. Developers waste time switching between AI assistants and API dashboards
  2. APIs miss distribution — being in an MCP directory is like being in an app store
  3. The first mover wins — once an MCP server exists for an API, there's little reason to build a second one

Get in Touch

If your API needs an MCP server, I can build it. My portfolio includes servers for crypto (CoinGecko, Etherscan, DeFiLlama), analytics (PostHog, Plausible), project management (Jira, Jobber), payments (Stripe), and email (Resend).

GitHub: github.com/friendlygeorge

Tell me which API you need connected. I'll scope it and give you a timeline within 24 hours.


This post is part of my build-in-public series on shipping AI tools. Previous posts covered building 10 MCP servers in a week and how to build an MCP server that actually gets used.