Skip to content

MCP in CLI

The VJSP Command Line Interface (CLI) supports MCP servers, but its configuration path differs from that of the VS Code extension.

Configuration Storage Path

Runtime EnvironmentMCP Configuration File Path
CLI~/.vjsp/cli/global/settings/mcp_settings.json
VS CodeVS Code Global Storage Directory

MCP server configurations in VS Code are not synced to the CLI automatically and need to be configured separately.

Configuration Format

Edit the configuration file ~/.vjsp/cli/global/settings/mcp_settings.json with the following example:

json
{
	"mcpServers": {
		"Server Name": {
			"command": "node",
			"args": ["/path/to/server.js"],
			"env": {
				"API_KEY": "Your API Key"
			},
			"alwaysAllow": ["Tool 1", "Tool 2"],
			"disabled": false
		}
	}
}

Transport Types

Standard Input/Output (Local Server)

Applicable for locally deployed MCP servers, with the following configuration example:

json
{
	"mcpServers": {
		"Local Server": {
			"command": "node",
			"args": ["/path/to/server.js"],
			"env": {}
		}
	}
}

Streamable HTTP (Remote Server)

Applicable for remotely deployed MCP servers, with the following configuration example:

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

Project-Level Configuration

Create a .vjsp/mcp.json file in the project root directory to define MCP server configurations for individual projects. Project-level configurations take precedence over global configurations.

Configuration Item Description

Configuration ItemDescription
commandExecutable file to run (only for the standard input/output transport type)
argsCommand execution parameters (only for the standard input/output transport type)
envEnvironment variable configuration
typeTransport type: default is stdio (standard input/output), optional values are streamable-http (streamable HTTP) and sse (Server-Sent Events)
urlServer address (only for HTTP-based transport types)
headersHTTP request headers (only for HTTP-based transport types)
alwaysAllowArray of tool names for automatic authorization; tools in this list can be used without manual approval
disabledSet to true to disable the server configuration without deleting the file
timeoutRequest timeout in seconds, default value: 60

Automatic Authorization

The MCP automatic authorization feature can be configured globally via the CLI configuration tool vjsp config, with the following example:

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