Using MCP in the CLI

The Kilo Code CLI supports MCP servers, but uses a different configuration path than the VS Code extension.

Configuration Location

EnvironmentMCP Settings Path
CLI~/.kilocode/cli/global/settings/mcp_settings.json
VS CodeVS Code's global storage directory

MCP servers configured in VS Code are not automatically available in the CLI. You must configure them separately.

Configuration Format

Edit ~/.kilocode/cli/global/settings/mcp_settings.json:

{
	"mcpServers": {
		"server-name": {
			"command": "node",
			"args": ["/path/to/server.js"],
			"env": {
				"API_KEY": "your_api_key"
			},
			"alwaysAllow": ["tool1", "tool2"],
			"disabled": false
		}
	}
}

Transport Types

STDIO (Local Servers)

{
	"mcpServers": {
		"local-server": {
			"command": "node",
			"args": ["/path/to/server.js"],
			"env": {}
		}
	}
}

Streamable HTTP (Remote Servers)

{
	"mcpServers": {
		"remote-server": {
			"type": "streamable-http",
			"url": "https://your-server.com/mcp",
			"headers": {
				"Authorization": "Bearer token"
			}
		}
	}
}

Project-Level Configuration

You can define MCP servers per-project by creating .kilocode/mcp.json in your project root. Project-level servers take precedence over global settings.

Configuration Options

OptionDescription
commandExecutable to run (STDIO)
argsCommand arguments (STDIO)
envEnvironment variables
typeTransport type: stdio (default), streamable-http, sse
urlServer URL (HTTP transports)
headersHTTP headers (HTTP transports)
alwaysAllowArray of tool names to auto-approve
disabledSet true to disable without removing
timeoutRequest timeout in seconds (default: 60)

Auto-Approval

MCP auto-approval is controlled via CLI config (kilocode config):

{
	"autoApproval": {
		"mcp": {
			"enabled": true
		}
	}
}

Or via environment variable:

export KILO_AUTO_APPROVAL_MCP_ENABLED=true

Per-tool auto-approval uses the alwaysAllow array in the server configuration.