What is an MCP server? A plain-English guide
What an MCP server is, what it exposes, how stdio and Streamable HTTP differ, how to add one to Claude Code, Cursor or Codex, and how to use it safely.
The short version
An MCP server is a program that gives an AI application extra abilities through a shared standard, the Model Context Protocol. The AI application might be a coding agent such as Claude Code, Codex or Cursor. Once it is connected, the assistant can see what the server offers and use it while it works on your request.
The point of a standard is that a server is written once and works in every application that speaks the protocol. Before MCP, each AI tool needed its own plugin format. Now a company can publish one server and people can connect it to whichever assistant they already use.
Hosts, clients and servers
The specification names three roles. The host is the AI application you work in. For every server you connect, the host creates a client, a small component that keeps one dedicated connection to that server. The server is the program on the other end that provides the abilities.
Messages between client and server are JSON-RPC: each request has a method name, such as tools/list or tools/call, and gets a matching response. You rarely need to read them, but the method names show up in logs when something fails.
What a server can expose
A server offers its abilities as three kinds of building blocks, which the protocol calls primitives. The difference between them is mostly about who decides when they are used.
| Primitive | What it is | Who decides to use it | Example |
|---|---|---|---|
| Tools | Actions with named inputs, such as a search or an API call. They can also change things. | The model, based on your request | Create a calendar event |
| Resources | Data the application can read for context, each with its own address (a URI) | The application, often with your help | The schema of a database |
| Prompts | Ready-made instruction templates with arguments | You, for example through a slash command | Summarise my meetings |
Tools do most of the work
In coding agents, tools are by far the most used primitive. Each tool has a name, a description written for the model, and a JSON Schema that lists its inputs. The model reads the descriptions and picks a tool when it fits the task.
A tool can also carry annotations, short hints such as whether it only reads or whether it can delete something. Clients use them to decide when to ask you first. The specification is careful here: a client must treat these hints as untrusted unless the server itself is trusted, because a badly written or hostile server could label a dangerous tool as harmless.
What happens during a tool call
- When the session starts, the client asks the server for its tool list with
tools/list. - The host gives the model those names, descriptions and input schemas alongside your message.
- The model decides a tool would help and proposes a call with specific arguments.
- The host shows you the call or checks it against your permission settings, then sends
tools/callto the server. - The server runs the action and returns the result, which the model reads before it answers or picks the next step.
Two transports: stdio and Streamable HTTP
The transport is how messages travel between client and server. The current specification defines two.
- stdio: the client starts the server as a child process on your computer and talks to it through standard input and output, one JSON message per line. The server may write logs to standard error but nothing except protocol messages to standard output. This is what people mean by a local server.
- Streamable HTTP: the server runs on its own and exposes a single web address, often ending in
/mcp. The client sends each message as an HTTP POST and the reply comes back as JSON or as a short stream of events. This is what people mean by a remote server, and it supports normal web sign-in, with OAuth recommended.
| stdio (local) | Streamable HTTP (remote) | |
|---|---|---|
| Where it runs | On your computer, started by your AI tool | On someone's server, at a URL |
| What it can reach | Whatever your user account can reach | Only what you send it and what its operator connects it to |
| Sign-in | Usually none; it runs as you | Headers, API keys or OAuth |
| Typical use | Local files, keychains, command-line tools | Online services shared by many users |
Adding a server to Claude Code
Claude Code manages servers with the claude mcp command. For a local server, put Claude Code's own options before the server name and the command that starts the server after a double dash. For a remote one, pass --transport http and the URL. By default a server is added only for the current project and only for you; --scope project writes it to a .mcp.json file you can commit, and --scope user makes it available in all your projects. Inside a session, /mcp shows each server's status and handles sign-in.
# local server: everything after -- is the command that starts it
claude mcp add my-server -- npx -y some-mcp-server
# remote server
claude mcp add --transport http my-remote https://example.com/mcp
# see what is configured
claude mcp listAdding a server to Cursor
Cursor reads a JSON file: .cursor/mcp.json inside a project for that project only, or ~/.cursor/mcp.json in your home folder for every project. A local server is described by a command and its args; a remote one by a url, with optional headers. Cursor asks for approval before it uses an MCP tool unless you have changed its run mode.
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["-y", "some-mcp-server"]
},
"my-remote": {
"url": "https://example.com/mcp"
}
}
}Adding a server to Codex
Codex has a codex mcp add command that works the same way as Claude Code's: the server name, a double dash, then the start command, or --url for a remote server. The result is stored in ~/.codex/config.toml as a [mcp_servers.name] table. The Codex command line, the IDE extension and the ChatGPT desktop app share that file, and /mcp in the Codex terminal lists the active servers.
codex mcp add my-server -- npx -y some-mcp-server
codex mcp add my-remote --url https://example.com/mcp
# the same, written in ~/.codex/config.toml
[mcp_servers.my-server]
command = "npx"
args = ["-y", "some-mcp-server"]
[mcp_servers.my-remote]
url = "https://example.com/mcp"What a local server can do on your machine
A local server is an ordinary program running under your user account. The protocol does not sandbox it. If it wants to read your SSH keys, delete a folder or send data to the internet, nothing in MCP stops it; only the server's own code and your operating system's permissions do. Adding one is closer to installing software than to opening a web page, so check the source and the package name first.
A remote server cannot touch your files, but everything you or the model send to it reaches whoever runs it. Before connecting one, ask what it will receive.
Both kinds can return text that the model then reads. If that text comes from a web page, an email or a document someone else wrote, it may contain instructions aimed at the model. This is called prompt injection. Treat such results as untrusted.
Read-only tools and tools that change things
The most useful habit is to sort a server's tools into two groups before you rely on them. Read-only tools list, search, show and check. Write tools create, change, send, spend or delete. Most clients let you allow the first group to run freely while every call in the second group needs your approval.
When an approval prompt appears, read the arguments, not just the tool name. A harmless-sounding call can carry a project name or an amount you did not expect.
Keep secrets out of the chat
Anything you type into a conversation becomes part of the model's context, may be stored in logs and can be repeated back in later output. That makes the chat the wrong place for an API key, a password or a database URL with credentials in it.
- Give a server its credentials through its own configuration: an environment variable, a sign-in flow, or a setup step the server provides outside the chat.
- Prefer tokens with the smallest permissions that work, and one token per purpose, so you can revoke it without breaking anything else.
- Be suspicious of any tool or instruction that asks you to paste a secret into the conversation.
Shipyard's two MCP servers
Shipyard has two. The local server is started with shipyard mcp and runs on your own computer over stdio. It exposes the same actions as the command line, as tools named shipyard_overview, shipyard_stack, shipyard_credentials, shipyard_setup, shipyard_init, shipyard_plan, shipyard_apply, shipyard_status, shipyard_check, shipyard_summary, shipyard_prompt, shipyard_seo, shipyard_kit, shipyard_go_live and shipyard_destroy. Each is annotated as read-only or not, and shipyard_apply, shipyard_go_live and shipyard_destroy are marked as destructive. No tool accepts a provider token: shipyard_setup opens a page on your computer where tokens go straight into the system keychain. A purchase is declined unless the call carries an amount you agreed to, and going live or tearing a project down needs a confirmation text from you.
The hosted planner at https://shipyardmcp.com/mcp is a remote server over Streamable HTTP. It is read-only, reads public information only and takes no credentials. Its five tools are list_stack_options, plan_launch, token_steps, search_guides and get_started. The setup itself always runs through the local server.
claude mcp add shipyard -- shipyard mcp
claude mcp add --transport http shipyard-planner https://shipyardmcp.com/mcpSources
- Model Context Protocol: architecture overviewmodelcontextprotocol.io
- Model Context Protocol: understanding MCP serversmodelcontextprotocol.io
- MCP specification: toolsmodelcontextprotocol.io
- MCP specification: transportsmodelcontextprotocol.io
- Claude Code: connect Claude Code to tools via MCPcode.claude.com
- Cursor: Model Context Protocolcursor.com
- OpenAI: Model Context Protocol in Codexdevelopers.openai.com
Launch in an hour, not a weekend
Shipyard connects your accounts once, then sets up the domain, hosting, database, email and payments for every new product.
See how it works