-
-
Notifications
You must be signed in to change notification settings - Fork 26
Configuration File
ravitemer edited this page Mar 31, 2025
·
1 revision
The servers.json
file (default: ~/.config/mcphub/servers.json
) contains MCP server configurations.
{
"mcpServers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"],
"env": {
"API_KEY": "", // Falls back to process.env.API_KEY
"SERVER_URL": null, // Falls back to process.env.SERVER_URL
"DEBUG": "true" // Direct value, no fallback
}
}
}
}
MCPHub.nvim adds several management keys to each server config:
{
"mcpServers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"],
"env": {},
// MCPHub additions:
"disabled": false, // Disable entire server
"disabled_tools": [ // Disable specific tools
"expensive-tool"
],
"disabled_resources": [ // Disable specific resources
"resource://fetch/large-data"
],
"disabled_resourceTemplates": [ // Disable resource templates
"resource://{project}/data",
"resource://fetch/{type}/{id}"
],
"custom_instructions": { // Server-specific instructions
"disabled": false,
"text": "Instructions for this server"
}
}
}
}
MCPHub also adds a nativeMCPServers
key to store state for Lua Native MCP Servers:
{
"mcpServers": { ... },
"nativeMCPServers": {
"neovim": {
"disabled": false,
"disabled_tools": [],
"disabled_resources": [],
"custom_instructions": {
"disabled": false,
"text": ""
}
}
}
}
- File is created automatically if not present
- Users only need to add MCP server-specific config (
command
,args
,env
) - State management keys can be updated through MCPHub UI
- Environment variables in
env
:- Empty string ("") falls back to process.env
- null ignores process.env fallback
- Direct values are used as provided