MCP Configuration Reference — Claude Cert Academy

MCP Configuration Reference

MCP (Model Context Protocol) servers extend Claude Code with external tools — databases, APIs, cloud services. They are configured in settings.json and launched automatically when Claude Code starts.

Transport Types

Settings.json Schema for MCP Servers

{
  "mcp": {
    "servers": [
      {
        "name": "my-db-server",
        "transport": "stdio",
        "command": "/usr/local/bin/mcp-db-server",
        "args": ["--config", "/etc/mcp/db.json"],
        "env": {
          "DB_URL": "postgres://localhost:5432/mydb"
        }
      },
      {
        "name": "remote-api",
        "transport": "http",
        "url": "https://mcp.example.com/v1",
        "headers": {
          "Authorization": "Bearer ${MCP_TOKEN}"
        }
      },
      {
        "name": "streaming-service",
        "transport": "sse",
        "url": "https://stream.example.com/mcp",
        "headers": {
          "Authorization": "Bearer ${MCP_TOKEN}"
        }
      }
    ]
  }
}

Server Entry Fields

Scope Levels

Put the server name and transport in settings.json (project scope) so the team knows what MCP servers are available. Put the credentials (env vars, tokens) in settings.local.json (user scope) so they are never committed.

Auth Patterns

Common Errors

/mcp Command Output

The /mcp slash command shows the status of all configured MCP servers. Understanding its output speeds up debugging.

# Example /mcp output
MCP Servers:
  my-db-server    [stdio]   CONNECTED   3 tools
    Tools: query_db, list_tables, describe_table
  remote-api      [http]    ERROR       failed to connect: connection refused
  streaming-svc   [sse]     CONNECTING  ...

# Field meanings:
# Server name    — matches the name field in settings.json
# [transport]    — stdio, http, or sse
# Status         — CONNECTED, ERROR, CONNECTING, DISABLED
# N tools        — number of tools the server registered
# Tools list     — individual tool names (prefixed as name:tool in prompts)

If a server shows ERROR, the error message after the colon is the server's stderr output. Read it directly — it usually tells you exactly what's wrong (missing env var, bad config path, port conflict).

Continue to Claude Cert Academy