All TutorialsOVERVIEW
Cursor is an AI-native code editor that supports Model Context Protocol (MCP) servers, allowing the in-editor agent to call external tools — official reference servers from modelcontextprotocol/servers for filesystem access, memory, Git, fetch, and more.
Cursor's UI evolves quickly; this guide focuses on verified server install commands from https://github.com/modelcontextprotocol/servers and commonly documented mcp.json patterns. Always cross-check Cursor's official documentation for menu paths in your version.
WHAT MCP ENABLES IN CURSOR
MCP servers extend Cursor beyond built-in codebase indexing. For example, the Filesystem reference server provides explicit allowlisted read/write/search tools with MCP ToolAnnotations marking destructive operations. Memory adds cross-session persistence. Git adds commit-aware queries.
PREREQUISITES
- Node.js 18+ for npx reference servers
- uv / uvx for Python reference servers (Git, Fetch, Time)
- Cursor build with MCP support enabled
Verified commands (official README):
npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/dir
npx -y @modelcontextprotocol/server-memory
uvx mcp-server-git --repository path/to/git/repo
uvx mcp-server-fetch
WHERE TO CONFIGURE
Two common locations (terminology may vary):
1. User-level MCP config — often ~/.cursor/mcp.json on macOS/Linux
2. Project-level — .cursor/mcp.json committed to the repo for team sharing
Cursor Settings may expose an MCP section to add servers graphically and preview generated JSON. VS Code MCP documentation describes MCP: Open User Configuration — Cursor inherits similar concepts.
EXAMPLE MCP.JSON (FILESYSTEM + MEMORY)
macOS / Linux:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/you/project"
]
},
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}
}
}
WINDOWS (OFFICIAL NPX WRAPPER)
{
"mcpServers": {
"filesystem": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"@modelcontextprotocol/server-filesystem",
"C:\Users\you\project"
]
},
"memory": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@modelcontextprotocol/server-memory"]
}
}
}
uvx servers (git, fetch, time) use uvx directly without cmd /c per the official README.
CURSOR-SPECIFIC WORKFLOW
1. Add MCP config for your project scope.
2. Restart Cursor or reload MCP from Settings.
3. Open Agent mode when you want autonomous tool use.
4. Prefer Filesystem Roots on supported builds — the Filesystem README recommends dynamic roots over hard-coded paths when the client supports them.
5. Review tool approval settings before enabling write_file on production branches.
SECURITY NOTES
Reference servers are educational per the official README. Scope paths to the workspace. Combine Git MCP with repository path equal to workspace root. Do not store secrets in Memory.
FAQ
Q: mcpServers vs servers key?
A: Claude uses mcpServers; VS Code workspace docs sometimes use servers — inspect config Cursor generates for your version.
Q: Commands source?
A: https://github.com/modelcontextprotocol/servers
Q: Agent ignores MCP?
A: Confirm server connected in MCP panel; restart; test standalone command in terminal.
HONEST DOC VARIANCE
Cursor MCP menus and file paths may differ from this guide. Treat docs.cursor.com and in-app Help as authoritative for UI clicks; treat modelcontextprotocol/servers as authoritative for command strings.
TROUBLESHOOTING
PATH issues on macOS GUI apps: launch Cursor from terminal once to inherit PATH, or use absolute paths to npx/node. Validate JSON. For first npx run, allow npm download time.
CURSOR AGENT VS CHAT MODE
MCP tools are most visible in Agent mode where Cursor autonomously selects tools. Chat mode may not invoke MCP unless configured — check Cursor docs for your release. Enable tool approval for Filesystem writes when working on main branches.
PROJECT VS GLOBAL CONFIG TRADEOFFS
Global ~/.cursor/mcp.json applies Memory and Time everywhere — convenient but shares memory graph across unrelated projects unless Memory stores separate files per working directory by happenstance. Project .cursor/mcp.json scoped Filesystem paths prevent cross-repo accidents — prefer project config for team repos checked into git.
FILESYSTEM ROOTS IN CURSOR
When Cursor supports MCP Roots, allowed directories update without editing mcp.json — the Filesystem README recommends this over static args when available. Test list_allowed_directories after connecting to confirm effective scope.
OFFICIAL SERVER COMMAND REFERENCE (CURSOR)
Filesystem: npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/dir
Memory: npx -y @modelcontextprotocol/server-memory
Git: uvx mcp-server-git --repository path/to/git/repo
Fetch: uvx mcp-server-fetch
Time: uvx mcp-server-time
Sequential Thinking: npx -y @modelcontextprotocol/server-sequential-thinking
Everything: npx -y @modelcontextprotocol/server-everything
All from https://github.com/modelcontextprotocol/servers README.
TEAM ONBOARDING
Commit .cursor/mcp.json with workspace-relative paths documented in README. Document Windows cmd /c requirement for teammates on Windows. Exclude secrets — use env for API keys on community servers.
INTEGRATION WITH CURSOR RULES
.cursor/rules files guide model behavior; MCP extends capability. Rules say "prefer TypeScript strict mode"; Memory remembers "this repo uses pnpm"; Filesystem edits files; Git inspects history — complementary layers, not duplicates.
PERFORMANCE NOTES
Each MCP server is a Node or Python process — memory footprint adds up. Disable unused servers in mcp.json. Everything server is for testing — remove after validation to free resources.
CURSOR DOCUMENTATION DISCLAIMER
Cursor ships frequent updates to MCP UI and config file locations. When this guide conflicts with in-app instructions or docs.cursor.com, follow Cursor's official docs for clicks and file paths while keeping server command strings from modelcontextprotocol/servers unchanged — those commands are client-portable by design.
STARTER VERIFICATION PROMPT
After configuring Filesystem and Memory, ask Cursor Agent: "Use MCP to list allowed directories, then remember that this project uses ESLint flat config." Successful directory listing confirms Filesystem; a Memory write confirms persistence tools are wired.
How to Use MCP with Cursor
Configure MCP servers in Cursor IDE using mcp.json and Settings.