chore(config): remove example MCP servers from default config

Remove pre-populated example servers (filesystem, github, brave-search,
postgres) from DefaultConfig() to reduce memory footprint per instance.

Changes:
- Set MCP.Servers to empty map instead of 4 example servers
- Reduces default config size by ~500 bytes per instance
- Users should add MCP servers via config.json or documentation

Example configurations are still available in:
- README.md MCP section
- config.example.json
- Official MCP documentation

This optimization benefits deployments with many agent instances.
This commit is contained in:
yuchou87
2026-02-17 10:41:29 +08:00
parent 6892d006d6
commit 4113190c2a
+1 -29
View File
@@ -353,35 +353,7 @@ func DefaultConfig() *Config {
},
MCP: MCPConfig{
Enabled: false,
Servers: map[string]MCPServerConfig{
"filesystem": {
Enabled: false,
Command: "npx",
Args: []string{"-y", "@modelcontextprotocol/server-filesystem", "/tmp"},
Env: map[string]string{},
},
"github": {
Enabled: false,
Command: "npx",
Args: []string{"-y", "@modelcontextprotocol/server-github"},
Env: map[string]string{
"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_TOKEN",
},
},
"brave-search": {
Enabled: false,
Command: "npx",
Args: []string{"-y", "@modelcontextprotocol/server-brave-search"},
Env: map[string]string{
"BRAVE_API_KEY": "YOUR_BRAVE_API_KEY",
},
},
"postgres": {
Enabled: false,
Command: "npx",
Args: []string{"-y", "@modelcontextprotocol/server-postgres", "postgresql://user:password@localhost/dbname"},
},
},
Servers: map[string]MCPServerConfig{},
},
},
Heartbeat: HeartbeatConfig{