Guide

What Is an MCP Server?

An MCP server is a small program that hands an AI agent new abilities, search the web, query a database, open a pull request, through one open protocol. Here is what it is, how the pieces fit, and how to run your first one.

By Kylian Migot · Updated July 2026 · 7 min read

Quick answer

An MCP server exposes tools (functions an agent can call) and data (things it can read) through the Model Context Protocol, an open standard from Anthropic. Write one server and any MCP-compatible agent, Claude Code, Codex, most agentic IDEs, can use it. No per-tool integration required.
What it is
A program that exposes tools + data to AI agents over MCP
The protocol
Model Context Protocol, an open standard from Anthropic
Exposes
Tools (call), Resources (read), Prompts (invoke)
Talks over
stdio (local subprocess) or an HTTP transport (remote), via JSON-RPC
01

The One-Sentence Answer

An MCP server is a small program that gives an AI agent access to capabilities it does not have on its own, searching the web, reading a database, controlling a browser, checking GitHub, by exposing them through the Model Context Protocol (MCP). Because MCP is an open standard, one server works with every MCP-compatible agent, so the integration you write once is reusable everywhere.

If you just want a ranked list of servers to install, jump to the best MCP servers for AI coding. This page explains what an MCP server actually is and how the moving parts fit together.

02

What the Model Context Protocol Is

MCP is an open standard created by Anthropic that defines a single interface between AI models and the outside world. The common analogy is USB-C: before it, every device needed its own cable; after it, one port fits everything. Before MCP, each AI tool needed a bespoke integration for every service; with MCP, any compatible agent speaks to any compatible server through the same protocol.

The point is reuse. A GitHub MCP server written once is usable from Claude Code, from Codex, and from the next agent that ships, without anyone rewriting the integration. That is why hundreds of servers existed within a year of the protocol's release, and why MCP became the default way to extend coding agents in 2026.

03

Host, Client, Server: Who Does What

Three roles, and keeping them straight removes most of the confusion around MCP:

RoleWhat it isExample
HostThe AI application you actually use; it contains the model and manages the clients.Claude Code, Codex, an agentic IDE, AIDEN
ClientA connector inside the host that maintains one dedicated link to one server.The connection Claude Code opens to your GitHub server
ServerThe program exposing tools, resources, and prompts.GitHub MCP, Postgres MCP, a server you write

Each client holds a one-to-one connection to a single server, so a host with three servers runs three clients. That isolation matters: one misbehaving server cannot see or interfere with another's connection. The model never talks to a server directly, it asks the host, and the host's client makes the call, which is also where permission and approval controls live.

Your AI workspace for shipping software.

Download AIDEN free and point it at your existing Claude Code or Codex setup. No credit card, running in minutes.

Download AIDEN free

Free to start · macOS 12+ · No credit card required

04

The Three Things a Server Can Expose

An MCP server offers up to three kinds of capability. Coding servers lean on the first, but all three are part of the standard:

Tools

Functions the model can call, with a name, description, and typed arguments. Web search, a SQL query, opening a pull request. The model decides when to call them; the client executes and returns the result.

Resources

Read-only data the host can pull into context: files, database rows, API responses, log output. Application-controlled, so the host chooses what to expose rather than the model requesting arbitrary reads.

Prompts

Reusable, parameterised message templates a user can invoke by name, a code-review prompt, a migration checklist. They standardise common requests instead of retyping them each session.

The split between model-controlled tools and application-controlled resources is deliberate. The model decides when to call a tool, but the host decides which resources to expose, so a server cannot quietly read data you never surfaced. This is closely related to, but distinct from, agent skills: skills are procedural know-how loaded into the model, MCP servers are live connections to external systems.

05

How a Server and Agent Actually Talk

Under the hood, host and server exchange JSON-RPC messages over a transport. Two transports cover almost everything:

TransportWhen it's usedHow it runs
stdioLocal servers, the common case for codingThe host launches the server as a subprocess and talks over standard input/output. Nothing leaves your machine.
HTTP-basedRemote / hosted serversA server runs as a web service so it can serve many clients over the network, useful for shared or cloud-hosted tools.

For local development, stdio is what you will use most: the install command below simply tells the host how to spawn the server process. Because the model only ever sees the tools and their results, never the transport, you can move a server from local stdio to a remote HTTP endpoint without changing how the agent uses it.

06

Running Your First MCP Server

You rarely write a server to get started, you connect an existing one. In Claude Code, adding the GitHub server takes one command:

# Claude Code, local scope, stored in ~/.claude.json
claude mcp add github \
  -e GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_token_here \
  -- npx -y @modelcontextprotocol/server-github

# list what's connected
claude mcp list

Scope decides where the entry is stored. Local and user scope live in ~/.claude.json, private to your machine. Project scope writes a .mcp.json at the repo root that you commit, so everyone who clones the project inherits the same servers:

// .mcp.json at the repo root, checked into git (no secrets)
{
  "mcpServers": {
    "fetch": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-fetch"]
    }
  }
}
07

MCP Is Optional, and AIDEN Inherits Yours

You do not need any MCP server to ship code with agents, Claude Code and Codex are useful with zero configured. MCP is an extension layer you reach for when an agent keeps hitting the same wall: stale docs, an unknown schema, invisible CI status.

FAQ

What is an MCP server in simple terms?
An MCP server is a small program that exposes capabilities, tools an AI agent can call and data it can read, through the Model Context Protocol (MCP), an open standard from Anthropic. Instead of building a custom integration for every AI tool, you write one MCP server and any MCP-compatible agent (Claude Code, Codex, and most agentic IDEs) can use it.
What is the difference between an MCP client and an MCP server?
The host application (like Claude Code) contains one or more MCP clients. Each client opens a dedicated connection to one MCP server. The server exposes tools, resources, and prompts; the client relays them to the model and calls them on the model's behalf. A one-to-one client-to-server link keeps each connection isolated.
What can an MCP server expose?
Three primitives. Tools are functions the model can call (search the web, run a query, open a PR). Resources are data the application can read into context (files, database rows, API responses). Prompts are reusable templates a user can invoke. Most coding-focused servers lean heavily on tools.
How does an MCP server communicate?
Over a transport. Local servers use stdio, the agent launches the server as a subprocess and talks to it over standard input/output. Remote servers use an HTTP-based transport so a hosted service can serve many clients. Either way the messages are JSON-RPC, so the model never sees transport details.
Are MCP servers safe to run?
Treat them like any dependency. A server you install runs with whatever access you grant it, filesystem paths, database credentials, API keys. Prefer official or well-reviewed servers, scope credentials to read-only where possible, and check into git only the config, never the secrets. Local stdio servers never leave your machine, which is one reason local-first setups reduce exposure.
Do I need to write my own MCP server?
Usually no. Hundreds of ready-made servers exist for GitHub, Postgres, Playwright, the filesystem, and more. Write your own only when you need to expose an internal system, a private API, an in-house database, a company tool, that no public server covers.

Keep reading

Every MCP server you own, on every agent AIDEN runs.

AIDEN orchestrates Claude Code and Codex and inherits their MCP configuration automatically. Free to start, one project, no credit card.

macOS 12+ · Bring your own Claude Code or Codex · Your code stays local