# How to Set Up Your First MCP Server with Cursor (Step-by-Step for Beginners)
Everyone’s talking about MCP servers. Nobody’s explaining what they actually do or how to set one up in under half an hour.
Let’s fix that.
If you’ve seen “MCP server” mentioned in Cursor forums, Reddit threads, or Twitter and thought *”sounds powerful, but I have no idea where to start”* — this is for you. By the end of this tutorial, your AI coding assistant will be able to read your local files, search the web, and do a whole lot more. And it’ll take you about 30 minutes.
What Is an MCP Server (and Why Should You Care)?
MCP stands for Model Context Protocol. That sounds technical, so let’s ignore the name and talk about what it actually does.
Think of your AI coding assistant (Cursor, Copilot, Claude) like a very smart friend who can only help you with what’s inside their head. They can write code, explain concepts, debug errors — but they can’t open your files, check your Jira board, or look something up on the web unless you paste it into the chat first.
An MCP server changes that. It’s a small background program that gives your AI assistant the ability to “reach out and grab” information from the outside world — your filesystem, your database, GitHub issues, documentation sites, whatever you configure.
Real examples of what MCP servers can do:
- Let Cursor read every file in your
/srcfolder so it understands your whole codebase at once - Give your AI access to live web search results
- Connect to your GitHub Issues so the AI can reference actual tickets
- Query your local database directly
This is why developers who’ve set up MCP servers sound like they’re using a completely different tool than everyone else. Because in a way, they are.
Don’t worry — you’re not going to “break” anything here. MCP servers are just config files and small programs. Everything in this tutorial is reversible.
What You’ll Need Before You Start
Before we write a single command, let’s make sure you’re set up. This checklist takes about five minutes.
1. Cursor installed (free tier is fine) If you haven’t installed Cursor yet, start with our Cursor AI Setup Guide for Beginners first — it’ll walk you through downloading and getting oriented. Come back here when you’re ready. The free tier is fully supported for this tutorial. If you find yourself hitting context limits later, # Cursor Pro is worth the upgrade.
2. Node.js version 18 or higher Most MCP servers are built on Node.js. Check if you have it:
node --version
If you see something like v20.11.0, you’re good. If you get “command not found,” download Node.js from nodejs.org — grab the LTS version and install it like any other app.
3. Basic terminal comfort You should be able to open a terminal (Mac: Terminal or iTerm2, Windows: PowerShell or Windows Terminal, Linux: whatever you prefer) and run a command. That’s it. No advanced knowledge needed.
4. A text editor for config files Cursor itself works perfectly for editing config files. You can also use VS Code or any plain text editor.
✅ Got all four? Let’s go.
Step 1: Pick Your First MCP Server
There are hundreds of MCP servers out there, and that’s exactly why beginners get overwhelmed and do nothing. So we’re going to start with just one — and it’s the best possible choice for a first setup.
Recommendation: the official filesystem MCP server.
Here’s why it’s perfect to start with:
- It’s made by Anthropic (the team behind Claude), so it’s well-maintained and stable
- It’s immediately useful — Cursor can now read, list, and understand your local files
- It’s completely safe — you control exactly which folders it can access
- It ships with zero external dependencies beyond Node.js
The filesystem MCP server lets your AI assistant browse your project directory, read specific files, and give you advice based on your *actual* code — not just what you paste into the chat.
Step 2: Install and Configure It
Open your terminal. We’re going to install the filesystem MCP server package.
Install it globally via npm:
npm install -g @modelcontextprotocol/server-filesystem
You’ll see a bunch of output scroll by. When it finishes and returns you to the prompt, it’s done.
Verify the install worked:
npx @modelcontextprotocol/server-filesystem --version
If you see a version number, you’re good to go! 🎉
If you see an error like EACCES: permission denied, you may need to fix npm permissions. Run this instead:
sudo npm install -g @modelcontextprotocol/server-filesystem
Then enter your computer password when prompted.
Now we need to create a config file that tells Cursor (a) that this MCP server exists and (b) which folders it’s allowed to access.
Create the MCP config directory (if it doesn’t exist):
mkdir -p ~/.cursor/mcp
Create the config file:
touch ~/.cursor/mcp/config.json
Now open that file in Cursor (or any text editor) and paste in this JSON:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"@modelcontextprotocol/server-filesystem",
"/Users/YOUR_USERNAME/projects"
]
}
}
}
Important: Replace /Users/YOUR_USERNAME/projects with the actual path to the folder you want Cursor to be able to access. On a Mac, that might be /Users/jamie/code. On Windows, it’d look like C:\\Users\\jamie\\code. On Linux, something like /home/jamie/projects.
> 💡 Not sure what path to use? Run pwd in your terminal while inside your main projects folder. That command prints your current location — copy and paste that path into the config.
[SCREENSHOT: Show the config.json file open in Cursor with the correct path filled in]
Step 3: Connect It to Cursor
Time to tell Cursor to pick up the config we just created.
In Cursor: 1. Open the Command Palette with Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux) 2. Type “MCP” and look for “MCP: Reload Servers” or “Open MCP Settings” 3. Click it
[SCREENSHOT: Command palette showing MCP options]
Cursor will read your ~/.cursor/mcp/config.json and start the filesystem server in the background.
How to verify it’s connected:
- Open Cursor’s chat panel (the AI sidebar)
- Look for a small tools icon or “MCP” indicator near the model selector
- You should see “filesystem” listed as an available tool
[SCREENSHOT: Cursor chat panel showing MCP tools connected]
If you see it listed — congratulations, your first MCP server is live! 🎉
Troubleshooting common issues:
| Problem | Likely Cause | Fix |
|---|---|---|
| “Server failed to start” | Wrong path in config | Double-check the folder path in config.json |
| MCP option not appearing | Cursor version too old | Update Cursor to the latest version |
| “Cannot find module” error | npm install didn’t complete | Re-run the npm install command |
Step 4: Test It Out — Real Prompts to Try
Here’s the fun part. Open Cursor’s chat and try these prompts. The AI should now be using your filesystem server to fetch real information from your files.
Prompt 1: Understand your project structure
Read all the files in my /src folder and give me a plain-English summary of what this codebase does.
Prompt 2: Find something specific
Look through my project files and find every place where we're calling the database. List the file names and line numbers.
Prompt 3: Architecture review
Based on the files in my project, what are the main components and how do they communicate with each other?
Prompt 4: Spot potential issues
Scan my source files for any TODO or FIXME comments and list them for me.
Prompt 5: README generation
Read my project files and write a README.md that accurately describes what this project does, how to install it, and how to use it.
Watch how different the responses are compared to asking without MCP. The AI is actually *reading your code*, not making educated guesses. That’s the shift.
> 💡 VS Code + GitHub Copilot user? The same MCP config file structure works for Copilot’s agent mode in VS Code. Place your config.json in the VS Code MCP directory instead — # GitHub Copilot has supported MCP in agent mode since early 2026.
What’s Next: MCP Servers Worth Adding
Once your filesystem server is running smoothly, here are the next four I’d recommend adding. Each takes about five minutes to install.
Brave Web Search MCP
Gives your AI real-time web search. Great for researching libraries, checking docs, and getting up-to-date answers.
npm install -g @modelcontextprotocol/server-brave-search
Add to your config.json under mcpServers:
"brave-search": {
"command": "npx",
"args": ["@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "your-api-key-here"
}
}
(Grab a free API key at brave.com/search/api)
GitHub MCP Server
Lets your AI read your GitHub issues, PRs, and repository data directly. Huge for feature development and bug fixing.
npm install -g @modelcontextprotocol/server-github
SQLite MCP Server
Connects your AI to a local SQLite database so it can query your data, explain your schema, and help you write SQL.
npm install -g @modelcontextprotocol/server-sqlite
Fetch MCP Server
Lets your AI fetch and read the contents of any URL — documentation pages, API references, blog posts. Like giving it a web browser.
npm install -g @modelcontextprotocol/server-fetch
You Did It
You just set up your first MCP server. That puts you ahead of the vast majority of developers who’ve heard of MCP but never actually done anything with it.
Here’s a quick recap of what you did: 1. Installed the filesystem MCP server via npm 2. Created a config file that points it at your projects folder 3. Connected it to Cursor 4. Verified it’s working with real prompts
Your AI coding assistant is now a fundamentally different tool than it was 30 minutes ago.
From here, you might want to check out our post on What Is OpenClaw — it’s a related tool that extends this kind of AI-with-tools capability in interesting directions. And once your MCP setup is running smoothly, try this popular workflow for writing git commit messages with AI — it’s even better when the AI can actually see your changed files.
The best part? The MCP ecosystem is growing fast. New servers are being published every week. Once you know how to add one, you can add them all.
*This post contains affiliate links. We may earn a commission at no extra cost to you.*