What Is MCP? How to Set Up Your First MCP Server (Beginner’s Guide)

What Is MCP? How to Set Up Your First MCP Server (Beginner's Guide)

AI assistants can write well, but they cannot see your files or tools. The Model Context Protocol, or MCP, fixes that. This guide shows you how to set up your first MCP server.

Table of Contents (13)
  1. What Is MCP?
  2. How MCP Works
  3. Why MCP Matters Now
  4. What You Need
  5. Step 1: Open the Config File
  6. Step 2: Add the Filesystem Server
  7. Step 3: Restart and Test
  8. Step 4: Try the Fetch Server
  9. Step 5: Test with MCP Inspector
  10. Stay Safe
  11. Troubleshooting
  12. FAQ
  13. Conclusion

What Is MCP?

MCP is an open standard that links AI apps to outside systems. The official docs at modelcontextprotocol.io say it lets apps such as Claude or ChatGPT reach data sources and tools — local files, databases, and search engines. Think of it as a USB-C port for AI apps.

Anthropic launched MCP on 25 November 2024. In December 2025, it gave the protocol to the Agentic AI Foundation under the Linux Foundation.

How MCP Works

MCP has three roles. The host is the AI app, such as Claude Desktop, VS Code, or Cursor. The client is a connector inside the host; one client talks to one server. The server is a small program that offers tools and data, such as the Filesystem server. They talk with JSON-RPC 2.0 messages. A local server runs over standard input and output (stdio).

A server offers three things: tools (actions the model can call, like reading a file), resources (data shown to the model), and prompts (ready-made templates). Claude Desktop supports all three.

Why MCP Matters Now

The same server works in many tools. Claude Code, Codex, and Cursor each offer a CLI, editor integration, cloud agents, and MCP support.

What You Need

You need three things: Claude Desktop, installed and up to date (MCP works in the desktop app, not the Claude web app); Node.js 24 or later (required with npx, per the Filesystem README); and a test folder with a few harmless files. Check your version:

node --version

If it is below 24, upgrade it. Then make a test folder. On macOS or Linux:

mkdir -p ~/mcp-test
echo "Hello from my first MCP server." > ~/mcp-test/notes.txt

On Windows, make a folder like C:\mcp-test and add a text file. Use a test folder, not your home folder.

Step 1: Open the Config File

Claude Desktop reads MCP servers from a JSON file called claude_desktop_config.json. On macOS it is at ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows it is at %APPDATA%\Claude\claude_desktop_config.json, and on Linux at ~/.config/Claude/claude_desktop_config.json. Open it in the app: Settings → Developer → Edit Config.

Step 2: Add the Filesystem Server

Add the official Filesystem server under mcpServers — swap in your test folder path:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/username/Desktop"]
    }
  }
}

List just your test folder, such as /Users/username/mcp-test on macOS — each folder becomes an allowed folder. The -y flag runs the package without asking. On Windows, use cmd /c and doubled backslashes (C:\\mcp-test). Save the file; a missing comma is the most common error.

Step 3: Restart and Test

Quit Claude Desktop fully and open it again — servers load only at start-up. Then ask: “Which folders can you access? List the files in my test folder.” Next, ask: “Read notes.txt in my test folder and tell me what it says.” If Claude quotes the file, your first MCP server works.

Step 4: Try the Fetch Server

Fetch, another official reference server, fetches a web page and turns it into clean markdown, so the AI can read a page for you. Add it as a second entry in the same config file, with command npx and args ["-y", "@modelcontextprotocol/server-fetch"], then restart Claude Desktop and ask it to fetch a docs page and sum it up.

Step 5: Test with MCP Inspector

If a server does not show up, use MCP Inspector, the official testing tool. The official Inspector docs give this command:

npx -y @modelcontextprotocol/inspector npx @modelcontextprotocol/server-filesystem /Users/username/Desktop

It opens a web page to list the server’s tools and run one by hand. If it works here but not in Claude Desktop, the fault is in your config file.

Stay Safe

First, share one folder, not your whole computer — never point the server at your home folder or full drive. Second, start read-only if you only need to read: add --read-only to the args and it hides every write tool. Third, never paste secrets into a config file — keys and tokens belong in environment variables. The Filesystem and Fetch servers need no logins at all.

Troubleshooting

No tools appear? Restart Claude Desktop fully. Server cannot read your folder? The path in args is wrong. npx fails? Node.js is missing or older than 24 — run node --version and upgrade. Claude cannot reach any folder? Add one allowed folder to args. Config does nothing? Check the JSON for a missing comma or bracket.

FAQ

Is MCP only for Claude?

No. It is open, with public SDKs. The docs also list ChatGPT, VS Code, Cursor, and others.

Do I need to code to use MCP?

No. Install Node.js, edit one JSON file, and restart the app.

Is it safe to let an AI read my files?

It is as safe as the folders you allow. The server can only touch the folders you list. Keep that area small, and use --read-only when you do not need writes.

MCP vs API — what is the difference?

An API is one link between two set systems. MCP is a standard so many clients and servers can talk to each other with no custom link for each pair.

Conclusion

MCP turns an AI assistant into a tool that can work with your files — and the first step is small. Install Node.js 24 or later, make a test folder, add the official Filesystem server to claude_desktop_config.json, restart Claude Desktop, and ask it to list your files. That is the whole setup: a command, some args, and a restart. Once it works, try a second server, such as the Fetch server for reading web pages, and keep your test folder small while you learn. Small steps now make bigger MCP setups easy later.

Sources:
– https://modelcontextprotocol.io/docs/getting-started/intro
– https://modelcontextprotocol.io/quickstart/server
– https://modelcontextprotocol.io/specification/2025-11-25
– https://raw.githubusercontent.com/modelcontextprotocol/servers/main/src/filesystem/README.md
– https://modelcontextprotocol.io/docs/2024-11-05/tools/inspector
– https://raw.githubusercontent.com/modelcontextprotocol/docs/refs/heads/main/clients.mdx
– https://www.anthropic.com/news/model-context-protocol
– https://cloudparts.dev/technologies/claude-code/
– https://cloudparts.dev/technologies/codex/
– https://cursor.com/changelog/cli-jan-16-2026
– https://parallel.ai/articles/codex-vs-cursor

Leave a Comment