mcp-all-in-one provides powerful self-configuration features that allow you to manage configurations directly through MCP tools without manually editing files. This feature enables you to dynamically add, remove, or modify MCP service configurations in your IDE, greatly improving work efficiency.
For Chinese documentation, see SELF_CONFIGURATION_GUIDE_zh-CN.md.
After you start mcp-all-in-one, the following tools are automatically available and integrated into your MCP tool list:
- mcp-all-in-one-show-mcp-config - Display current MCP configuration file content
- mcp-all-in-one-validate-mcp-config - Validate the correctness of MCP configuration file
- mcp-all-in-one-show-mcp-config-schema - Display JSON Schema for MCP configuration
- mcp-all-in-one-set-mcp-config - Set MCP configuration
Display the content of the current MCP configuration file.
Parameters:
config-file(optional): MCP configuration file path, displays currently used configuration file if not specified
Usage Examples:
Use tool: mcp-all-in-one-show-mcp-config
Or specify a specific configuration file:
Use tool: mcp-all-in-one-show-mcp-config
Parameters: {
"config-file": "/path/to/your/mcp.json"
}
Return Result:
{
"config": {
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
},
"web-search": {
"type": "http",
"url": "https://api.example.com/mcp",
"headers": {
"Authorization": "Bearer ${API_KEY}"
}
}
}
},
"configPath": "/path/to/your/mcp.json"
}Validate the correctness of MCP configuration file, checking if format and content meet requirements.
Parameters:
config-file(optional): MCP configuration file path, validates currently used configuration file if not specified
Usage Examples:
Use tool: mcp-all-in-one-validate-mcp-config
Or specify a specific configuration file:
Use tool: mcp-all-in-one-validate-mcp-config
Parameters: {
"config-file": "/path/to/your/mcp.json"
}
Return Result:
{
"valid": true,
"errors": [],
"configPath": "/path/to/your/mcp.json"
}If configuration has errors:
{
"valid": false,
"errors": [
"mcpServers.web-search.url: must be a valid URI",
"mcpServers.filesystem.timeout: must be >= 1000"
],
"configPath": "/path/to/your/mcp.json"
}Display JSON Schema for MCP configuration, helping you understand the correct configuration format.
Parameters: None
Usage Examples:
Use tool: mcp-all-in-one-show-mcp-config-schema
Return Result:
{
"schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "vtxf/mcp-all-in-one/schema/mcpServers.schema.json",
"title": "MCP Servers Configuration Schema",
"description": "Schema for MCP server configurations",
"type": "object",
"required": ["mcpServers"],
"properties": {
"mcpServers": {
"type": "object",
"description": "MCP servers configuration object",
// ... More schema content
}
}
},
"schemaVersion": "http://json-schema.org/draft-07/schema#"
}Set MCP configuration, can add new services, modify existing services, or delete services.
Parameters:
config-content(required): New MCP configuration content (JSON string)config-file(optional): MCP configuration file path, modifies currently used configuration file if not specified
Usage Examples:
Use tool: mcp-all-in-one-set-mcp-config
Parameters: {
"config-content": "{\"mcpServers\":{\"filesystem\":{\"command\":\"npx\",\"args\":[\"-y\",\"@modelcontextprotocol/server-filesystem\",\".\"]}}}",
"config-file": "/path/to/your/mcp.json"
}
Return Result:
{
"success": true,
"configPath": "/path/to/your/mcp.json",
"backupPath": "/path/to/your/mcp.json.backup.2023-12-01T10-30-00-000Z",
"restartRequired": true,
"restartMessage": "MCP configuration updated. Please restart mcp-all-in-one service to apply new configuration. Use the following command to restart:\nmcp-all-in-one stdio --mcp-config /path/to/your/mcp.json",
"errors": []
}If configuration has errors:
{
"success": false,
"configPath": "/path/to/your/mcp.json",
"errors": [
"mcpServers.web-search.url: must be a valid URI"
],
"restartRequired": false,
"restartMessage": ""
}- View Current Configuration: Use
mcp-all-in-one-show-mcp-configto understand current configuration - Plan Modifications: Use
mcp-all-in-one-show-mcp-config-schemato understand configuration format - Validate New Configuration: Use
mcp-all-in-one-validate-mcp-configto validate new configuration - Apply Configuration: Use
mcp-all-in-one-set-mcp-configto apply new configuration - Restart Service: Restart mcp-all-in-one service according to prompts to apply new configuration
Suppose you want to add a time service to existing configuration:
-
View Current Configuration:
Use tool: mcp-all-in-one-show-mcp-config -
Prepare New Configuration (Add time service based on current configuration):
{ "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "."] }, "time": { "command": "uvx", "args": ["mcp-server-time", "--local-timezone=Asia/Shanghai"] } } } -
Apply New Configuration:
Use tool: mcp-all-in-one-set-mcp-config Parameters: { "config-content": "{\"mcpServers\":{\"filesystem\":{\"command\":\"npx\",\"args\":[\"-y\",\"@modelcontextprotocol/server-filesystem\",\".\"]},\"time\":{\"command\":\"uvx\",\"args\":[\"mcp-server-time\",\"--local-timezone=Asia/Shanghai\"]}}}" } -
Restart Service (According to returned prompts):
mcp-all-in-one stdio --mcp-config /path/to/your/mcp.json
If you want to temporarily disable a service without deleting it:
-
View Current Configuration:
Use tool: mcp-all-in-one-show-mcp-config -
Modify Configuration (Rename service with "_disabled" suffix):
Use tool: mcp-all-in-one-set-mcp-config Parameters: { "config-content": "{\"mcpServers\":{\"filesystem_disabled\":{\"command\":\"npx\",\"args\":[\"-y\",\"@modelcontextprotocol/server-filesystem\",\".\"]}}}" } -
Restart Service (According to returned prompts)
Configure primary and backup services to achieve high availability:
-
View Current Configuration:
Use tool: mcp-all-in-one-show-mcp-config -
Modify Configuration (Add backup service):
Use tool: mcp-all-in-one-set-mcp-config Parameters: { "config-content": "{\"mcpServers\":{\"primary-search\":{\"type\":\"http\",\"url\":\"https://primary.example.com/mcp\",\"timeout\":5000},\"backup-search\":{\"type\":\"http\",\"url\":\"https://backup.example.com/mcp\",\"timeout\":5000}}}" } -
Restart Service (According to returned prompts)
You can use scripts or tools to batch generate configurations, then apply them all at once:
# Python example: Generate configuration
import json
config = {
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
}
}
}
# Add multiple services
services = [
{"name": "time", "command": "uvx", "args": ["mcp-server-time", "--local-timezone=Asia/Shanghai"]},
{"name": "web-search", "type": "http", "url": "https://api.example.com/mcp"}
]
for service in services:
config["mcpServers"][service["name"]] = service
# Convert to JSON string
config_str = json.dumps(config)
# Use mcp-all-in-one-set-mcp-config in IDE to apply this configuration
print(f"Use tool: mcp-all-in-one-set-mcp-config")
print(f"Parameters: {{")
print(f' "config-content": "{config_str}"')
print(f"}}")Apply different configurations based on different environments:
Use tool: mcp-all-in-one-set-mcp-config
Parameters: {
"config-content": "{\"mcpServers\":{\"filesystem\":{\"command\":\"npx\",\"args\":[\"-y\",\"@modelcontextprotocol/server-filesystem\",\".\"],\"env\":{\"NODE_ENV\":\"${NODE_ENV:-development}\"}}}}",
"config-file": "./configs/${NODE_ENV:-development}.json"
}
Create configuration templates and apply them as needed:
-
Create Base Template:
Use tool: mcp-all-in-one-set-mcp-config Parameters: { "config-content": "{\"mcpServers\":{}}", "config-file": "./templates/base.json" } -
Create Specific Configuration Based on Template:
Use tool: mcp-all-in-one-show-mcp-config Parameters: { "config-file": "./templates/base.json" } -
Modify and Apply:
Use tool: mcp-all-in-one-set-mcp-config Parameters: { "config-content": "{\"mcpServers\":{\"filesystem\":{\"command\":\"npx\",\"args\":[\"-y\",\"@modelcontextprotocol/server-filesystem\",\".\"]}}}", "config-file": "./configs/production.json" }
mcp-all-in-one automatically creates backups when you modify configurations, backup files are named in the format:
filename.backup.timestamp
For example: mcp.json.backup.2023-12-01T10-30-00-000Z
Before applying new configuration, always use mcp-all-in-one-validate-mcp-config to validate configuration:
Use tool: mcp-all-in-one-validate-mcp-config
Parameters: {
"config-file": "/path/to/your/mcp.json"
}
For complex configuration changes, it's recommended to adopt a progressive approach:
- First apply small-scale changes
- Verify if changes take effect
- Continue with the next round of changes
Use environment variables in configuration to make it more flexible:
{
"mcpServers": {
"api-service": {
"type": "http",
"url": "https://${API_HOST}/mcp",
"headers": {
"Authorization": "Bearer ${API_KEY}"
}
}
}
}If configuration changes don't take effect:
- Confirm mcp-all-in-one service has been restarted
- Check if configuration file path is correct
- Verify if configuration format is correct
If you encounter JSON format errors:
- Use
mcp-all-in-one-validate-mcp-configto validate configuration - Check escape characters in JSON string
- Ensure all quotes and brackets match
If service connection fails:
- Check if service configuration is correct
- Verify network connection and authentication information
- Check mcp-all-in-one logs for more information
mcp-all-in-one's self-configuration feature provides powerful and flexible configuration management capabilities, enabling you to dynamically manage MCP services in your IDE without manually editing configuration files. By properly using these tools, you can:
- Quickly add, remove, or modify MCP services
- Validate configuration correctness
- Manage configurations for different environments
- Achieve service failover and high availability
We hope this guide helps you better use mcp-all-in-one's self-configuration features! If you have any questions or suggestions, feel free to submit an Issue or Pull Request.