How to Set Up Your First MCP Server in 5 Minutes
A quick-start guide to installing and configuring your very first MCP server with Claude Desktop. Get up and running in minutes.
Generate & Validate Multi-Client MCP Config
One-click export with environment variables & path locators for Claude Desktop, Cursor, Windsurf, and OpenAI Codex CLI.
Set Up Your First MCP Server in 5 Minutes
This guide walks you through installing your first MCP server (the Filesystem server) and connecting it to Claude Desktop, turning a standard LLM chat interface into a capable local coding assistant.
Prerequisites
- βΈNode.js 18+ installed on your system (
node -vto check) - βΈClaude Desktop application (download from anthropic.com)
- βΈBasic familiarity with your operating system's terminal or command line.
Step 1: Install Claude Desktop
Download and install Claude Desktop from the official Anthropic website. This will act as your MCP host β the application that connects to and coordinates your MCP servers.
Step 2: Locate Your Configuration File
Claude Desktop stores its MCP connection string configuration in a JSON file:
- βΈmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json - βΈWindows:
%APPDATA%\Claude\claude_desktop_config.json
Create this file if it doesn't already exist.
Step 3: Add Your First Server
Let's start with the official filesystem MCP server. Edit your config file:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"C:/Users/yourusername/Documents/sandbox"
]
}
}
}Best Practices
[!WARNING] Replace
C:/Users/yourusername/Documents/sandboxwith a real, absolute path on your system. Always use forward slashes/even on Windows paths. Backslashes\act as escape characters in JSON and will silently corrupt your file paths.
- βΈSandbox Your Environments: For your first server, point the path to an empty directory or a safe "sandbox" project. Do not point it to your root drive
C:/.
Step 4: Restart Claude Desktop & Test
- βΈQuit Claude Desktop completely (do not just close the window; right-click and exit the application from the system tray or macOS menu bar).
- βΈRelaunch Claude Desktop.
- βΈLook at the chat input box. You should now see a Hammer icon (π¨) in the bottom-right corner. Hovering over it will list the tools exposed by the filesystem server:
read_file,write_file,list_directory, etc. - βΈTry asking Claude:
"List the files inside my configured sandbox folder and write a hello.txt file inside it."
Troubleshooting Guide
If the Hammer icon does not appear, check the local logs generated by the host:
- βΈWindows:
%APPDATA%\Claude\logs\mcp.log - βΈmacOS:
~/Library/Logs/Claude/mcp.log
Common Error: command not found: npx
This means Node.js is not added to your system $PATH, or Claude Desktop was launched in an environment where it couldn't inherit your user's path. Specify the absolute path to your npx.cmd (Windows) or npx (macOS/Linux) binary inside the "command" property.
Common Error: Invalid JSON Format
Ensure your JSON contains matching double quotes and no trailing commas. Even a single syntax error in claude_desktop_config.json will cause Claude to ignore the entire file silently. Validate your config via any online JSON parser.
Build your full agent toolstack in the Visual Generator
Combine How to Set Up Your First with databases, search APIs, and memory graphs in a single configuration file.
Related Guides
MCP Server Security Best Practices: Protecting Your Data
Essential security guidelines for running MCP servers. Learn about credential management, access control, and data protection strategies.
Getting StartedWhat Is the Model Context Protocol (MCP)? A Complete Introduction
Learn the fundamentals of MCP β what it is, why it matters, and how it enables AI agents to connect with external tools and data sources through a standardized protocol.
Getting StartedHow to Configure MCP Servers in OpenAI Codex CLI (2026 Guide)
Step-by-step config.toml guide and CLI commands for connecting MCP servers to OpenAI Codex CLI.