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

http

FieldTypeRequiredDescription
typestringyesMust be "http"
urlstringyesHTTP endpoint URL
headersobjectnoHTTP headers
envobjectnoEnvironment variables

sse (deprecated)

FieldTypeRequiredDescription
typestringyesMust be "sse"
urlstringyesSSE endpoint URL
headersobjectnoHTTP headers
envobjectnoEnvironment variables

websocket

FieldTypeRequiredDescription
typestringyesMust be "websocket"
urlstringyesWebSocket URL
envobjectnoEnvironment variables

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"
    }
  }
}