MCP.so
Sign In
Back to blog

How to Set Up an MCP Server: Install, Configure and Verify

Oct 15, 2026MCP.so TeamMCP.so Team

How to set up an MCP server in Claude Code, Cursor, VS Code or Claude Desktop: find one, check trust, install, add API keys safely and verify it works.

To set up an MCP server, find one for the tool you want to connect and check that it comes from a trustworthy source. Then add it to your AI client: a URL for a remote server, or a launch command such as npx -y package or uvx package for a local one. Supply its API key through an environment variable or OAuth, restart or reload the client, and confirm that the server's tools show up.

This guide is for using an existing server. If you want to write your own, see build an MCP server. The steps are the same in every client, and only the config location changes.

Step 1: Find the right server

Search the MCP server directory or browse by category. Each listing shows the install command, the transport and the environment variables it needs. For popular services, look for the vendor's official server first: GitHub, Notion, Sentry and many others publish their own.

Then decide which kind you need:

Remote serverLocal server
You addA URL, e.g. https://mcp.example.com/mcpA command, e.g. npx -y some-mcp-server
Runs onThe provider's infrastructureYour machine
Sign-inUsually OAuth in the browserUsually an API key in env
Needs installedNothingNode.js (npx), uv (uvx) or Docker
Best forSaaS tools (GitHub, Notion, Linear)Files, local apps, databases on your network

Not sure which you have? The remote MCP servers guide explains the difference in detail.

Step 2: Check that you can trust it

An MCP server runs with your credentials, and a local one runs with your user permissions. Spend two minutes on this before you install anything:

  • Who publishes it? Prefer the vendor's official server, or a well-known maintainer with a public repo.
  • Is it maintained? Look for recent commits, issues that get answered, and a README that lists every tool.
  • What can it do? Read the tool list. A "read Jira tickets" server that can also delete projects needs a read-only token.
  • Least-privilege credentials. Create a dedicated token with the narrowest scopes. For GitHub, that means a fine-grained PAT limited to specific repositories.
  • Pin versions for local servers in shared configs, e.g. npx -y package@1.4.2, so a malicious update can't run automatically.

The full checklist is in MCP security best practices. If you want to know about cost, see are MCP servers free.

Step 3: Install the prerequisites

Remote servers need nothing. Local servers need the runtime their command uses:

  • npx ... needs Node.js. Check with node -v.
  • uvx ... needs uv. Check with uvx --version.
  • docker run ... needs Docker running. You can also manage containers centrally with the Docker MCP Gateway.

Clients often start servers with a minimal PATH. If a server fails with "command not found", replace npx or uvx in the config with its absolute path from which npx or which uvx.

Step 4: Add it to your client, with its keys

Below is the same pattern in the four most common clients: a remote server with a token header, and a local server with an API key in env.

Claude Code

# Remote server, token in a header
claude mcp add --transport http github https://api.githubcopilot.com/mcp/ \
  --header "Authorization: Bearer YOUR_GITHUB_PAT"

# Local server, key in the environment
claude mcp add --transport stdio --env AIRTABLE_API_KEY=YOUR_KEY airtable \
  -- npx -y airtable-mcp-server

Claude Code's own flags go before --, and the server's launch command goes after it. For servers that use OAuth, add the URL without a header and sign in from /mcp. Scopes, .mcp.json sharing and $ variable expansion are covered in the Claude Code MCP guide.

Cursor

Edit .cursor/mcp.json in a project, or ~/.cursor/mcp.json to make it global. Cursor expands ${env:NAME}, so the key never sits in the file:

{
  "mcpServers": {
    "airtable": {
      "command": "npx",
      "args": ["-y", "airtable-mcp-server"],
      "env": { "AIRTABLE_API_KEY": "${env:AIRTABLE_API_KEY}" }
    },
    "remote-example": {
      "url": "https://mcp.example.com/mcp",
      "headers": { "Authorization": "Bearer ${env:EXAMPLE_TOKEN}" }
    }
  }
}

More in the Cursor MCP setup guide.

VS Code

.vscode/mcp.json uses a servers key, and each entry needs a type. An inputs entry with password: true prompts for the key the first time the server starts and hides it as you type:

{
  "inputs": [
    {
      "type": "promptString",
      "id": "airtable-key",
      "description": "Airtable API key",
      "password": true
    }
  ],
  "servers": {
    "airtable": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "airtable-mcp-server"],
      "env": { "AIRTABLE_API_KEY": "${input:airtable-key}" }
    }
  }
}

For a remote server, use "type": "http" with a url. VS Code tries Streamable HTTP first and falls back to SSE. See the VS Code MCP guide.

Claude Desktop, ChatGPT and others

Claude Desktop reads claude_desktop_config.json (on macOS it's in ~/Library/Application Support/Claude/) with the same mcpServers shape as Cursor. Fully quit and reopen the app after editing. ChatGPT only accepts remote servers. Step-by-step guides: Claude Desktop, ChatGPT, Codex, Ollama. For other apps, see MCP clients.

Step 5: Verify it works

  1. Check the status in the client. In Claude Code, run claude mcp list in the shell or /mcp in a session. In VS Code, run MCP: List Servers. In Cursor, open the MCP settings and look for a green dot and the tool count.
  2. Ask a question that needs the server, e.g. "List my open GitHub issues in repo X." Approve the tool call when the client asks.
  3. If it still fails, test outside the client. For a local server, run the launch command in a terminal. It should start and wait silently. An immediate crash shows the real error. For any server, the MCP Inspector connects directly:
npx @modelcontextprotocol/inspector --cli npx -y airtable-mcp-server --method tools/list

Troubleshooting

SymptomLikely causeFix
"command not found" / ENOENTRuntime not on the client's PATHInstall Node/uv, or use absolute paths
Server listed, zero toolsMissing or wrong API keyCheck the env names against the README
401 Unauthorized on a remote URLToken missing, expired or wrong scopeRe-run the OAuth sign-in, or regenerate the token
Connects, then drops immediatelyA local server prints to stdoutUpdate the server, or report it to the maintainer
Edits have no effectClient still uses the old configReload the window or fully restart the app
Old URL ending in /sseLegacy transportUse the server's /mcp endpoint if it has one (why)

Keep your setup tidy

A few habits keep a growing list of servers manageable:

  • Load only what you use. Every connected server adds its tool definitions to the model's context. Disable servers you don't need for the current project. MCP tool discovery explains why this matters.
  • Pick the right scope. Personal tools go in your user-level config. Servers your team needs go in the project file you commit, with secrets read from environment variables, never written into the file.
  • Review now and then. Remove servers you no longer use, rotate their tokens, and update pinned versions on purpose instead of letting them drift.

Next steps

Pick your next server from the MCP server directory. If you're not sure where to start, our best MCP servers list covers the ones most worth installing first, such as Playwright for browser automation and Context7 for up-to-date library docs.

Frequently asked questions

How do I set up an MCP server?

Find a server in a directory such as MCP.so, check that the publisher is trustworthy, then add it to your AI client as a URL for a remote server or a launch command like npx or uvx for a local one. Provide its API key through an environment variable or OAuth, restart the client and confirm its tools appear.

Where do I put the MCP server config file?

It depends on the client. Cursor uses .cursor/mcp.json in a project or ~/.cursor/mcp.json globally, VS Code uses .vscode/mcp.json, Claude Desktop uses claude_desktop_config.json, and Claude Code stores servers through the claude mcp add command or a shared .mcp.json file.

Do I need to install anything to use an MCP server?

Remote servers need nothing installed, only a URL and usually an OAuth sign-in. Local servers need the runtime their command uses: Node.js for npx, uv for uvx, or Docker for container-based servers.

Why does my MCP server show no tools?

The most common causes are a missing or wrong API key, a runtime that is not on the client's PATH, or a client still running its old config. Run the launch command in a terminal or connect with the MCP Inspector to see the real error, then reload the client.