Table of Contents
TL;DR — MCP in 30 seconds
MCP, the Model Context Protocol, is an open standard that lets AI coding tools — Claude Code, Cursor, Claude Desktop, ChatGPT Desktop — query your local tools and data through a single, typed interface. Anthropic released it in November 2024 as the "USB-C port for AI applications." An MCP server exposes tools the agent can call and resources the agent can read; the client starts the server, speaks JSON-RPC to it, and hands the results back to the model. The ecosystem has moved from novelty to default in under 18 months. Stash ships its own MCP server so an agent can read your screenshots and screen recordings the way it reads your codebase.
Why MCP Exists
Before MCP, every AI tool reinvented integration from scratch. A Claude adapter for your database didn't port to Cursor. ChatGPT plugins solved discovery only for ChatGPT, and only for services willing to register with OpenAI. Anthropic's engineers called this the "M×N problem": M models wired to N tools, one pair at a time.
Three earlier approaches pointed at the answer without reaching it:
- Ad-hoc function calling. Each vendor shipped its own tool-calling format. Code written for one model didn't port to another.
- OpenAPI / REST adapters. Fine for cloud services, heavyweight for local tools — HTTP server, auth, TLS, versioning.
- ChatGPT plugins. Closed, cloud-hosted, vendor-approved. Retired within a year.
MCP's insight was to borrow from the Language Server Protocol (LSP) — the standard that unified editor tooling across VS Code, Vim, Emacs, and JetBrains. LSP solved the M×N problem for editors. MCP applies the same pattern to AI clients: write a server once, and every MCP-speaking client can use it.
How MCP Works
MCP is a message protocol built on JSON-RPC 2.0. Three concepts do most of the work.
Tools, Resources, and Prompts
Every MCP server exposes some combination of these three primitives:
| Primitive | What it is | Who triggers it | Example |
|---|---|---|---|
| Tool | A function the agent can invoke with arguments | The model (agent-controlled) | github.create_issue(title, body) |
| Resource | Readable data addressed by URI | The client, often on behalf of the user | file:///repo/README.md |
| Prompt | A reusable prompt template with parameters | The user (via slash commands) | /review-pr <number> |
Most servers focus on tools. Resources are useful when the client wants to browse data before asking the model. Prompts let a server ship opinionated workflows — a Postgres server can bundle a "summarize-this-table" prompt that the agent invokes on demand.
Transports: stdio, SSE, and HTTP
An MCP client and server need a channel to exchange JSON-RPC messages. The spec defines three:
| Transport | Where it fits | Lifecycle |
|---|---|---|
| stdio | Local tools. The client spawns the server as a subprocess and communicates over stdin/stdout. | Lives as long as the client session. |
| SSE (Server-Sent Events) | Remote or long-lived servers. Streams events over HTTP. | Server runs independently; client connects. |
| Streamable HTTP | Newer unified transport combining request/response and streaming. Preferred for new remote servers. | Server runs independently; client connects. |
Most developer-facing MCP servers use stdio. It has the simplest security model (the server runs as your user, on your machine, with your permissions) and the lowest setup cost (no ports, no TLS, no auth). Stash, filesystem, Git, Postgres, and Puppeteer all use stdio.
A typical exchange
When Claude Code starts, it reads your MCP config, spawns each server, and issues an initialize handshake. The server advertises its tools, resources, and prompts; the model sees them and can call them when relevant. A call looks like this:
// Client → Server
{"jsonrpc":"2.0","id":7,"method":"tools/call",
"params":{"name":"stash.list_recent","arguments":{"n":5}}}
// Server → Client
{"jsonrpc":"2.0","id":7,"result":{
"content":[{"type":"text","text":"[5 captures ...]"}]
}}
That's the whole protocol in miniature. The model sees structured tool definitions on input, emits tool-call requests, and receives structured responses.
The Three Classes of MCP Servers
Most production MCP servers fall into one of three buckets. Knowing which bucket a server occupies tells you what it's good for and what risks you're taking by installing it.
| Class | What it does | Examples | Risk surface |
|---|---|---|---|
| Data | Reads data the agent should reason over | filesystem, Postgres (read-only), Git | Data exfiltration if scoped too broadly |
| Action | Performs effects on the outside world | GitHub (write), Slack, Puppeteer | Destructive writes; needs scoped auth |
| Context | Delivers structured session context the agent grounds on | Stash (captures), memory servers, knowledge graphs | Low — returns data about what you did, not operations on live systems |
The context class is the youngest and the most underused. A codebase-aware agent without screen-aware context is half-blind: it sees your files but not the UI bug you're debugging, the terminal output you already saw, or the Figma you compared against. That's the gap Stash fills.
Using MCP with Claude Code and Cursor
Both editors support MCP natively and both use near-identical JSON config files. Once you've written one, porting to the other is mostly rename work.
Claude Code
Claude Code stores user-scoped servers in ~/.claude.json and project-scoped servers in .mcp.json at the repo root. The CLI command claude mcp add edits these files for you, but you can edit them by hand. A minimal project config:
// .mcp.json (checked into the repo)
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/code"]
},
"stash": {
"command": "/Users/you/.local/bin/stash-mcp",
"args": []
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_TOKEN": "${GITHUB_TOKEN}" }
}
}
}
Environment variable expansion (${GITHUB_TOKEN}) lets you commit the file to a team repo without leaking secrets — each developer sets the variable in their shell. User-scoped servers land in ~/.claude.json under a projects key when you run claude mcp add.
Cursor
Cursor uses .cursor/mcp.json (project-scoped) or ~/.cursor/mcp.json (user-scoped). The schema is the same. A user-scoped file looks identical to the Claude Code example above. Cursor caps the number of concurrently visible tools at 40 across all servers, so installing a kitchen-sink server can crowd out more useful ones — prefer focused servers with small tool surfaces.
One-line installers
Mature MCP servers ship a one-line installer that writes the right config block into the right file. Stash's yourstash.ai/install-claude.sh configures Claude Code, Claude Desktop, and Cursor in a single command. If setup involves a 300-line README and manual JSON merges, expect pain.
MCP vs. Plain Tool Calls vs. Plugins
| Approach | Portable across clients | Local tools | Discovery | Auth |
|---|---|---|---|---|
| Vendor-specific tool calling | No — rewritten per vendor | Yes | In-client only | Per vendor |
| ChatGPT Plugins (retired) | No — OpenAI only | No — HTTPS only | Plugin store | OAuth / API key |
| OpenAPI / REST wrappers | Partial | Awkward | Ad hoc | OAuth / API key |
| MCP | Yes — any MCP client | First-class (stdio) | Config file + server listing | OAuth, env vars, peer-auth |
Portability is the column that matters most. An MCP server written today keeps working when a new client emerges — and when you switch between Claude Code and Cursor in the same week, which agentic coders do.
Notable MCP Servers
A partial tour of servers worth knowing about. Anthropic maintains the first six as reference implementations; the rest are community or vendor-maintained.
- filesystem — Read and write files in a directory you scope at startup. The default way to give an agent access to a project.
- git — Read commits, diffs, branches, and search history. Read-only by design.
- github — Full repo operations: issues, PRs, code search, Actions. Write-capable; use a scoped PAT.
- postgres — Read-only query execution with schema inspection. Pair it with a read replica.
- slack — Read channel histories and send messages. Useful for on-call agents.
- puppeteer — Browser automation. Navigate, click, screenshot, extract.
- stash — Your screenshots, clipboard history, and screen recordings, queryable by any MCP client. Local socket, no network.
- memory — Persistent key-value memory across sessions. Turns a stateless agent into a stateful one.
Stash's MCP Server for Captures
Most MCP servers expose a domain an agent can already reason about — files, databases, APIs. Visual context is the domain agents are worst at reasoning over, because a pasted screenshot arrives as pixels stripped of every piece of metadata that made it meaningful. Stash is an MCP server for that missing domain.
The server is local-only. It listens on a Unix domain socket at ~/Library/Application Support/Stash/mcp.sock, speaks the stash-1 protocol, and enforces a peer-auth allowlist so only approved MCP clients can connect. No network traffic — the agents talk to a process on your Mac, not a cloud relay.
Five tools do the work:
stash.list_recent(n)— newest-first summaries of the last N captures (max 500). Compact payload the agent uses to triage.stash.search(query)— substring search across app name, window title, bookmark name, OCR'd text, and browser URL.stash.get_capture(id)— the full dossier for a screenshot: app, window title, URL, accessibility tree, dev context (cursor position, file path), annotation shapes, OS and display info.stash.get_bundle(id)— for a recorded video, returns the markdown report, per-frame metadata, and absolute paths to every frame image and the audio track.stash.render_plain(id)— token-minimal plain-text rendering for inline paste.
Every capture has a stable stash://bundle/<uuid> URI. An agent that sees that URI once — in a chat, a commit message, a PR comment — can re-query it across sessions. This is the piece that chat-upload workflows can't match: uploads are one-shot, MCP references are persistent.
Officially supported clients are Claude Code, Claude Desktop, and Cursor, each auto-configured by the one-line installer at yourstash.ai/install-claude.sh. Any other MCP-speaking client — Windsurf, Zed, ChatGPT Desktop, Codex CLI — works in principle via the same stdio bridge, pointed at the client's own config file.
Common Gotchas
MCP is young enough that the failure modes aren't yet documented in every tutorial. A few recur.
- Stale server processes. If a server crashes, the client doesn't always notice. Symptoms: tools listed but calls time out. Restart the client, or kill the server process —
ps aux | grep mcpfinds it. - Config path differences. Claude Code uses
~/.claude.jsonplus.mcp.json. Claude Desktop uses~/Library/Application Support/Claude/claude_desktop_config.json. Cursor uses.cursor/mcp.json. Each client needs its own entry. - Auth scope creep. Scope tokens to the narrowest permissions the agent needs. A GitHub PAT with
admin:orgis a liability, not a convenience. - Tool-count ceilings. Cursor caps visible tools at 40. Five kitchen-sink servers will crowd each other out. Prefer focused servers with small tool surfaces.
- Permissions prompts. Claude Code prompts before every tool call by default. For trusted local servers, allowlist tools in
~/.claude/settings.jsonunderpermissions.allow.
Frequently Asked Questions
What is MCP in simple terms?
MCP — the Model Context Protocol — is a standard way for AI applications like Claude Code and Cursor to talk to external tools and data sources. An MCP server exposes a set of tools (functions the agent can call) and resources (data the agent can read), and the AI client can use any of them without custom integration code. Think of it as a USB-C port for LLMs: one plug shape, many devices.
Who created MCP and when?
Anthropic announced MCP on November 25, 2024, as an open standard. The protocol was designed by Anthropic engineers David Soria Parra and Justin Spahr-Summers and released with SDKs in Python and TypeScript plus reference servers for filesystem, GitHub, Slack, Postgres, Google Drive, and Puppeteer. C# and Java SDKs followed. MCP is governed as an open specification at modelcontextprotocol.io.
What does an MCP server do?
An MCP server exposes three kinds of capabilities to an AI client: tools (functions the agent can call, like query_database or send_slack_message), resources (data the agent can read, like files or API responses), and prompts (reusable prompt templates). The server runs as a separate process; the AI client starts it, calls its tools over JSON-RPC, and feeds the responses back into the model's context window.
Does Claude Code support MCP?
Yes. Claude Code has first-class MCP support. User-scoped server configurations live in ~/.claude.json, and project-scoped configurations live in .mcp.json at the repo root for team-shared servers. You add servers with claude mcp add or by editing the JSON directly. Claude Code supports stdio, SSE, and HTTP transports, and environment variable expansion in .mcp.json lets teams share configs without leaking secrets.
Does Cursor support MCP?
Yes. Cursor supports MCP in both the IDE and the CLI. Project-scoped servers live in .cursor/mcp.json inside the project folder; user-scoped servers live in ~/.cursor/mcp.json. Cursor currently supports up to 40 tools per session across all connected servers and accepts stdio, SSE, and Streamable HTTP transports. OAuth and environment variable auth are both supported.
Is MCP secure?
MCP itself is a transport and message format — security depends on how each server and client is configured. Best practices: run stdio servers locally rather than over the network, scope server permissions tightly (read-only filesystem, read-only database), use OAuth or environment variables for auth instead of hardcoding credentials, and audit which servers an agent can see. Stash's MCP server uses a Unix domain socket with a peer-auth allowlist — no network traffic, no exposure beyond your machine.
How is MCP different from ChatGPT plugins?
ChatGPT plugins were a closed, OpenAI-hosted system in which each plugin was an OpenAPI-described web service registered with OpenAI. MCP is open, decentralized, and runs locally by default. Any client can speak MCP; any developer can publish a server; the model vendor is not in the loop. Plugins required cloud hosting, approval, and an HTTPS endpoint. An MCP server can be a 50-line Python script on your laptop.
What's the best MCP server for developers?
The best MCP server depends on what you want the agent to do. For file access, the official filesystem server. For repo operations, GitHub's MCP server. For database queries, Postgres. For browser automation, Puppeteer. For visual context from your screen captures, Stash's MCP server exposes five tools — list_recent, search, get_capture, get_bundle, render_plain — so Claude Code and Cursor can query annotated screenshots, video bundles, and clipboard history without copy-paste.
Key Takeaways
- MCP — the Model Context Protocol — is an open standard announced by Anthropic on November 25, 2024 that unifies how AI clients talk to external tools.
- Servers expose three primitives: tools (agent-called functions), resources (user-addressed data), and prompts (reusable templates). Most servers focus on tools.
- Transports are stdio (local, subprocess-based), SSE (remote, streaming), and Streamable HTTP (the newer unified remote transport). Most developer MCP servers use stdio.
- Claude Code uses
~/.claude.jsonand.mcp.json; Cursor uses.cursor/mcp.json. Same schema in both. - Servers fall into three classes: data (filesystem, Postgres), action (GitHub, Slack), and context (Stash, memory). Context is the youngest class and the most undersupplied.
- Stash ships a local MCP server with five tools (
list_recent,search,get_capture,get_bundle,render_plain) that lets Claude Code and Cursor query your screenshots and screen recordings as structured context. - One-line installers and scoped auth are the signals of a mature MCP server. A kitchen-sink server with broad write permissions is a liability, not a feature.
References
- Anthropic — Introducing the Model Context Protocol (November 25, 2024)
- modelcontextprotocol.io — Official specification and documentation
- modelcontextprotocol/servers — Reference server implementations (filesystem, GitHub, Slack, Postgres, Puppeteer, Git)
- Claude Code — Connect Claude Code to tools via MCP
- Cursor — Model Context Protocol documentation
- Wikipedia — Model Context Protocol