Skip to main content
commandsSource-backedReview first Safety Privacy

Configure MCP Servers in Claude Code

Add Model Context Protocol servers to Claude Code with the claude mcp add CLI and the /mcp slash command, covering transports, scopes, and OAuth for remote servers.

by JSONbored·added 2025-10-25·
HarnessClaude Code
Invocation:claude mcp add --transport http <name> <url>
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://code.claude.com/docs/en/mcp, https://github.com/JSONbored/awesome-claude/blob/main/content/commands/mcp-setup.mdx
Safety notes
MCP servers can execute commands and call external APIs on your behalf. stdio servers run a local subprocess (the command after `--`); only add servers from sources you trust., Project-scoped servers from `.mcp.json` require explicit in-session approval before Claude Code will use them; review what each server does before approving., Remote servers may request OAuth scopes during the `/mcp` login flow — grant only the access you intend. Use the `/mcp` menu's Clear authentication to revoke access.
Privacy notes
Local- and user-scoped server configs are written to `~/.claude.json`; project-scoped configs go to `.mcp.json` in the repo. Do not hardcode tokens in `.mcp.json` — reference them via `${VAR}` environment-variable expansion so secrets stay out of version control., OAuth credentials for remote servers are stored by Claude Code after the `/mcp` login flow; connected MCP servers can read and act on the systems they integrate with (issue trackers, databases, monitoring), so they may receive project data you ask Claude to work with.
Author
JSONbored
Claim status
unclaimed
Last verified
2025-10-25

Decision playbook

Review trust signals before you adopt

Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.

Compare context
Selected

0

Current score

78

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Complete

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as source-backed.

    Done
  • Metadata reviewed

    Registry metadata indicates a reviewed listing.

    Done

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Needs review

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    No package verification flag provided.

    Pending
  • Checksum metadata

    No checksum provided for downloaded artifact.

    Pending

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

Copy & paste

Copy-ready — paste the snippet to get started.

Install command

Not provided

Config snippet

Not provided

Copy snippet

Provided

Prerequisites

None

Platforms

1 listed

Difficulty

100/100

Adoption plan

Balanced adoption plan

Current risk score 16/100. Use staged verification before broader rollout.

Risk 16

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    Listing has review metadata.

    Done
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    No package verification/checksum metadata.

    Pending

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Required evidence gates are covered (5/6 signals complete).

Risk 15

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Present

Review metadata is present.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Missing

Package integrity metadata is missing.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required evidence gates are covered for this preset.

Decision timeline

Decision timeline · balanced

5/6 steps complete with no blocking gaps for this preset.

Risk 14

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is available.

Done

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is missing.

Pending

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

No required blockers for this timeline preset.

Safety & privacy surface

Safety & privacy surface

3 safety and 2 privacy notes across 2 risk areas. Review closely: credentials & tokens.

2 areas
  • SafetyExecution & processesMCP servers can execute commands and call external APIs on your behalf. stdio servers run a local subprocess (the command after `--`); only add servers from sources you trust.
  • SafetyCredentials & tokensProject-scoped servers from `.mcp.json` require explicit in-session approval before Claude Code will use them; review what each server does before approving.
  • SafetyCredentials & tokensRemote servers may request OAuth scopes during the `/mcp` login flow — grant only the access you intend. Use the `/mcp` menu's Clear authentication to revoke access.
  • PrivacyCredentials & tokensLocal- and user-scoped server configs are written to `~/.claude.json`; project-scoped configs go to `.mcp.json` in the repo. Do not hardcode tokens in `.mcp.json` — reference them via `${VAR}` environment-variable expansion so secrets stay out of version control.
  • PrivacyCredentials & tokensOAuth credentials for remote servers are stored by Claude Code after the `/mcp` login flow; connected MCP servers can read and act on the systems they integrate with (issue trackers, databases, monitoring), so they may receive project data you ask Claude to work with.

Safety notes

  • MCP servers can execute commands and call external APIs on your behalf. stdio servers run a local subprocess (the command after `--`); only add servers from sources you trust.
  • Project-scoped servers from `.mcp.json` require explicit in-session approval before Claude Code will use them; review what each server does before approving.
  • Remote servers may request OAuth scopes during the `/mcp` login flow — grant only the access you intend. Use the `/mcp` menu's Clear authentication to revoke access.

Privacy notes

  • Local- and user-scoped server configs are written to `~/.claude.json`; project-scoped configs go to `.mcp.json` in the repo. Do not hardcode tokens in `.mcp.json` — reference them via `${VAR}` environment-variable expansion so secrets stay out of version control.
  • OAuth credentials for remote servers are stored by Claude Code after the `/mcp` login flow; connected MCP servers can read and act on the systems they integrate with (issue trackers, databases, monitoring), so they may receive project data you ask Claude to work with.

Schema details

Install type
copy
Reading time
8 min
Difficulty score
100
Troubleshooting
Yes
Breaking changes
No
Skill and platform metadata
Retrieval sources
https://code.claude.com/docs/en/mcphttps://docs.claude.com/en/docs/claude-code/mcphttps://docs.claude.com/en/docs/claude-code/slash-commandshttps://modelcontextprotocol.io/introduction
Runtime and command metadata
Command syntax
claude mcp add --transport http <name> <url>
Full copyable content
claude mcp add --transport http <name> <url>

About this resource

Claude Code connects to external tools, databases, and APIs through the Model Context Protocol (MCP), an open standard for AI-tool integrations. You configure servers two ways: the claude mcp CLI family (run in your terminal) for adding and managing servers, and the in-session /mcp slash command for viewing connected servers and completing OAuth authentication.

Note: /mcp is a built-in slash command (it lists servers, shows tool counts, and runs the OAuth login flow). The claude mcp ... commands are run in your terminal, not inside a Claude Code prompt.

Add a server with claude mcp add

The claude mcp add command supports three transports via --transport: http, sse, and stdio.

Remote HTTP server:

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

# Example
claude mcp add --transport http notion https://mcp.notion.com/mcp

Remote HTTP server with a custom header (for static-token auth):

claude mcp add --transport http secure-api https://api.example.com/mcp \
  --header "Authorization: Bearer your-token"

Remote SSE server:

claude mcp add --transport sse asana https://mcp.asana.com/sse

Local stdio server. For stdio servers, everything after -- is the command Claude runs to launch the server:

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

# Example with an environment variable
claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable \
  -- npx -y airtable-mcp-server

The -- (double dash) separates Claude's own options (--transport, --env, --scope) from the command and args passed to the server untouched. --env accepts multiple KEY=value pairs; place at least one other option between --env and the server name so the CLI does not read the name as another env pair.

Add a server from JSON

claude mcp add-json takes a full server definition, which is useful for copying a config straight from a server's docs:

claude mcp add-json weather-api \
  '{"type":"http","url":"https://api.weather.com/mcp","headers":{"Authorization":"Bearer token"}}'

claude mcp add-json local-weather \
  '{"type":"stdio","command":"/path/to/weather-cli","args":["--api-key","abc123"],"env":{"CACHE_DIR":"/tmp"}}'

Choose a scope with --scope

The --scope flag controls where the configuration is stored and who can see it. Valid values are local, project, and user:

Scope Loads in Shared with team Stored in
local (default) Current project only No ~/.claude.json
project Current project only Yes, via version control .mcp.json in project root
user All your projects No ~/.claude.json
# Local (default) — private to you in this project
claude mcp add --transport http stripe https://mcp.stripe.com

# Project — shared with the team via .mcp.json
claude mcp add --transport http paypal --scope project https://mcp.paypal.com/mcp

# User — available across all your projects
claude mcp add --transport http hubspot --scope user https://mcp.hubspot.com/anthropic

When the same server name is defined at multiple scopes, precedence is local, then project, then user (the highest-precedence entry wins; fields are not merged).

The .mcp.json project file

Adding a server with --scope project creates or updates .mcp.json at the project root. Commit it so teammates inherit the same servers. The format is:

{
  "mcpServers": {
    "paypal": {
      "type": "http",
      "url": "https://mcp.paypal.com/mcp"
    },
    "shared-stdio-server": {
      "command": "/path/to/server",
      "args": [],
      "env": {}
    }
  }
}

For security, Claude Code prompts for approval before using project-scoped servers from .mcp.json. Pending servers show up as ⏸ Pending approval in claude mcp list; review and approve them by running claude interactively. To reset approvals, run claude mcp reset-project-choices.

Environment variable expansion

.mcp.json supports ${VAR} and ${VAR:-default} expansion in command, args, env, url, and headers. This lets a committed config reference machine-specific paths and secrets without hardcoding them:

{
  "mcpServers": {
    "api-server": {
      "type": "http",
      "url": "${API_BASE_URL:-https://api.example.com}/mcp",
      "headers": {
        "Authorization": "Bearer ${API_KEY}"
      }
    }
  }
}

If a referenced variable is unset and has no default, Claude Code fails to parse the config. Keep secrets out of version control by referencing environment variables rather than pasting tokens into .mcp.json.

Manage servers

# List configured servers
claude mcp list

# Show details for one server
claude mcp get github

# Remove a server
claude mcp remove github

Authenticate remote servers with /mcp

Run /mcp inside a Claude Code session to see connected servers, the tool count next to each one, and to authenticate. Claude Code flags a remote server as needing authentication when it responds with 401 Unauthorized or 403 Forbidden; you then complete the OAuth 2.0 browser login from the /mcp menu.

# 1. Add the server
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
# 2. In a Claude Code session, open the MCP panel and follow the OAuth flow
/mcp
# 3. Use the server
What are the most common errors in the last 24 hours?

Use the /mcp menu's "Clear authentication" option to revoke stored OAuth access. You can verify OAuth credentials are configured for a server with claude mcp get <name>.

When to use which

  • Use claude mcp add --transport http|sse <url> for remote/hosted servers (these support OAuth).
  • Use claude mcp add --transport stdio <name> -- <command> for local servers you launch as a subprocess.
  • Use --scope project and commit .mcp.json when the whole team should get the same servers; use the default local scope (or --scope user) for personal setups.
  • Use /mcp to authenticate remote servers and to check that a server is connected and exposing tools.

For a step-by-step first-server walkthrough, see the official MCP documentation linked from this page.

Source citations

Add this badge to your README

Show that Configure MCP Servers in Claude Code is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/commands/mcp-setup.svg)](https://heyclau.de/entry/commands/mcp-setup)

How it compares

Configure MCP Servers in Claude Code side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

2 trust signals differ across this comparison (Source provenance, Submitter).

Field

Add Model Context Protocol servers to Claude Code with the claude mcp add CLI and the /mcp slash command, covering transports, scopes, and OAuth for remote servers.

Open dossier

A source-backed Model Context Protocol starter collection for SaaS builders: connect product code, database state, payments, deployment telemetry, issue tracking, and production errors while keeping MCP authorization and tool boundaries explicit.

Open dossier

Expert MCP remote server trust review capability pack for auditing OAuth flows, transport security, tool permissions, data exfiltration risk, and vendor scope before connecting Claude Code to third-party MCP servers.

Open dossier

Master MCP server development from scratch. Create custom Claude Desktop integrations with TypeScript/Python in 60 minutes using production-ready patterns.

Open dossier
Next steps
Trust
Review statusReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewed
Package trustPackage not verifiedPackage not verifiedPackage not verifiedPackage not verified
Source provenanceDiffersSource-backedSource-backedSubmission linkedSource submissionSource-backed
SubmitterDiffersMkDev11kiannidev
Install riskReview firstReview firstReview firstReview first
Notes Safety Privacy Safety Privacy Safety Privacy Safety Privacy
Brand
Categorycommandscollectionsskillsguides
Sourcesource-backedsource-backedsource-backedsource-backed
AuthorJSONboredMkDev11kiannidevJSONbored
Added2025-10-252026-06-042026-06-142025-10-27
Platforms
Claude Code
Claude Code
Claude CodeCodexWindsurfGeminiCursorCLI
Claude Code
Source repo
Safety notesMCP servers can execute commands and call external APIs on your behalf. stdio servers run a local subprocess (the command after `--`); only add servers from sources you trust. Project-scoped servers from `.mcp.json` require explicit in-session approval before Claude Code will use them; review what each server does before approving. Remote servers may request OAuth scopes during the `/mcp` login flow — grant only the access you intend. Use the `/mcp` menu's Clear authentication to revoke access.This collection is an index; it runs nothing itself, but several linked MCP servers can read or write production SaaS data. Install read-only or sandbox-scoped credentials first, then expand permissions only after testing approval boundaries. Review each linked entry's own safety notes before enabling write, billing, deployment, or issue-tracker actions.Remote MCP servers run outside Anthropic control; Claude Code MCP integration does not guarantee vendor security or data isolation. OAuth tokens issued to an MCP server may grant persistent access to third-party accounts until revoked in the vendor admin console. Tools that read, write, delete, or execute on external systems can cause irreversible production changes when invoked by the model. SSE and streamable HTTP transports must use TLS; do not approve cleartext remote endpoints on untrusted networks. This skill recommends scoping and approval steps; it must not add MCP servers or approve OAuth consent without explicit user authorization.Building and connecting an MCP server runs a local process (or connects to a remote one) that executes tools with your user privileges; only connect servers you trust and review the command and URL first.
Privacy notesLocal- and user-scoped server configs are written to `~/.claude.json`; project-scoped configs go to `.mcp.json` in the repo. Do not hardcode tokens in `.mcp.json` — reference them via `${VAR}` environment-variable expansion so secrets stay out of version control. OAuth credentials for remote servers are stored by Claude Code after the `/mcp` login flow; connected MCP servers can read and act on the systems they integrate with (issue trackers, databases, monitoring), so they may receive project data you ask Claude to work with.The collection stores no data itself; connected MCP servers may expose repository, customer, billing, deployment, and incident metadata. Private SaaS records follow the credentials configured for each MCP server. Avoid sharing transcripts that include MCP tool results from customer, billing, or production systems.MCP tool results can contain customer names, ticket contents, database rows, repository secrets, and internal URLs that should not be pasted into public issues. OAuth consent screens and server logs may expose account emails, organization identifiers, and access tokens if shared without redaction. Remote server vendors may retain prompts, tool arguments, and responses under their own privacy policies outside Anthropic data handling. Public trust-review summaries should describe risk categories and mitigations, not full tool schemas or live OAuth tokens.Connecting servers can pass secrets via --env and OAuth tokens stored in Claude Code's local config; the server process can access whatever data and credentials you grant it.
Prerequisites— none listed
  • Claude Code with MCP support enabled and a project where external tools are approved by the team.
  • Least-privilege tokens for each SaaS service before connecting write-capable MCP servers.
  • A written list of which environments each MCP server may read or modify.
  • The remote MCP server URL, vendor documentation, and intended Claude Code or Desktop use case.
  • Access to the MCP server manifest, tool list, OAuth client registration details, and transport configuration.
  • Security or platform stakeholders available to review third-party data access before production rollout.
  • A concrete integration goal such as issue tracking, CRM lookup, database queries, or deployment automation.
— none listed
Install
Config
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed
Open 4 picks in the interactive comparison tool

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.