Claude MCP Setup Guide
This guide walks through connecting Claude to an MCP server. Use the local Claude Desktop configuration flow when the server runs on your machine, and use Claude's connector flow when the MCP server is remote and reachable over HTTPS.
The main decision is the transport:
| Setup type | Best for | Configuration pattern |
|---|---|---|
| Local stdio server | Filesystem tools, local scripts, private developer utilities | Add a command and args entry in claude_desktop_config.json |
| Remote MCP server | Hosted APIs, SaaS connectors, shared team integrations | Add the remote MCP URL through Claude's connector settings |
| Claude Code workflow | Developer CLI sessions and project-scoped tools | Use claude mcp add or project MCP configuration |
Prerequisites
- Claude Desktop installed and updated if you are configuring a local server.
- A working MCP server, either a local command or a remote HTTPS endpoint.
- Any required API keys or OAuth access configured outside the chat prompt.
- A low-risk read-only tool you can use for the first verification call.
Step 1: Choose Local or Remote
Use a local stdio server when Claude needs controlled access to local files or developer tools. Claude Desktop can start these servers from a JSON configuration file.
Use a remote MCP server when the server is hosted on the internet, shared by a team, or connected to a SaaS application. Remote servers should use HTTPS and should keep authentication on the server or connector side.
Step 2: Configure a Local Claude Desktop Server
Claude Desktop's local configuration file is located at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
A local stdio configuration uses a command and arguments:
{
"mcpServers": {
"my-local-server": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/username/Desktop"]
}
}
}
Only grant local filesystem access to directories you are comfortable with Claude reading or modifying.
Step 3: Configure a Remote MCP Server
For a hosted API-backed MCP server, add the remote server URL through Claude's connector settings. The URL should be the MCP endpoint provided by the server owner, not a generic website URL or a REST API base URL.
Remote servers commonly require OAuth, API keys, or another authentication flow. Complete authentication through the connector flow instead of pasting secrets into chat.
Step 4: Restart or Reconnect Claude
After changing a local config file, fully quit and restart Claude Desktop so it can load the server. For remote connectors, finish the connector setup flow and confirm the server appears in Claude's connector list.
Step 5: Verify the Connection
Start with a low-risk request:
"What tools do you have available?"
Then run one read-only tool call. If tools do not appear, check:
- The JSON config is valid.
- The command exists on your system path.
- All local paths are absolute.
- Required environment variables are available to Claude Desktop.
- The remote URL is the MCP endpoint and uses HTTPS.
- Authentication has completed successfully.
Common Issues
| Problem | Likely cause | Fix |
|---|---|---|
| Server does not appear | Claude Desktop has not restarted or the config file is invalid | Restart Claude and validate the JSON file |
spawn ENOENT | The command is not available to Claude's environment | Use an absolute path or fix PATH/env settings |
| Tools appear but calls fail | Server error, missing credentials, or invalid arguments | Check MCP logs and test the server outside Claude |
| Remote connector fails | Wrong endpoint URL, auth failure, or unsupported transport | Confirm the provider's current MCP endpoint and auth flow |
Security Checklist
- Expose the smallest set of tools Claude needs.
- Prefer read-only tools for the first connection test.
- Keep API keys out of prompts and client-visible config when possible.
- Require approval for write, delete, billing, or admin operations.
- Review MCP logs after the first successful tool call.
Official Sources
- Connect to local MCP servers - official Claude Desktop local configuration and troubleshooting workflow.
- Connect to remote MCP servers - official remote connector flow for Claude and other MCP-compatible clients.
- Claude Code MCP reference - official Claude Code commands, transports, scopes, and MCP troubleshooting behavior.
- MCP transports specification - official stdio and Streamable HTTP transport requirements.
Want to analyze your API security?
Import your OpenAPI spec and generate a Security Report automatically.
Next Steps
After Claude can see the server, review each exposed tool before using it with production data. For production deployments, combine tool scoping, credential isolation, approval workflows, and audit logging before enabling destructive operations.