MCP Server Configuration
MCP server configuration for Claude Code.
| Type | StdioServer | HttpServer | SseServer |
|---|---|
| Schema URL | https://catalog.lintel.tools/schemas/claude-code/mcp-server-config/latest.json |
Validate with Lintel
npx @lintel/lintel check
Configuration for a single MCP server in Claude Code.
Supports three transport types:
- stdio — Runs a local child process; Claude Code communicates over stdin/stdout
- http — Connects to a remote server using streamable HTTP (recommended for remote servers)
- sse — Connects to a remote server using server-sent events (deprecated; prefer HTTP)
All string fields support environment variable expansion:
${VAR}— expands to the value ofVAR${VAR:-default}— expands toVARif set, otherwise usesdefault
Expansion is supported in command, args, env, url, and headers fields.
One of
Definitions
A stdio-based MCP server that runs as a local child process.
Claude Code launches the specified command and communicates over stdin/stdout using the MCP stdio transport.
If type is omitted and command is present, stdio transport is assumed.
Use ${CLAUDE_PLUGIN_ROOT} in command, args, env, and cwd for plugin-relative paths. All string values support ${VAR} and ${VAR:-default} environment variable expansion.
Windows note: On native Windows (not WSL), servers that use npx require a cmd /c wrapper (e.g. "command": "cmd", "args": ["/c", "npx", "-y", "@some/package"]).
Executable to run.
Must be in PATH or specified as an absolute or relative path. Supports ${VAR} expansion and ${CLAUDE_PLUGIN_ROOT} for plugin-relative paths.
Transport type.
Optional for stdio servers — if type is omitted and command is present, stdio is assumed.
Command-line arguments passed to the server process.
Supports ${VAR} expansion and ${CLAUDE_PLUGIN_ROOT}.
Environment variables set when starting the server process.
These are merged with the parent environment. Values support ${VAR} and ${VAR:-default} expansion, as well as ${CLAUDE_PLUGIN_ROOT} for plugin-relative paths.
Working directory for the server process.
If omitted, inherits the current working directory. Supports ${CLAUDE_PLUGIN_ROOT} for plugin-relative paths.
Connection timeout in milliseconds.
How long Claude Code waits for the server to start and respond to the initial handshake. Can also be configured globally via the MCP_TIMEOUT environment variable (e.g. MCP_TIMEOUT=10000 claude).
A remote MCP server using the streamable HTTP transport.
This is the recommended transport for remote/cloud-based MCP servers. Claude Code connects to the server over HTTP/HTTPS.
Use headers for static authentication (e.g. API keys). For OAuth 2.0 authentication, configure the oauth field and use /mcp in Claude Code to complete the browser login flow.
All string values support ${VAR} and ${VAR:-default} environment variable expansion.
Transport type. Required for HTTP servers.
URL of the remote MCP server endpoint.
Supports ${VAR} and ${VAR:-default} environment variable expansion.
HTTP headers to include with every request.
Commonly used for static authentication (API keys, bearer tokens). Supports ${VAR} and ${VAR:-default} environment variable expansion in values.
Pre-configured OAuth 2.0 client credentials.
Required when the remote MCP server does not support dynamic client registration. Register an OAuth app through the server's developer portal and provide the clientId here. The client secret is passed separately via claude mcp add-json --client-secret and stored securely in your system keychain — it is never written to config files.
After configuring, run /mcp in Claude Code to complete the browser authentication flow. Tokens are stored securely and refreshed automatically.
2 nested properties
OAuth client ID obtained from the server's developer portal.
If the server uses a public OAuth client with no secret, provide only clientId without a corresponding --client-secret flag.
Local port for the OAuth callback redirect.
Claude Code starts a temporary HTTP server on this port to receive the OAuth redirect. The redirect URI registered in the server's developer portal must match <http://localhost:<callbackPort>>/callback.
Choose any available port; it just needs to match the redirect URI you registered.
A remote MCP server using the SSE (server-sent events) transport.
Deprecated: The SSE transport is deprecated. Use HTTP servers instead, where available.
Claude Code connects to the server over HTTP/HTTPS with SSE for server-to-client messages. Configuration is identical to HTTP servers.
All string values support ${VAR} and ${VAR:-default} environment variable expansion.
Transport type. Required for SSE servers.
URL of the remote MCP server SSE endpoint.
Supports ${VAR} and ${VAR:-default} environment variable expansion.
HTTP headers to include with every request.
Commonly used for static authentication (API keys, bearer tokens). Supports ${VAR} and ${VAR:-default} environment variable expansion in values.
Pre-configured OAuth 2.0 client credentials.
Required when the remote MCP server does not support dynamic client registration. Register an OAuth app through the server's developer portal and provide the clientId here. The client secret is passed separately via claude mcp add-json --client-secret and stored securely in your system keychain — it is never written to config files.
After configuring, run /mcp in Claude Code to complete the browser authentication flow. Tokens are stored securely and refreshed automatically.
2 nested properties
OAuth client ID obtained from the server's developer portal.
If the server uses a public OAuth client with no secret, provide only clientId without a corresponding --client-secret flag.
Local port for the OAuth callback redirect.
Claude Code starts a temporary HTTP server on this port to receive the OAuth redirect. The redirect URI registered in the server's developer portal must match <http://localhost:<callbackPort>>/callback.
Choose any available port; it just needs to match the redirect URI you registered.
Pre-configured OAuth 2.0 client credentials.
Required when the remote MCP server does not support dynamic client registration. Register an OAuth app through the server's developer portal and provide the clientId here. The client secret is passed separately via claude mcp add-json --client-secret and stored securely in your system keychain — it is never written to config files.
After configuring, run /mcp in Claude Code to complete the browser authentication flow. Tokens are stored securely and refreshed automatically.
OAuth client ID obtained from the server's developer portal.
If the server uses a public OAuth client with no secret, provide only clientId without a corresponding --client-secret flag.
Local port for the OAuth callback redirect.
Claude Code starts a temporary HTTP server on this port to receive the OAuth redirect. The redirect URI registered in the server's developer portal must match <http://localhost:<callbackPort>>/callback.
Choose any available port; it just needs to match the redirect URI you registered.