-
Notifications
You must be signed in to change notification settings - Fork 241
Add remotes to createprofile #325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| {"id":"mcp-gateway-2ok","title":"Phase 2: Refactor catalog_next functions","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-19T17:41:10.738549-08:00","updated_at":"2025-12-19T17:47:38.524561-08:00","closed_at":"2025-12-19T17:47:38.524561-08:00"} | ||
| {"id":"mcp-gateway-4lw","title":"Fix profile creation to support remote servers","description":"The mcp-create-profile tool currently only supports image-based servers and skips remote servers. This prevents users from saving profiles that include remote MCP servers (like the Grafana server). The createprofile.go code needs to be updated to handle ServerTypeRemote in addition to ServerTypeImage.","status":"closed","priority":2,"issue_type":"bug","created_at":"2026-01-05T15:56:37.008439-08:00","updated_at":"2026-01-05T16:04:33.674593-08:00","closed_at":"2026-01-05T16:04:33.674593-08:00"} | ||
| {"id":"mcp-gateway-9r2","title":"Phase 5: Add documentation and examples","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-19T17:41:12.622244-08:00","updated_at":"2025-12-19T17:53:20.683404-08:00","closed_at":"2025-12-19T17:53:20.683404-08:00"} | ||
| {"id":"mcp-gateway-qn7","title":"Phase 1: Create Manager API files","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-19T17:41:10.520283-08:00","updated_at":"2025-12-19T17:42:16.097283-08:00","closed_at":"2025-12-19T17:42:16.097283-08:00"} | ||
| {"id":"mcp-gateway-spe","title":"Phase 4: Create tests","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-19T17:41:11.656868-08:00","updated_at":"2025-12-19T17:52:36.669727-08:00","closed_at":"2025-12-19T17:52:36.669727-08:00"} | ||
| {"id":"mcp-gateway-uwc","title":"Phase 3: Update CLI commands","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-19T17:41:10.920106-08:00","updated_at":"2025-12-19T17:50:53.440016-08:00","closed_at":"2025-12-19T17:50:53.440016-08:00"} |
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've fixed this in #313 as well. Can you take a look at the change to createprofile.go there? I'm just putting the final touches on that PR right now. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,11 +58,15 @@ func createProfileHandler(g *Gateway) mcp.ToolHandler { | |
| continue | ||
| } | ||
|
|
||
| // Determine server type based on whether it has an image | ||
| serverType := workingset.ServerTypeImage | ||
| if catalogServer.Image == "" { | ||
| // Skip servers without images for now (registry servers) | ||
| log.Logf("Warning: server %s has no image, skipping", serverName) | ||
| // Determine server type based on whether it has an image or remote endpoint | ||
| var serverType workingset.ServerType | ||
|
|
||
| if catalogServer.Image != "" { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just for reference, there is a |
||
| serverType = workingset.ServerTypeImage | ||
| } else if catalogServer.Remote.URL != "" { | ||
| serverType = workingset.ServerTypeRemote | ||
| } else { | ||
| log.Logf("Warning: server %s has no image or remote endpoint, skipping", serverName) | ||
| continue | ||
| } | ||
|
|
||
|
|
@@ -78,10 +82,9 @@ func createProfileHandler(g *Gateway) mcp.ToolHandler { | |
| serverTools = g.configuration.tools.ServerTools[serverName] | ||
| } | ||
|
|
||
| // Create server entry | ||
| // Create server entry based on type | ||
| server := workingset.Server{ | ||
| Type: serverType, | ||
| Image: catalogServer.Image, | ||
| Config: serverConfig, | ||
| Secrets: "default", | ||
| Tools: serverTools, | ||
|
|
@@ -90,13 +93,20 @@ func createProfileHandler(g *Gateway) mcp.ToolHandler { | |
| }, | ||
| } | ||
|
|
||
| switch serverType { | ||
| case workingset.ServerTypeImage: | ||
| server.Image = catalogServer.Image | ||
| case workingset.ServerTypeRemote: | ||
| server.Endpoint = catalogServer.Remote.URL | ||
| } | ||
|
|
||
| servers = append(servers, server) | ||
| } | ||
|
|
||
| if len(servers) == 0 { | ||
| return &mcp.CallToolResult{ | ||
| Content: []mcp.Content{&mcp.TextContent{ | ||
| Text: "No servers with images found in current gateway state. Cannot create profile.", | ||
| Text: "No servers with images or remote endpoints found in current gateway state. Cannot create profile.", | ||
| }}, | ||
| IsError: true, | ||
| }, nil | ||
|
|
@@ -175,6 +185,8 @@ func createProfileHandler(g *Gateway) mcp.ToolHandler { | |
| resultMessage += fmt.Sprintf("\n%d. %s", i+1, serverName) | ||
| if server.Image != "" { | ||
| resultMessage += fmt.Sprintf(" (image: %s)", server.Image) | ||
| } else if server.Endpoint != "" { | ||
| resultMessage += fmt.Sprintf(" (remote: %s)", server.Endpoint) | ||
| } | ||
| if len(server.Tools) > 0 { | ||
| resultMessage += fmt.Sprintf(" - %d tools", len(server.Tools)) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The local beads file shouldn't be versioned, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't mean to add it. removing it