Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .beads/issues.jsonl
Copy link
Copy Markdown
Collaborator

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?

Copy link
Copy Markdown
Contributor Author

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

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"}
28 changes: 20 additions & 8 deletions pkg/gateway/createprofile.go
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The 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
Expand Up @@ -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 != "" {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for reference, there is a Type property that will either be server, remote, or poci that could also be checked here.

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
}

Expand All @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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))
Expand Down
Loading