Skip to content
Draft
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: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ help: ## Display this help
clean: ## Clean up all build artifacts
rm -rf $(CLEAN_TARGETS)

.PHONY: build-mcp-app
build-mcp-app: ## Build the MCP App frontend UIs
cd mcp-app && npm install && npm run build

.PHONY: build
build: clean tidy format lint ## Build the project
build: clean tidy format lint build-mcp-app ## Build the project
go build $(COMMON_BUILD_ARGS) -o $(BINARY_NAME) ./cmd/kubernetes-mcp-server


Expand Down
1 change: 1 addition & 0 deletions mcp-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
341 changes: 341 additions & 0 deletions mcp-app/dist/pods-top-app.html

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions mcp-app/mcpapp.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package mcpapp

import _ "embed"

// ResourceMIMEType is the MIME type for MCP App HTML resources per the MCP Apps spec.
const ResourceMIMEType = "text/html;profile=mcp-app"

// PodsTopResourceURI is the MCP resource URI for the pods-top UI.
const PodsTopResourceURI = "ui://kubernetes-mcp-server/pods-top.html"

//go:embed dist/pods-top-app.html
var podsTopHTML string

// AppResource represents an embedded MCP App UI resource.
type AppResource struct {
URI string
Name string
HTML string
}

// ToolMeta returns a _meta map with the MCP Apps ui.resourceUri field set.
func ToolMeta(resourceURI string) map[string]any {
return map[string]any{
"ui": map[string]any{
"resourceUri": resourceURI,
},
}
}

// Resources returns all registered MCP App resources.
func Resources() []AppResource {
return []AppResource{
{
URI: PodsTopResourceURI,
Name: "Pods Top UI",
HTML: podsTopHTML,
},
}
}
Loading