> ## Documentation Index
> Fetch the complete documentation index at: https://cisco-ea52c096.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP integrations

> Connect Claude Code to external tools and services using the Model Context Protocol. Add, manage, and troubleshoot MCP servers.

The Model Context Protocol (MCP) is an open standard that lets Claude Code connect to external tools and services — databases, APIs, internal systems, and more. When you connect an MCP server, Claude gains new tools it can invoke during a session.

## What MCP adds

Without MCP, Claude can only use built-in tools like file reads, shell commands, and web fetch. With an MCP server connected, Claude can also call tools provided by that server — for example:

* Querying a database with natural language
* Creating or updating records in a project management tool
* Fetching data from a private API that requires authentication
* Running company-specific workflows

MCP servers expose their tools to Claude, and Claude calls them the same way it calls any other tool — with your permission.

## `/mcp` — manage connections

Run `/mcp` to open the MCP server management panel. From here you can see connected servers, their status, and enable or disable individual servers.

```text theme={null}
> /mcp
```

You can also enable or disable servers directly:

```bash theme={null}
# Enable a specific server
/mcp enable my-server

# Disable a specific server
/mcp disable my-server

# Enable all servers
/mcp enable

# Reconnect a server
/mcp reconnect my-server
```

## Adding an MCP server

Use the `claude mcp add` CLI subcommand to register a new server. The command supports three transport types: **stdio** (subprocess), **HTTP**, and **SSE** (Server-Sent Events).

### Stdio server (subprocess)

```bash theme={null}
# Add a server that runs as a local subprocess
claude mcp add my-server -- npx my-mcp-server

# With environment variables
claude mcp add -e API_KEY=your_key_here my-server -- npx my-mcp-server

# With additional subprocess flags
claude mcp add my-server -- my-command --some-flag arg1
```

### HTTP server

```bash theme={null}
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
```

### SSE server

```bash theme={null}
claude mcp add --transport sse my-server https://example.com/mcp

# With a custom header (e.g. for API key authentication)
claude mcp add --transport sse corridor https://app.corridor.dev/api/mcp \
  --header "Authorization: Bearer your_token_here"
```

### Configuration scope

By default, servers are added to the `local` scope (your current project directory). Use `--scope` to change this:

| Scope | Where the config is saved | When to use |
| - | - | - |
| `local` | Current project directory | Project-specific servers |
| `user` | Your home directory | Servers you want in every project |
| `project` | Shared project config | Servers the whole team should use |

```bash theme={null}
# Add a server to your user-wide config
claude mcp add --scope user my-server -- npx my-mcp-server
```

## Config file format

MCP server configurations are stored in a JSON file. The structure looks like this:

<CodeGroup>
  ```json stdio server theme={null}
  {
    "mcpServers": {
      "my-server": {
        "type": "stdio",
        "command": "npx",
        "args": ["my-mcp-server"],
        "env": {
          "API_KEY": "your_key_here"
        }
      }
    }
  }
  ```

  ```json HTTP server theme={null}
  {
    "mcpServers": {
      "sentry": {
        "type": "http",
        "url": "https://mcp.sentry.dev/mcp"
      }
    }
  }
  ```

  ```json SSE server with header theme={null}
  {
    "mcpServers": {
      "corridor": {
        "type": "sse",
        "url": "https://app.corridor.dev/api/mcp",
        "headers": {
          "Authorization": "Bearer your_token_here"
        }
      }
    }
  }
  ```
</CodeGroup>

## Authentication for MCP servers

Some HTTP and SSE servers require OAuth authentication. Use `--client-id` and `--client-secret` when adding the server:

```bash theme={null}
claude mcp add --transport http \
  --client-id your_client_id \
  --client-secret \
  my-oauth-server https://example.com/mcp
```

The `--client-secret` flag prompts you to enter the secret interactively (or you can set it via the `MCP_CLIENT_SECRET` environment variable).

If the server requires a fixed redirect URI (pre-registered with the OAuth provider), use `--callback-port` to pin a specific port:

```bash theme={null}
claude mcp add --transport http \
  --client-id your_client_id \
  --client-secret \
  --callback-port 8080 \
  my-oauth-server https://example.com/mcp
```

## Example: connecting a database MCP server

<Steps>
  <Step title="Add the server">
    Register the database MCP server as a stdio subprocess:

    ```bash theme={null}
    claude mcp add -e DATABASE_URL=postgres://localhost:5432/mydb \
      db-server -- npx @example/postgres-mcp
    ```
  </Step>

  <Step title="Verify the connection">
    Start a Claude Code session and run `/mcp` to confirm the server shows as connected.

    ```text theme={null}
    > /mcp
    ```

    You should see `db-server` listed with a `connected` status.
  </Step>

  <Step title="Use the new tools">
    Claude now has access to the database tools exposed by the server. Ask it to use them in plain language:

    ```text theme={null}
    > How many users signed up in the last 7 days?
    ```

    ```text theme={null}
    > Show me all orders with a status of "pending" that are older than 48 hours.
    ```

    Claude will call the database tools automatically and return the results.
  </Step>
</Steps>

## Troubleshooting MCP connections

<AccordionGroup>
  <Accordion title="Server shows as 'failed' in /mcp">
    Check that the command or URL is correct and that any required environment variables are set. For stdio servers, verify the package is installed:

    ```bash theme={null}
    npx my-mcp-server --help
    ```

    Use `/mcp reconnect my-server` to retry the connection after fixing the issue.
  </Accordion>

  <Accordion title="Server shows as 'needs-auth'">
    The server requires authentication but Claude doesn't have valid credentials. Re-add the server with `--client-id` and `--client-secret`, or check that your OAuth token is still valid.
  </Accordion>

  <Accordion title="Tools from the server aren't appearing">
    The server may have connected but failed to expose its tool list. Check the server's own logs or documentation. You can also try `/mcp disable my-server` followed by `/mcp enable my-server` to force a reconnect.
  </Accordion>

  <Accordion title="Warning: command looks like a URL">
    If you see a warning like "The command looks like a URL but is being interpreted as a stdio server", you forgot the `--transport` flag. Add `--transport http` or `--transport sse`:

    ```bash theme={null}
    claude mcp add --transport http my-server https://example.com/mcp
    ```
  </Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.