Skip to content

MCP server definitions live in the mcpServers object in settings and in extension manifests. The runtime types are in packages/core/src/config/config.ts; client logic is in mcp-client.ts.

Server fields ​

FieldPurpose
commandExecutable for stdio transport.
argsArgument array for stdio.
envEnvironment variables for the server.
cwdWorking directory for stdio.
urlHTTP/SSE endpoint.
httpUrlDeprecated HTTP/SSE endpoint.
typesse or http transport hint in core; settings schema also documents stdio.
headersHTTP headers for remote servers.
tcpWebSocket target.
timeoutOperation timeout in milliseconds.
trustWhether the server is trusted.
descriptionHuman-readable description.
includeTools / excludeToolsTool filters.
oauthOAuth configuration object.
authProviderType, targetAudience, targetServiceAccountAdvanced auth fields.

Examples ​

json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
      "timeout": 30000
    },
    "remote": {
      "url": "https://example.com/mcp",
      "type": "http",
      "headers": {"X-Example": "value"}
    }
  }
}

Transports and defaults ​

  • httpUrl takes priority when present (deprecated; a warning is emitted if both httpUrl and url are set).
  • url with type: http or type: sse selects that transport; url without a type uses Streamable HTTP and falls back to SSE on HTTP 404.
  • Stdio requires a trusted folder. Environment values are sanitized and ${...} references are expanded from the sanitized environment.
  • The default timeout is 10 minutes for connect, call, and list operations.
  • OAuth supports explicit authorizationUrl and tokenUrl, or discovery via WWW-Authenticate and OAuth metadata.

Merge and precedence ​

  • Settings mcpServers is a shallow-merged object across scopes.
  • Admin allowlists filter servers and clear serverCommand; admin-required servers are injected afterward.
  • When an extension and a user configuration define the same server, the user configuration is the override.
  • includeTools is intersected across definitions; excludeTools is unioned; env objects are merged.
  • Two extensions defining the same server name are skipped to avoid ambiguity.
  • Session enablement files and mcp.allowed / mcp.excluded can disable a server. --allowed-mcp-server-names restricts servers for one invocation.

Management ​

bash
m31a mcp add <name> <commandOrUrl> [args...]
m31a mcp list
m31a mcp enable <name>
m31a mcp disable <name>
m31a mcp remove <name>

In the TUI: /mcp auth, list, desc, schema, reload, enable, disable.

Next steps ​

See MCP, MCP tutorial, and Policy format.

Built with VitePress. Powered by NVIDIA NIM.