skills/tier-1-foundation/mcp-guide/SKILL.md
Educational guide to MCP (Model Context Protocol) — what it is, when you need it, when you don't, and how to build your own. Helps agents and humans understand when an MCP server adds value vs when a CLI + skill is enough.
npx skillsauth add pbc-os/agent-skills-public mcp-guideInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Understand MCP so you can decide if you need one — and build one if you do.
This is an educational skill. It doesn't install anything. It teaches agents and humans what MCP (Model Context Protocol) is, when it's the right tool, and when simpler alternatives (CLIs + skills) are better.
MCP (Model Context Protocol) is an open standard that lets AI agents talk to external services through a structured interface. Think of it as a universal adapter between your AI agent and the tools it uses.
| Without MCP | With MCP | |-------------|----------| | You walk into every restaurant and shout your order in English, hoping someone understands | Every restaurant has the same ordering kiosk with the same interface — you always know how to order |
Without MCP, every integration is custom. With MCP, there's a standard way for agents to discover tools, understand their inputs/outputs, and call them.
Your Agent (Claude Code, etc.)
↕ MCP Protocol (JSON-RPC)
MCP Server (runs locally or remotely)
↕ API calls
External Service (Gmail, Slack, Square, etc.)
An MCP server:
The agent never touches the raw API. It just calls structured tools.
| Situation | Better Alternative |
|-----------|-------------------|
| There's already a good CLI for the service | CLI + skill (like gws + our Google Workspace skills) |
| You're doing simple CRUD operations | Direct API calls via curl/scripts in a skill |
| Your agent only needs read access | CLI + skill with read-only commands |
| You're the only user | Scripts + skill — less infra to maintain |
| The service has a well-designed REST API | Skill with curl patterns — teach the agent to call it directly |
This repo's approach: We use CLIs + skills wherever possible. gws for Google Workspace, stripe for payments, gcloud for GCP. The skill provides the domain knowledge; the CLI provides the tool. No MCP needed.
| Situation | Why MCP Helps |
|-----------|---------------|
| No good CLI exists for the service | MCP gives you a structured interface where none exists |
| Multiple agents need the same integration | MCP server is shared infrastructure, not per-agent scripts |
| Real-time data — webhooks, streaming, subscriptions | MCPs handle persistent connections; CLIs are request/response |
| Complex auth — OAuth flows, token refresh, multi-tenant | MCP server manages auth centrally |
| You want tool discovery — agent should see what's available | MCP's tools/list lets agents discover capabilities dynamically |
| Structured I/O — you want typed inputs and outputs | MCP enforces schemas; CLI output is often unstructured text |
| You're building for others — distributing an integration | MCP is a standard; your custom scripts are not |
Does a good CLI already exist for this service?
├── Yes → Use CLI + skill. Done.
└── No
├── Is it a simple REST API with < 10 endpoints?
│ ├── Yes → Write curl patterns in a skill. Done.
│ └── No
│ ├── Do multiple agents/users need this?
│ │ ├── Yes → Build an MCP server.
│ │ └── No
│ │ ├── Do you need real-time data (webhooks/streaming)?
│ │ │ ├── Yes → Build an MCP server.
│ │ │ └── No → Write a script + skill. Probably enough.
│ │ └──
│ └──
└──
| Component | What It Does | Example |
|-----------|-------------|---------|
| MCP Client | Your agent's MCP integration | Built into Claude Code, Cline, etc. |
| MCP Server | Wraps an external service | slack-mcp-server, github-mcp-server |
| Transport | How client and server communicate | stdio (local) or Streamable HTTP (remote) |
| Tools | Individual operations the server exposes | slack_send_message, github_create_issue |
| Resources | Data the server can provide | File contents, database records |
| Prompts | Pre-built prompt templates | "Summarize this repo", "Triage inbox" |
| Transport | When to Use | How It Works | |-----------|-------------|-------------| | stdio | Local servers, single user | Server runs as a subprocess, communicates via stdin/stdout | | Streamable HTTP | Remote servers, multi-user | Server runs as an HTTP service, clients send JSON-RPC over HTTP |
For most SMBs, stdio is fine — the MCP server runs on the same machine as your agent.
Every MCP tool has:
{
"name": "slack_send_message",
"description": "Send a message to a Slack channel or DM",
"inputSchema": {
"type": "object",
"properties": {
"channel": {"type": "string", "description": "Channel ID or user ID"},
"text": {"type": "string", "description": "Message text (supports Slack markdown)"}
},
"required": ["channel", "text"]
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": false
}
}
The agent sees this schema, knows what inputs are needed, and can call the tool without knowing anything about the Slack API underneath.
If you've decided you need one, here's the path:
| Choice | Recommendation | Why | |--------|---------------|-----| | Language | TypeScript | Best SDK support, good for AI-generated code, static typing | | Transport | stdio (local) or Streamable HTTP (remote) | Avoid SSE (deprecated) | | Schema | Zod (TypeScript) or Pydantic (Python) | Type safety for tool inputs |
Anthropic maintains a comprehensive MCP builder skill with templates, best practices, and language-specific guides:
Anthropic MCP Builder Skill
This includes:
To use it with Claude Code:
# Add the official MCP builder skill
npx skills add anthropics/skills@mcp-builder -g -y
Or just tell your agent: "I want to build an MCP server for [service]. Use the mcp-builder skill."
| Language | Pattern | Example |
|----------|---------|---------|
| TypeScript | {service}-mcp-server | slack-mcp-server |
| Python | {service}_mcp | slack_mcp |
snake_case with service prefix: slack_send_message, github_create_issueslack_send_message not send_message (avoids conflicts with other MCPs)Tool descriptions must be precise. The agent reads these to decide which tool to use. Vague descriptions = wrong tool choices.
Return structured data. JSON for programmatic use, Markdown for human readability. Support both when possible.
Pagination is mandatory for any tool that lists things. Default to 20-50 items. Return has_more and next_offset.
Error messages must be actionable. Not "Error 403" but "Permission denied — the bot token needs the chat:write scope. Add it at api.slack.com/apps → OAuth & Permissions."
Annotate your tools. Mark read-only vs destructive. This helps agents (and humans) understand the risk of each operation.
Don't over-build. Start with the 5-10 most common operations. Add more based on actual usage, not speculation.
Before building your own, check if one already exists:
mcp-server-{service} or {service}-mcp{service}-mcp or {service}_mcpCommon existing servers: GitHub, Slack, Google Drive, Postgres, SQLite, Brave Search, Puppeteer, and many more.
| Pattern | Complexity | Flexibility | Best For |
|---------|-----------|-------------|----------|
| CLI + Skill | Low | High | Services with good CLIs (gws, stripe, gh) |
| curl + Skill | Low | Medium | Simple REST APIs (< 10 endpoints) |
| MCP Server | Medium | Very High | Complex integrations, multi-agent, real-time |
| Custom Code | High | Highest | Unique workflows that don't fit patterns |
This repo's philosophy: Start simple (CLI + skill), upgrade to MCP only when you hit a wall. Most SMB needs are well-served by CLIs and skills.
google-workspace — Example of CLI + skill pattern (uses gws CLI, no MCP needed)secrets-manager — Secure credential storage (needed by MCP servers too)slack — Example of API + skill pattern (curl calls, no MCP needed)Understand the tool before you reach for it. Sometimes a screwdriver is better than a power drill.
tools
Generate and iteratively refine USPTO-style patent figure drawings from provisional patent application markdown files, using nano-banana for v1 generation and targeted single-fix edits for v2+ iteration.
data-ai
Weekly revenue / sales forecasting for small businesses with multiple locations or product lines. Blends recent trend + seasonal baseline + YoY growth with per-entity holiday multipliers and week-of-month adjustments. Ships autoresearch-compatible eval and parameters so you can tune it on your own historical data.
data-ai
Analyze email, calendar, and file patterns to discover repeatable workflows that AI agents can automate.
testing
Automated daily digest for small business owners. Combines email triage, calendar agenda, open tasks, and business KPIs into a single morning briefing. Composable — works with whatever data sources are available. Urgent emails require body inspection and explicit escalation signals — never classified from sender/timing metadata alone.