Comment ajouter des MCP servers à Cursor
Cursor is an AI code editor built on VS Code. It reads MCP servers from an mcp.json file, either for one project or for every project, and lets you switch each server on or off.
Ajouter un MCP server à Cursor
- 1Open
~/.cursor/mcp.json, or.cursor/mcp.jsonin the project, and create it if it does not exist. - 2Paste the server under
mcpServers, merging with any servers already there. - 3Put API keys in the
envobject of that server. - 4Open the Customize page and check that the server's toggle is on; if it shows no tools, open Output and pick MCP Logs.
Exemple : Codebase Memory
{
"mcpServers": {
"codebase-memory-mcp": {
"command": "npx",
"args": [
"-y",
"codebase-memory-mcp"
]
}
}
}Variables and one-click installs
- Config values can use
${env:NAME},${userHome}and${workspaceFolder}, so onemcp.jsonworks on every machine. - Stdio servers can read secrets from an
envFileinstead of the config. - Servers from the Marketplace come with an "Add to Cursor" button that writes the entry for you.
- Besides tools, Cursor uses prompts, resources, roots and elicitation from servers, and supports MCP Apps.
Où Cursor enregistre les MCP servers
~/.cursor/mcp.jsonall projects.cursor/mcp.jsonone project
Vérifier le chargement: Customize page → server toggle (errors: Output → MCP Logs)
Limites et réglages
- Config supports
${env:NAME},${userHome}and${workspaceFolder}interpolation. envFileworks for stdio servers only.- Cursor supports tools, prompts, resources, roots and elicitation from MCP servers.
Quand un serveur ne fonctionne pas dans Cursor
- Open the Output panel and pick "MCP Logs" to see connection, auth and crash errors.
- Restart Cursor after editing a local server's files.
- Check the server's toggle on the Customize page; a switched-off server shows no tools.
Questions sur MCP dans Cursor
How do I add an MCP server to Cursor?
Add an entry under mcpServers in ~/.cursor/mcp.json for all projects or .cursor/mcp.json for one project, or use an "Add to Cursor" button. HostedMCP server pages give you the JSON.
Does Cursor support remote MCP servers?
Yes, over SSE and Streamable HTTP, with OAuth sign-in for servers that need it.
Can I keep secrets out of mcp.json?
Yes. Reference environment variables with ${env:NAME}, or point a stdio server at an envFile.
Why does a server show no tools?
Check that its toggle is on, then read the MCP Logs output for start-up or authentication errors.
MCP servers populaires pour Cursor
- 1
Provides a local knowledge graph that connects source code, documentation, and infrastructure to give AI agents structural context.
Configuration pour Cursor
~/.cursor/mcp.json{ "mcpServers": { "codebase-memory-mcp": { "command": "npx", "args": [ "-y", "codebase-memory-mcp" ] } } } - 2
Securely execute LLM-generated code in isolated containers or local Linux and Windows sandboxes across multiple programming languages.
Configuration pour Cursor
~/.cursor/mcp.json{ "mcpServers": { "llm-sandbox": { "command": "uvx", "args": [ "llm-sandbox" ] } } } - 3
Lets an AI client create, inspect, validate, and save editable 3D building scenes, including walls, rooms, doors, and furnishings.
Configuration pour Cursor
~/.cursor/mcp.json{ "mcpServers": { "editor": { "command": "npx", "args": [ "-y", "@pascal-app/mcp" ] } } } - 4
Lets AI agents search, run, and read results from thousands of web scraping and automation Actors on Apify Store.
Configuration pour Cursor
~/.cursor/mcp.json{ "mcpServers": { "apify-mcp-server": { "url": "https://mcp.apify.com/" } } } - 5
Provides AST-based semantic code search for local repositories using incremental re-indexing and natural language queries.
Configuration pour Cursor
~/.cursor/mcp.json{ "mcpServers": { "cocoindex-code": { "command": "uvx", "args": [ "cocoindex-code" ] } } } - 6
Lets an AI client read and change Google Ads, Reddit Ads and GA4 campaigns, with a preview shown before every change.
Configuration pour Cursor
~/.cursor/mcp.json{ "mcpServers": { "adloop": { "command": "uvx", "args": [ "adloop" ] } } } - 7
An agent meta-harness that provides Claude Code and Codex with specialized agent swarms, self-learning memory, and enterprise security guardrails.
Configuration pour Cursor
~/.cursor/mcp.json{ "mcpServers": { "claude-flow": { "command": "npx", "args": [ "-y", "claude-flow" ] } } } - 8
Enables LLMs to interact with web pages through structured accessibility snapshots using Playwright browser automation.
Configuration pour Cursor
~/.cursor/mcp.json{ "mcpServers": { "playwright-mcp": { "command": "npx", "args": [ "-y", "@playwright/mcp" ] } } } - 9
Allows an AI client to interact with Bitbucket Data Center repositories and code through the Model Context Protocol.
Configuration pour Cursor
~/.cursor/mcp.json{ "mcpServers": { "atlassian-dc-mcp": { "command": "npx", "args": [ "-y", "@atlassian-dc-mcp/bitbucket" ] } } } - 10
Lets an AI agent draw and edit draw.io diagrams on a live browser canvas that you can also edit by hand.
Configuration pour Cursor
~/.cursor/mcp.json{ "mcpServers": { "next-ai-drawio": { "command": "npx", "args": [ "-y", "@next-ai-drawio/mcp-server" ] } } } - 11
Packs a local or remote codebase into a single AI-friendly file with token counts so LLMs and coding agents can read or search it.
Configuration pour Cursor
~/.cursor/mcp.json{ "mcpServers": { "repomix": { "command": "npx", "args": [ "-y", "repomix" ] } } } - 12
Connects AI agents and IDEs to enterprise databases using prebuilt tools or a custom framework for secure, structured queries.
Configuration pour Cursor
~/.cursor/mcp.json{ "mcpServers": { "mcp-toolbox": { "command": "docker", "args": [ "run", "-i", "--rm", "us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:1.17.0" ] } } }