mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
feat: add MCP server base URL configuration utility
Added a new configuration utility function GetMcpServerBaseUrl() to: - Define a default MCP server base URL - Allow custom configuration via Viper - Provide a consistent way to retrieve the MCP server base URL
This commit is contained in:
@@ -35,6 +35,7 @@ const (
|
||||
DefaultPyenvPath = "/root/.pyenv"
|
||||
DefaultNodeModulesPath = "/usr/lib/node_modules"
|
||||
DefaultGoPath = "/root/go"
|
||||
DefaultMcpServerBaseUrl = "http://localhost:9000/sse"
|
||||
)
|
||||
|
||||
func IsDev() bool {
|
||||
@@ -285,3 +286,10 @@ func GetGoPath() string {
|
||||
}
|
||||
return DefaultGoPath
|
||||
}
|
||||
|
||||
func GetMcpServerBaseUrl() string {
|
||||
if res := viper.GetString("mcp.server.base_url"); res != "" {
|
||||
return res
|
||||
}
|
||||
return DefaultMcpServerBaseUrl
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user