How to install an MCP server
To install an MCP server, add one entry to your AI client's config: a command that starts the server (for example npx -y @playwright/mcp@latest) or the URL of a remote server. Then restart the client. Claude Code does this in one terminal command; Claude Desktop, Cursor and VS Code read a JSON file.
- Pick a serverOpen its listing on MCP Harbor and its README for the package name or server URL.
- Add it to your clientOne terminal command in Claude Code, or one JSON entry for Claude Desktop, Cursor and VS Code.
- Restart and checkRestart the client and confirm the server and its tools are listed before you use them.
npx need Node.js. Servers started with uvx need uv. If a server needs an API key, put it in the server's env block, not in a file you commit.The examples below use Microsoft's Playwright MCP server, which lets an agent control a browser. Swap in the package name from any listing on MCP Harbor.
Claude Code
Run this in a terminal (not inside a Claude session). Add --scope project to write the server to .mcp.json so everyone who clones the repo gets it.
claude mcp add playwright -- npx -y @playwright/mcp@latest
# remote server over HTTP
claude mcp add --transport http notion https://mcp.notion.com/mcp
# check what is connected
claude mcp list Claude Desktop
Open Settings, then Developer, then Edit Config, and add the server to claude_desktop_config.json. Restart Claude Desktop afterwards.
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["-y", "@playwright/mcp@latest"]
}
}
} Cursor
Use ~/.cursor/mcp.json for all projects or .cursor/mcp.json for one repository. Remote servers use url instead of command.
{
"mcpServers": {
"playwright": { "command": "npx", "args": ["-y", "@playwright/mcp@latest"] },
"notion": { "url": "https://mcp.notion.com/mcp" }
}
} VS Code (GitHub Copilot agent mode)
Create .vscode/mcp.json in your workspace, or run MCP: Add Server from the Command Palette. Note that VS Code uses a servers key, not mcpServers.
{
"servers": {
"playwright": { "type": "stdio", "command": "npx", "args": ["-y", "@playwright/mcp@latest"] }
}
} OpenAI Codex CLI
Codex reads MCP servers from ~/.codex/config.toml.
[mcp_servers.playwright]
command = "npx"
args = ["-y", "@playwright/mcp@latest"] Python servers (uvx)
Many servers are published to PyPI. They run with uvx <package> in place of npx -y <package>, using the same config shape in every client above. You need uv installed.
Find servers for your client
- MCP servers for Claude Code (2591)
- MCP servers for Cursor (1941)
- MCP servers for OpenAI Codex (1348)
- MCP servers for Claude Desktop (512)
- MCP servers for VS Code (326)
- MCP servers for Windsurf (369)
- MCP servers for Gemini (708)
- MCP servers for Ollama and local LLMs (239)
- All categories
- Trending this week
Frequently asked questions
Where is the MCP config file for Claude Desktop?
Open Settings, then Developer, then Edit Config. That opens claude_desktop_config.json, which lives in ~/Library/Application Support/Claude/ on macOS and in %APPDATA%\Claude\ on Windows. Add your server under mcpServers, save the file and restart Claude Desktop so it starts the server.
Where does Cursor keep its MCP servers?
Cursor reads ~/.cursor/mcp.json for servers available in every project and .cursor/mcp.json inside a repository for servers that belong to that project. Both files use the same mcpServers object as Claude Desktop, so a config block written for one usually works in the other without changes.
What is the difference between a local and a remote MCP server?
A local server runs on your machine as a child process and talks over stdio; you start it with a command such as npx or uvx. A remote server runs on someone else's infrastructure and you connect to a URL over Streamable HTTP, usually signing in with OAuth. Remote servers need no install but send your requests to that provider.
Is it safe to install MCP servers?
Treat an MCP server like any dependency that can run code. Prefer servers from the vendor of the service or from maintainers with an active repository, read which tools it exposes, give it the narrowest API token that works, and keep secrets in environment variables rather than in a config file you commit to Git.
Why does my MCP server not show up?
Most failures come from the command not being on the PATH the client sees, a JSON syntax error, or a missing environment variable. Run the same command in a terminal first, check the client's MCP log (Claude Code shows status with /mcp), then fully restart the client after editing its config file.