How to Install MCP Servers
This guide explains how to install MCP servers across the most common AI clients in 2026: Claude Desktop, Claude Code, Cursor, and VS Code. You will learn the standard setup flow, what changes between clients, how to test the connection, and how to fix common errors.
If you are starting from scratch, read Claude Desktop MCP Setup. If you want a specific example, go to GitHub MCP Server Setup.
How MCP server installation works
Most MCP servers are installed by giving your AI client a command or a remote endpoint that it can launch or connect to. In practice, that usually means one of three models: a local stdio server started with npx, a custom executable, or a remote MCP endpoint accessed through a URL.
The client-specific part is where you register that server. Claude Desktop uses a local JSON config file, Cursor uses its MCP settings interface, and Claude Code or VS Code commonly use the claude mcp add command.
What you need before installing
An MCP-compatible client
Use Claude Desktop, Claude Code, Cursor, or a VS Code workflow that supports Claude MCP registration.
Node.js for npm-based servers
Many popular servers run through npx, so Node.js and npm need to be installed first.
Credentials when required
Some servers need tokens, API keys, or OAuth before they can access GitHub, Supabase, AWS, or other tools.
The standard installation flow
- 1
Choose the MCP server
Pick a server that matches your workflow. GitHub MCP is the best first install for most developers, while Context7 is excellent for live docs.
- 2
Install dependencies
If the server uses npx, install Node.js first. If it uses a remote endpoint, make sure you have the correct URL and any required credentials.
- 3
Register the server in your client
Add the config through Claude Desktop JSON, Cursor MCP settings, or the Claude CLI depending on the client you use.
- 4
Add environment variables
Paste API keys, access tokens, or profile values exactly as required by the server documentation.
- 5
Restart or reload the client
Many installation problems happen because users save the config but do not fully reload the client.
- 6
Run a simple test prompt
Ask Claude to do a task that clearly requires the new integration, such as listing repositories or opening a dashboard.
Install MCP servers in Claude Desktop
Best for beginners and still the most common setup path.
Claude Desktop loads MCP servers from a local config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@github/github-mcp-server"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_TOKEN"
}
}
}
}Save the file, fully restart Claude Desktop, then test the server with a prompt like “List my GitHub repositories.”
Install MCP servers in Cursor
Good for developers who want MCP directly inside the editor.
- 1. Open Cursor Settings.
- 2. Go to the MCP section.
- 3. Choose Add New MCP Server.
- 4. Paste the command or server config details.
- 5. Add any required environment variables.
- 6. Save and test the server from the MCP panel or chat interface.
Cursor usually makes setup easier through its UI, especially for command-based local servers. If the server does not appear, confirm the command path, token values, and whether Cursor needs a restart.
Install MCP servers in Claude Code
Best for terminal-first developers using Claude inside coding workflows.
Claude Code commonly uses the CLI to register MCP servers. The basic flow looks like this:
claude mcp add github -- npx -y @github/github-mcp-server
After registration, Claude Code can use the server in terminal-driven workflows. If your server needs credentials, configure them according to the server documentation before testing.
Install MCP servers in VS Code
Works best when paired with Claude Code or compatible MCP-aware tooling.
In VS Code workflows that use Claude Code, you typically install or register MCP servers through the integrated terminal rather than a standalone graphical settings page.
claude mcp add github -- npx -y @github/github-mcp-server
This makes VS Code setup very similar to Claude Code setup. The main difference is that you trigger and use the workflow inside the editor.
Best first MCP servers to install
Common installation errors
Node.js is missing
If the server uses npx and your machine does not have Node installed, the command cannot start.
Config syntax is invalid
JSON formatting errors are especially common in Claude Desktop config files.
Credentials are wrong
A typo in an API key, token, or profile name can make the server appear installed but unusable.
The wrong client flow was used
A JSON config that works in Claude Desktop is not always entered the same way in Cursor or Claude Code.
The client was not restarted
Many MCP clients need a restart or reload before newly added servers become available.
Security tips before you install
Start with official servers
Official servers from vendors like GitHub, AWS, and Supabase are usually easier to trust and maintain.
Use least-privilege tokens
Only give each MCP server the minimum scopes it needs to do its job.
Be cautious with local access
Servers that can run shell commands or edit files should be reviewed carefully before use.
Related Guides
Frequently asked questions
What is the easiest way to install an MCP server?▾
For most users, the easiest path is Claude Desktop with an npx-based server config. You install Node.js, paste the server JSON into the Claude config file, restart the app, and test the connection with a simple prompt.
Do all MCP servers use the same installation method?▾
No. Many use local stdio commands through npx, while others use remote URLs or OAuth-based flows depending on the client and the server type.
Can I install MCP servers in Cursor and VS Code too?▾
Yes. Cursor supports MCP servers through its MCP settings UI, while Claude Code and its VS Code integration support MCP registration through the claude mcp add command.
Why is my MCP server not working after installation?▾
The most common causes are invalid configuration syntax, missing Node.js, missing environment variables, permission problems, or not restarting the client after adding the server.
Which MCP server should I install first?▾
GitHub MCP Server is usually the best first install for developers because it adds immediate value through repository access, pull requests, issues, and code search. Context7 is another strong early addition because it improves coding accuracy with live docs.
Find ready-to-install MCP tools
Browse the MCPIndex directory for setup-ready tool pages with config blocks, use cases, setup steps, and category navigation.