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 Environment | MCP Configuration File Path |
|---|---|
| CLI | ~/.vjsp/cli/global/settings/mcp_settings.json |
| VS Code | VS 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:
{
"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:
{
"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:
{
"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 Item | Description |
|---|---|
command | Executable file to run (only for the standard input/output transport type) |
args | Command execution parameters (only for the standard input/output transport type) |
env | Environment variable configuration |
type | Transport type: default is stdio (standard input/output), optional values are streamable-http (streamable HTTP) and sse (Server-Sent Events) |
url | Server address (only for HTTP-based transport types) |
headers | HTTP request headers (only for HTTP-based transport types) |
alwaysAllow | Array of tool names for automatic authorization; tools in this list can be used without manual approval |
disabled | Set to true to disable the server configuration without deleting the file |
timeout | Request 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:
{
"autoApproval": {
"mcp": {
"enabled": true
}
}
}