What Is an MCP Server? Setup, Examples and AWS

Logeshwaran
—

An MCP server is a small program that lets AI apps like Claude, ChatGPT or VS Code use your files, tools and data through one standard.

The short version: MCP, the Model Context Protocol, is an open standard for connecting AI applications to other systems. An MCP server offers tools the AI can call, resources it can read and prompts it can reuse; the AI app connects to it and decides when to use them. To try one in Claude Code, run claude mcp add --transport http notion https://mcp.notion.com/mcp. In Claude Desktop, add it to claude_desktop_config.json. AWS publishes its own free, open-source MCP servers for working with your AWS account.

Jake keeps his phone repair shop’s stock list in a database on AWS, and every Friday he asks the same three questions about it: what’s low, what sold, and what the AWS bill looks like this month. He’d been copying numbers into Claude by hand. Ethan, who does cloud and AI work for a living, said Claude could just look, if it had an MCP server.

Jake: "So it’s a plugin for Claude?"

Ethan: "Closer to a USB port. Any AI app that speaks MCP can plug into any MCP server, and you choose exactly what it can reach."

Here’s what surprises most people: an MCP server has no AI inside it at all. It’s an ordinary program that answers requests. All the thinking happens in the app you already use. This guide covers what MCP servers are, how they compare to APIs, agents and RAG, how to add one to Claude Desktop, Claude Code and VS Code, the AWS MCP servers, a 20-line server of your own, and the errors people hit.

What is an MCP server?

The official description is a good one: MCP is “an open-source standard for connecting AI applications to external systems”, and you can “think of MCP like a USB-C port for AI applications.” Before MCP, every AI app needed its own custom connector for every service. With MCP, a service is wrapped once as a server, and every MCP-compatible app can use it.

The architecture has three parts:

PartWhat it isExample
HostThe AI application you useClaude Desktop, Claude Code, VS Code
ClientA connection the host creates, one per serverCreated for you; you never see it
ServerThe program that exposes tools, resources and promptsA filesystem server, a GitHub server, an AWS server

Servers talk to hosts in one of two ways. Stdio runs the server as a local process on your own computer, talking through standard input and output: fast, private and the most common. Streamable HTTP reaches a server over the network, which is how remote services like Notion offer theirs. When the host connects, it asks the server what it offers (each kind has a */list request), and the AI decides what to call from those descriptions.

What a server offersWhat it meansExample
ToolsActions the AI can takeQuery a database, create a ticket, read an S3 object
ResourcesData the AI can read for contextA file’s contents, a table, an API response
PromptsReusable templatesA “review this pull request” prompt with the right steps

MCP server vs API, agent, RAG and client

These five get mixed up constantly. In one line each:

TermWhat it isHow it relates to an MCP server
APIAn interface programs call, written for developersMost MCP servers wrap an API so an AI can discover and call it on its own
MCP clientThe connection inside the AI appOne client per server; the app makes it
AI agentThe AI that plans and takes stepsUses MCP servers as its tools; a server is not an agent
RAGRetrieving text and adding it to the promptAn MCP server can do retrieval, and can also take actions
LLMThe language modelLives in the host app; the server has none

Jake: "So the server never sees my questions?"

Ethan: "Only the tool calls the AI decides to make, with the arguments it picks. That’s why you choose servers carefully: whatever a server can reach, the AI can ask it to touch."

MCP server examples

  • Filesystem: lets the AI read and write files in folders you list. The official reference server, used in the setup below.
  • Notion, GitHub, Slack and other SaaS: many services now host remote MCP servers you add by URL.
  • Playwright: lets the AI drive a web browser, popular in VS Code for testing.
  • AWS API MCP Server: works across AWS services with your credentials (more below).
  • AWS Pricing MCP Server: answers “what will this cost?” from AWS’s price data.
  • Your own: a 20-line Python server can expose your shop’s stock database. Section below.

Add an MCP server to Claude Desktop

  1. Open Claude Desktop’s configuration file. It lives at %APPDATA%\Claude\claude_desktop_config.json on Windows, ~/Library/Application Support/Claude/claude_desktop_config.json on a Mac and ~/.config/Claude/claude_desktop_config.json on Linux. Create it if it doesn’t exist.
  2. Add the server under mcpServers. This is the official filesystem example for Windows; on a Mac the paths look like /Users/username/Desktop.
  3. Save the file and quit Claude Desktop fully, then open it again. The server’s tools appear in the chat’s tools menu.
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "C:\\Users\\username\\Desktop",
        "C:\\Users\\username\\Downloads"
      ]
    }
  }
}

The folders in args are the only places the server can reach, which is the point: you decide the boundary. npx needs Node.js installed.

Add an MCP server in Claude Code

Claude Code manages servers from the command line:

# a remote server over HTTP
claude mcp add --transport http notion https://mcp.notion.com/mcp

# a local server: everything after -- is the command that runs it
claude mcp add --transport stdio myserver -- npx server

# check, inspect and remove
claude mcp list
claude mcp get notion
claude mcp remove notion

Inside a session, type /mcp to see each server’s status. Add --scope to choose whether a server is just for you or shared with a project through a .mcp.json file in the repository.

Add an MCP server in VS Code

Open the Command Palette and run MCP: Add Server: VS Code can install from an npm or pip package or a Docker image, or import servers you already set up in another app. If you prefer editing the file, the VS Code configuration reference describes two formats: VS Code’s own, with a top-level "servers" object, and a portable one with "mcpServers" in a .mcp.json file. The portable example:

{
  "mcpServers": {
    "playwright": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@playwright/mcp@latest"]
    }
  }
}

The most common reason a server “isn’t showing” is mixing the two: mcpServers in a file VS Code reads as its own format, or the other way round.

AWS MCP servers

AWS publishes a whole set of MCP servers in its awslabs/mcp repository, free and open source under the Apache-2.0 license. The ones most people start with:

ServerWhat it does
AWS API MCP ServerWorks with AWS services through their APIs, with command validation and security controls
AWS Documentation MCP ServerSearches and reads AWS documentation, so answers cite current docs
AWS Pricing MCP ServerLooks up service prices and estimates costs
AWS MCP Server (preview)A remote server hosted by AWS that combines API access with the latest documentation

Most of the local ones run with uvx, the runner from the uv Python tool. For example, the documentation server:

{
  "mcpServers": {
    "aws-docs": {
      "command": "uvx",
      "args": ["awslabs.aws-documentation-mcp-server@latest"]
    }
  }
}

The managed AWS MCP Server is reached through AWS’s small proxy: uvx mcp-proxy-for-aws@latest https://aws-mcp.us-east-1.api.aws/mcp. Whichever you use, the server acts with the AWS credentials you give it, so start with a read-only role and widen it only when you need to. Jake’s Friday questions only need read access.

Jake: "Could it delete my database by mistake?"

Ethan: "Only if the credentials allow it. Give it a read-only role and the worst it can do is read."

Build your own MCP server in Python

The official build-a-server tutorial uses version 2 of the Python SDK, where the server class is MCPServer. Older guides use FastMCP; that’s the version-1 name. A server that answers stock questions:

# setup: uv init stock && cd stock && uv add "mcp[cli]"
from mcp.server import MCPServer

mcp = MCPServer("stock")

STOCK = {"iphone 15 screen": 4, "pixel 8 battery": 0, "usb-c port": 12}

@mcp.tool()
async def check_stock(part: str) -> str:
    """Return how many of a part are in stock."""
    count = STOCK.get(part.lower())
    if count is None:
        return f"No part called {part}"
    return f"{part}: {count} in stock"

if __name__ == "__main__":
    mcp.run(transport="stdio")

The type hints and the docstring become the tool’s description, which is what the AI reads when it decides whether to call it. Register the server in Claude Desktop with "command": "uv" and "args": ["--directory", "C:\\path\\to\\stock", "run", "stock.py"], then restart the app.

The rule that breaks most first servers

A stdio server must never write to standard output. The official tutorial puts it bluntly: writing to stdout “will corrupt the JSON-RPC messages and break your server”. Leave print() out of a stdio server entirely and log to a file or standard error instead.

MCP server not working: errors and fixes

“MCP error: server disconnected” or the server won’t start

Run the exact command from your config in a terminal; the real error appears there. Then check the usual causes from the official troubleshooting steps: paths must be absolute, not relative; the runtime (Node.js for npx, uv for uvx) must be installed; and the app must be restarted after every config change.

The server starts, then drops

A stdio server that prints anything to standard output breaks its own connection. Remove print() calls and stray logging to stdout.

MCP server not showing in VS Code

Check the file format ("servers" for VS Code’s own file, "mcpServers" in a portable .mcp.json), start the server when VS Code asks you to trust it, and read its output panel.

Claude Code doesn’t see the server

Run claude mcp list to confirm it’s registered and in the right scope for the folder you’re in, then /mcp inside the session to see its status.

Are MCP servers safe?

An MCP server runs with your permissions or your credentials, so treat it like any software you install. The MCP security guidance covers attacks such as a compromised local server and stolen tokens, and Claude Code’s documentation warns that servers which fetch outside content can expose you to prompt injection: text on a web page telling the AI to do something you didn’t ask. The practical rules:

  1. Install servers only from publishers you trust, and read what each tool can do.
  2. Give each server the least access it needs: specific folders, a read-only database user, a read-only AWS role.
  3. Be careful combining a server that reads the web with one that can change things.
  4. Review what the AI is about to do before approving actions that write, delete or spend money.

Is MCP free?

The protocol and the official SDKs are free and open source, and most servers cost nothing to run on your own machine. What you pay for is the AI side (a Claude or ChatGPT plan, or API usage) and whatever paid service a server calls for you. AWS’s open-source servers are free, but every AWS API call they make is billed as usual, which is one more reason to start them with read-only access.

Jake’s setup, in five steps

  1. Decide the question you want answered (“what’s low in stock?”) and the system that holds the answer.
  2. Find an existing server for that system, or write a small one with MCPServer.
  3. Give it the least access that answers the question.
  4. Add it to the app you use: claude_desktop_config.json, claude mcp add or MCP: Add Server.
  5. Ask the question in plain words and check which tool the AI called.

Frequently asked questions

What is an MCP server?

An MCP server is a small program that gives AI applications access to one system, such as your files, a database or a cloud account, through the Model Context Protocol. It offers tools the AI can call, resources it can read and prompts it can reuse, and any MCP-compatible app can use it.

What does MCP stand for?

MCP stands for Model Context Protocol. It is an open-source standard for connecting AI applications to external systems, first published by Anthropic and now used by Claude, ChatGPT, VS Code, Cursor and many other tools.

What is the difference between an MCP server and an API?

An API is written for programs a developer codes against. An MCP server usually wraps one or more APIs in a standard shape an AI application can discover on its own: it lists its tools with descriptions and input types, and the AI decides when to call them. You still need the API underneath; MCP is the adapter.

Does an MCP server need an LLM?

No. The server has no model of its own. It only answers requests. The language model lives in the host app, such as Claude Desktop, Claude Code or VS Code, and the model decides which tool to call and with what arguments.

Is an MCP server an AI agent?

No. An agent is the AI side that plans and acts; an MCP server is one of the tools the agent can use. One agent can connect to many MCP servers at once, one per system it needs.

What is the difference between an MCP server and an MCP client?

The client lives inside the AI application and keeps one connection to one server. The host app creates one MCP client for each MCP server you add. The server is the program that exposes the tools and data.

What is the difference between MCP and RAG?

RAG fetches relevant text and adds it to the prompt before the model answers. MCP lets the model call tools during the conversation, including tools that search documents, so an MCP server can be one way to do RAG, and it can also take actions RAG cannot.

Is an MCP server free?

The protocol and the official SDKs are free and open source, and many servers are free to run on your own computer. You still pay for the AI application or API you use, and for any paid service the server calls on your behalf.

How much does an MCP server cost on AWS?

The AWS-published open-source MCP servers are free to download under the Apache-2.0 license; the AWS API calls they make are billed like any other API call. AWS also runs a managed AWS MCP Server, which is in preview; check its documentation for current terms before using it in production.

How do I add an MCP server to Claude Desktop?

Open claude_desktop_config.json (on Windows %APPDATA%\Claude\claude_desktop_config.json, on a Mac ~/Library/Application Support/Claude/claude_desktop_config.json), add the server under "mcpServers" with its command and arguments, save, and restart Claude Desktop.

How do I add an MCP server in Claude Code?

Run claude mcp add. For a remote server use claude mcp add --transport http NAME URL; for a local one use claude mcp add --transport stdio NAME -- COMMAND. Check it with claude mcp list, or type /mcp inside Claude Code.

Why is my MCP server not showing in VS Code?

Check that the server is defined in the right file and format: VS Code's own configuration uses a "servers" object, while the portable .mcp.json format uses "mcpServers". Then start or trust the server when VS Code asks, and look at the server's output for errors.

How do I fix "MCP error: server disconnected"?

Run the server's command yourself in a terminal to see the real error. The usual causes are a wrong or relative path in the config, a missing runtime such as Node.js or uv, or a stdio server that prints to standard output, which corrupts the messages. Fix it, then restart the app.

How do I build an MCP server in Python?

Install the SDK with uv add "mcp[cli]", create mcp = MCPServer("name") from mcp.server, decorate each function you want to expose with @mcp.tool(), and end with mcp.run(transport="stdio"). Type hints and docstrings become the tool descriptions the AI sees.

Are MCP servers safe?

Treat them like any software you install: they run with your permissions or credentials. Install servers only from publishers you trust, give them the least access they need (a read-only AWS role, specific folders), and be careful with servers that fetch web content, which can carry prompt-injection attacks.

Where can I find a list of MCP servers?

The Model Context Protocol project keeps reference and example servers, VS Code has a marketplace for them, Claude Code can add any remote server by URL, and AWS's own servers are in the awslabs/mcp repository on GitHub.

Revision note. Written November 27, 2026, for the current MCP specification, Python SDK version 2 and the AWS MCP servers as listed that day. “Give a man a fish and you feed him for a day; teach him to fish and you feed him for a lifetime”: one good server answers the same Friday question forever.

#AI

Related