What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

Add an MCP server to Claude Code with claude mcp add, choose the server’s transport and configuration scope, then verify it with claude mcp list or claude mcp get. Local servers normally use stdio; hosted servers use HTTP or SSE. For an OAuth-protected service, open /mcp inside Claude Code after adding it.

What MCP adds to Claude Code

Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to large language models. In Claude Code, an MCP server exposes outside tools or data—such as a project system, database, documentation service, or browser utility—so Claude can use them during a session.

There are four decisions to make:

  • Where it runs: a local process on your computer or a remote service.
  • Transport: stdio for local processes, or HTTP/SSE for remote services.
  • Scope: local, project, or user configuration.
  • Credentials: environment variables, request headers, or OAuth.

The examples below use the current Claude Code MCP command forms documented by Anthropic. Command-line behavior can change, so check the live Claude Code setup guide if a flag behaves differently in your installed version.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Before you add a server

  • Install and sign in to Claude Code, and run commands from the project directory when you want project-specific configuration.
  • Install any runtime required by the server, such as Node.js for an npx-based server.
  • Have the server’s command, package name or URL, and required credentials ready.
  • Decide whether the configuration contains personal secrets or should be shared with teammates.

Never commit API keys directly to a project’s .mcp.json. Prefer environment-variable expansion or a secret manager.

Add a local stdio server

A stdio server is launched by Claude Code as a local process. The documented basic form is:

claude mcp add <name> <command> [args...]

For example, to run a package through npx while supplying an environment variable:

claude mcp add airtable --env AIRTABLE_API_KEY=YOUR_KEY -- npx -y airtable-mcp-server

The -- separator matters: options before it belong to the Claude CLI, while the command and arguments after it belong to the MCP server. Without the separator, Claude Code may interpret a server argument as its own option.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the scope explicitly

Add a scope flag when you do not want the default behavior:

claude mcp add --scope local my-server -- npx -y some-mcp-package
claude mcp add --scope project my-server -- npx -y some-mcp-package
claude mcp add --scope user my-server -- npx -y some-mcp-package
  • local: private to you and the current project. It is useful for experiments and credentials that should not be shared.
  • project: writes shared configuration to the project-root .mcp.json. Claude Code asks for approval before using project-scoped servers from that file.
  • user: available to you across projects, but not automatically shared with other users.

If identically named servers exist at several scopes, precedence is local, then project, then user. A local definition therefore overrides a project definition with the same name.

Windows and npx

On native Windows, a local npx server may need the cmd /c wrapper:

claude mcp add my-server -- cmd /c npx -y @some/package

Add a remote SSE server

For a service that exposes Server-Sent Events, use:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
claude mcp add --transport sse <name> <url>

When the service requires a request header, pass the header option supported by the Claude CLI. For example, an API-key header can be supplied in the command shown by the service’s documentation. Keep secrets out of shell history where possible; use an environment-variable expansion or your operating system’s secret facilities if available.

Add a remote HTTP server

For a streamable HTTP endpoint, use:

claude mcp add --transport http <name> <url>

A bearer-token setup follows the same pattern, with an authorization header configured for the server. Use the transport the provider documents; an SSE URL is not automatically interchangeable with an HTTP endpoint.

OAuth-protected services

First add the remote server. Then type /mcp in Claude Code and select the server to complete its OAuth 2.0 login flow. The documented OAuth flow works with both HTTP and SSE transports. The browser authorization step is separate from adding the server, so a successful claude mcp add command does not by itself prove that authentication is complete.

Use JSON configuration for repeatable setups

When a provider gives you a JSON definition—or when you need several options in one operation—use:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
claude mcp add-json <name> '<json>'

Claude Code also supports loading server definitions from JSON files or strings with --mcp-config. This is useful in automation and for keeping a reviewed configuration separate from shell commands.

Environment-variable expansion

In .mcp.json fields such as commands, arguments, environment values, URLs, and headers, the documented forms are ${VAR} and ${VAR:-default}. A required variable with no value and no default causes parsing to fail. Treat a default as appropriate only for non-sensitive values; do not place a real secret in a committed default.

Verify, inspect, and remove servers

After adding a server, verify the configuration before asking Claude to use its tools:

claude mcp list
claude mcp get <name>

list shows configured servers; get displays the selected definition and helps catch a misspelled command, URL, transport, or scope. In Claude Code, /mcp is also the place to inspect remote connections and start OAuth.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To remove a definition:

claude mcp remove <name>

Removing a server from one scope does not remove a same-named definition stored at another scope, so check the list after cleanup.

A practical setup sequence

  1. Identify the provider’s transport. Use stdio only when you have a local executable or package; use HTTP or SSE for a hosted endpoint.
  2. Choose the scope. Use local for private experiments, project for a team’s reviewed .mcp.json, and user for a personal server reused across projects.
  3. Prepare credentials. Set environment variables for local commands, configure documented headers for remote calls, or plan to complete OAuth through /mcp.
  4. Add the server. Put Claude options before -- and server arguments after it.
  5. Inspect it. Run claude mcp get <name> and confirm the transport, URL or command, and scope.
  6. Connect and test one operation. For OAuth, complete the login in /mcp; then ask Claude to perform a small, read-only action first.
  7. Record the team-safe configuration. If the server is project-scoped, review .mcp.json and document which environment variables each teammate must provide.

Troubleshooting common failures

The command is rejected or the package receives Claude’s flags

Cause: the separator is missing or in the wrong position. Fix: put Claude options first, then --, then the complete server command and its arguments.

The server appears in the list but has no usable tools

Cause: the process may exit during startup, the package may be missing, or a required environment variable may be unset. Fix: run the command independently, confirm the runtime is installed, check the variable name, and inspect the definition with claude mcp get.

A remote server will not connect

Cause: the transport does not match the provider endpoint, the URL is wrong, or a required header is absent. Fix: compare the provider’s documented HTTP/SSE endpoint and header names with the configured values. Do not substitute SSE for HTTP without provider support.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

OAuth login never completes

Cause: the server was added but the authorization step was skipped, or the provider rejected the redirect. Fix: open /mcp, select the server, complete the browser flow, and retry. If the provider reports a redirect or consent error, follow that provider’s account and redirect requirements.

A project server is not used

Cause: Claude Code requires approval before using project-scoped servers from .mcp.json, or a same-named local server is taking precedence. Fix: approve the project server when prompted, then check all scopes with claude mcp list and remove or rename the conflicting definition.

Startup or output limits are too low

Claude Code documents MCP_TIMEOUT for changing the startup timeout and MAX_MCP_OUTPUT_TOKENS for changing the warning threshold for tool output. Set them in the environment used to launch Claude Code, then restart it. Use the smallest values that accommodate your server; larger output can consume context quickly.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Security and reliability practices

  • Use project scope only for configurations the team is prepared to review. A shared file can expose endpoint names and operational assumptions even when secrets are supplied separately.
  • Give servers the least privilege supported by their provider. Start with read-only actions and add write access only when needed.
  • Pin package versions where reproducibility matters instead of always resolving an unpinned latest package.
  • Keep local and remote server names descriptive. Names such as docs-readonly or linear-team make approval and troubleshooting easier.
  • Test startup outside Claude Code when diagnosing a local process. This separates a broken server from a Claude configuration error.
  • For remote services, expect authentication, network policy, and provider-side availability to affect a connection even when the Claude command is valid.

Or skip the browser setup

If your MCP workflow needs website images or PDFs, ScreenshotNeo provides a website screenshot API and MCP server. It accepts cookies and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing result in X-Page-Verdict and X-Billed headers. Its MCP tools are take_screenshot, get_page_info, and capture_pdf, usable by Claude, Cursor, and other MCP clients.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

One request returns an image or PDF:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

See the ScreenshotNeo API documentation for all options, including full-page and element captures, device and retina settings, PDF page controls, custom CSS and JavaScript, waiting and blocking rules, headers and cookies, geolocation, caching, signed links, asynchronous webhooks, bulk capture, and usage reporting. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.

Frequently Asked Questions

Can one MCP server be available in every project?

Yes. Add it with user scope so it is available across your projects while remaining in your user configuration.

What happens when local and project scopes use the same server name?

Claude Code gives precedence to local, then project, then user scope.

Do I need OAuth for every remote MCP server?

No. OAuth is needed only when the provider protects its HTTP or SSE server with OAuth; other services may use headers or another documented credential method.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can I import Claude Desktop servers?

Claude Code provides claude mcp add-from-claude-desktop; the documented import feature is limited to macOS and WSL.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.