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.

Simon, Founder of Shipyard

By · Founder of Shipyard

7 minute read

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.

PrimitiveWhat it isWho decides to use itExample
ToolsActions with named inputs, such as a search or an API call. They can also change things.The model, based on your requestCreate a calendar event
ResourcesData the application can read for context, each with its own address (a URI)The application, often with your helpThe schema of a database
PromptsReady-made instruction templates with argumentsYou, for example through a slash commandSummarise 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

  1. When the session starts, the client asks the server for its tool list with tools/list.
  2. The host gives the model those names, descriptions and input schemas alongside your message.
  3. The model decides a tool would help and proposes a call with specific arguments.
  4. The host shows you the call or checks it against your permission settings, then sends tools/call to the server.
  5. 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 (local)Streamable HTTP (remote)
Where it runsOn your computer, started by your AI toolOn someone's server, at a URL
What it can reachWhatever your user account can reachOnly what you send it and what its operator connects it to
Sign-inUsually none; it runs as youHeaders, API keys or OAuth
Typical useLocal files, keychains, command-line toolsOnline 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.

Terminal
# 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 list

Adding 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.

JSON
{
  "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.

Text
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.

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.

Terminal
claude mcp add shipyard -- shipyard mcp
claude mcp add --transport http shipyard-planner https://shipyardmcp.com/mcp

Sources

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

Read next