File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ type Cfg struct {
1010 OpenAIAPIKey string
1111 JwtSigningKey string
1212
13- MongoURI string
13+ MongoURI string
14+ XtraMCPURI string
1415}
1516
1617var cfg * Cfg
@@ -21,11 +22,20 @@ func GetCfg() *Cfg {
2122 OpenAIAPIKey : os .Getenv ("OPENAI_API_KEY" ),
2223 JwtSigningKey : os .Getenv ("JWT_SIGNING_KEY" ),
2324 MongoURI : mongoURI (),
25+ XtraMCPURI : xtraMCPURI (),
2426 }
2527
2628 return cfg
2729}
2830
31+ func xtraMCPURI () string {
32+ val := os .Getenv ("XTRAMCP_URI" )
33+ if val != "" {
34+ return val
35+ }
36+ return "http://paperdebugger-xtra-mcp-server.com/mcp"
37+ }
38+
2939func mongoURI () string {
3040 val := os .Getenv ("PD_MONGO_URI" )
3141 if val != "" {
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ func NewAIClient(
5151 // toolRegistry.Register("greeting", tools.GreetingToolDescription, tools.GreetingTool)
5252
5353 // Load tools dynamically from backend
54- xtraMCPLoader := xtramcp .NewXtraMCPLoader (db , projectService , "http://paperdebugger-xtra-mcp-server.com/mcp" )
54+ xtraMCPLoader := xtramcp .NewXtraMCPLoader (db , projectService , cfg . XtraMCPURI )
5555
5656 // initialize MCP session first and log session ID
5757 sessionID , err := xtraMCPLoader .InitializeMCP ()
You can’t perform that action at this time.
0 commit comments