How to Install and Configure Your First MCP Server
A hands-on walkthrough for installing, configuring, and testing an MCP server. You'll be up and running in under 10 minutes.
Before You Begin
Make sure you have these prerequisites ready:
- Node.js 18+ — Check with
node --version. Download here - An MCP host — We'll use Claude Desktop in this guide
- A text editor — For editing the configuration JSON file
Step 1: Locate Your Config File
Every MCP host has a configuration file where you define which servers to connect to. For Claude Desktop:
macOS
~/Library/Application Support/Claude/claude_desktop_config.json
Windows
%APPDATA%\Claude\claude_desktop_config.json
Linux
~/.config/Claude/claude_desktop_config.json
If the file doesn't exist, create it with this minimal content:
{
"mcpServers": {}
}
Step 2: Add Your First Server
We'll install the filesystem server — it's the most universally useful MCP server and requires no API keys.
Edit your config file to add:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/you/Documents"
]
}
}
}
Let's break down each field:
"filesystem"— A name you choose for this server (can be anything)"command"— The executable to run (npxfor Node.js servers,pythonoruvxfor Python)"args"— Command-line arguments.-yauto-confirms the npx install, followed by the package name and any server-specific arguments
Step 3: Restart Your MCP Host
After saving the config, completely restart Claude Desktop (quit and reopen — not just close the window). The MCP host reads the config at startup.
Step 4: Verify the Connection
Open a new conversation in Claude Desktop. Look for the 🔨 hammer icon near the text input — this indicates MCP tools are available.
Click the hammer to see a list of available tools. You should see filesystem tools like:
read_file— Read contents of a filewrite_file— Create or overwrite a filelist_directory— List files in a directorysearch_files— Search for files by name or content
Step 5: Test It
Try these prompts:
"What files are in my Documents folder?"
"Read the contents of README.md"
"Create a file called test.txt with 'Hello from MCP!'"
Claude will ask for permission before using each tool — approve it and watch the magic happen.
Adding More Servers
Simply add more entries to the mcpServers object:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/Documents"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
}
},
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}
}
}
Servers with Environment Variables
Some servers need API keys or tokens. Use the "env" field:
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "BSA_your_key_here"
}
}
Python Servers
Python-based MCP servers use uvx or python:
"python-server": {
"command": "uvx",
"args": ["mcp-server-example"]
}
Configuration Tips
- Use absolute paths — Relative paths can cause errors since the server's working directory may not be what you expect
- Valid JSON only — No trailing commas! Use a JSON validator if you get errors
- One server per entry — Each server gets its own configuration block
- Start small — Add 1-2 servers, verify they work, then add more
Verifying Server Status
If something seems wrong, you can check server logs:
macOS/Linux
# Claude Desktop logs
tail -f ~/Library/Logs/Claude/mcp*.log
Windows
# Check Claude Desktop logs in
%APPDATA%\Claude\logs\
Common issues? Check our troubleshooting guide.
What's Next?
- Browse the MCP Hub directory for more servers to install
- Check out our Top 10 Essential Servers
- Learn about security best practices
- Ready to build your own? Read Building Custom MCP Servers
FAQ
Do I need to install Node.js for MCP servers?
Most MCP servers are built with TypeScript/Node.js, so yes — Node.js 18+ is required. Some servers are built with Python instead. Check the server's requirements.
How do I update an MCP server?
If using npx, servers are automatically fetched on each launch. For globally installed servers, run npm update -g package-name. For Python servers, use pip install --upgrade.
Can I install MCP servers on Windows?
Yes! MCP servers work on Windows, macOS, and Linux. The configuration paths differ by OS, but the setup process is the same.