Prerequisites
- Claude Desktop / Cursor / VS Code installed
- Required runtime for the server you are installing (most need Node.js or Python, some require extra dependencies)
- Have API credentials ready (e.g., GitHub token) — you will need them during configuration
Claude Desktop
Graphic workflow:
- Open Claude Desktop → Settings
- Go to Developer → click Edit Config
- Add your server under the
mcpServerssection inclaude_desktop_config.json:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "your-token" }
}
}
}
Save the file and restart Claude Desktop. Your new tool will appear in the tool list on the left sidebar. Always refer to the server's README for the exact command and arguments.
Cursor
- Open the command palette (
Ctrl+Shift+P/Cmd+Shift+P) - Search and select Cursor Settings > MCP
- Click Add New MCP Server, choose the transport type (stdio or SSE), and fill in the command/arguments
VS Code
- Install the MCP Client extension (or use Copilot/extensions that ship with built-in MCP support)
- Configure
mcpServersin extension settings using the same JSON format as Claude Desktop - Reload the VS Code window for changes to take effect
UI layouts can change between client versions — always refer to official documentation for the exact steps; the command/JSON structure always follows the server's README.
Troubleshooting Common Errors
| Error | Cause | Fix |
|---|---|---|
| command not found | Node/Python runtime not installed or not in PATH | Install the runtime and restart the client |
| 401 / 403 | Invalid or expired API credentials | Regenerate the token and double-check your environment configuration |
| Connection refused | Incorrect SSE server address or the service is not running | Verify the URL + port and confirm the server is online |
| Tool not found | Configuration changes loaded because the client wasn't restarted | Restart the client application completely after saving the config |
Security Notes
- Tokens are stored only in your local config file — never commit the file to Git (remember to add
.gitignore) - Only install servers from trusted, high-star projects — unvetted servers could exfiltrate your data
- Grant high-permission servers only when absolutely necessary