Skip to content

MCP Configuration ​

The .mcp.json file configures Model Context Protocol servers. It supports a wrapped format ({ "mcpServers": { ... } }) for project scope or a flat format ({ "server-name": { ... } }) for plugin scope.

Fields ​

Server configuration varies by transport type.

stdio ​

Default transport when command is present.

FieldTypeRequiredDescription
typestringnoOptional, inferred from command
commandstringyesCommand to execute
argsstring[]noCommand arguments
envobjectnoEnvironment variables
timeoutnumbernoPer-server timeout in milliseconds
alwaysLoadbooleannoLoad tool definitions without deferring to tool search

http ​

FieldTypeRequiredDescription
typestringyesMust be "http"
urlstringyesHTTP endpoint URL
headersobjectnoHTTP headers
envobjectnoEnvironment variables
timeoutnumbernoPer-server timeout in milliseconds
alwaysLoadbooleannoLoad tool definitions without deferring to tool search
headersHelperstringnoCommand printing dynamic request headers
oauthobjectnoOAuth options: clientId, callbackPort, authServerMetadataUrl, and space-separated scopes

sse (deprecated) ​

FieldTypeRequiredDescription
typestringyesMust be "sse"
urlstringyesSSE endpoint URL
headersobjectnoHTTP headers
envobjectnoEnvironment variables
timeoutnumbernoPer-server timeout in milliseconds
alwaysLoadbooleannoLoad tool definitions without deferring to tool search
headersHelperstringnoCommand printing dynamic request headers
oauthobjectnoOAuth options: clientId, callbackPort, authServerMetadataUrl, and space-separated scopes

ws (WebSocket) ​

The config literal is "ws" — not "websocket", which is not a valid value.

FieldTypeRequiredDescription
typestringyesMust be "ws"
urlstringyesWebSocket URL (ws:// or wss://)
headersobjectnoRequest headers (WebSocket auth is header-only)
envobjectnoEnvironment variables
timeoutnumbernoPer-server timeout in milliseconds
alwaysLoadbooleannoLoad tool definitions without deferring to tool search
headersHelperstringnoCommand printing dynamic request headers
oauthobjectnoOAuth options: clientId, callbackPort, authServerMetadataUrl, and space-separated scopes

streamable-http ​

A documented alias for http, accepted so configurations copied from MCP server documentation work unmodified. Same fields as http.

Example ​

json
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "${GITHUB_TOKEN}"
      }
    },
    "analytics": {
      "type": "http",
      "url": "https://mcp.example.com/analytics"
    }
  }
}