Skip to content

feat: add dapr mcpservers cli cmd#1628

Open
sicoyle wants to merge 6 commits into
dapr:masterfrom
sicoyle:feat/mcp-crd
Open

feat: add dapr mcpservers cli cmd#1628
sicoyle wants to merge 6 commits into
dapr:masterfrom
sicoyle:feat/mcp-crd

Conversation

@sicoyle
Copy link
Copy Markdown
Contributor

@sicoyle sicoyle commented Apr 9, 2026

Description

Summary

  • Adds dapr mcpservers -k command to list MCPServer CRD resources in Kubernetes
  • Supports --name, --namespace, --all-namespaces, and -o json/yaml flags
  • Follows the same pattern as dapr components -k and dapr configurations -k

This will fail until my upstream PR here is merged with the clientset changes required for this:
dapr/dapr#9742

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #[issue number]

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

Signed-off-by: Samantha Coyle <sam@diagrid.io>
@sicoyle sicoyle requested review from a team as code owners April 9, 2026 19:42
Copilot AI review requested due to automatic review settings April 9, 2026 19:42
@sicoyle sicoyle mentioned this pull request Apr 9, 2026
3 tasks
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Kubernetes-mode CLI command (dapr mcpservers -k) to list Dapr MCPServer CRD resources, aligning output/flags with existing components and configurations listing patterns.

Changes:

  • Introduces Kubernetes client helpers to list/print MCPServer resources with table and JSON/YAML output.
  • Adds a new dapr mcpservers Cobra command with --name, --namespace, --all-namespaces, and -o flags.
  • Adds unit tests for listing/filtering behavior and endpoint-derived fields (transport/URL).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
pkg/kubernetes/mcpservers.go Implements listing, filtering, table output, and JSON/YAML detail output for MCPServers.
pkg/kubernetes/mcpservers_test.go Adds tests for write path, transport detection, and URL derivation.
cmd/mcpservers.go Adds the new dapr mcpservers CLI command and flags wiring.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/kubernetes/mcpservers.go Outdated
Comment thread pkg/kubernetes/mcpservers.go
Comment thread pkg/kubernetes/mcpservers_test.go
Comment thread cmd/mcpservers.go Outdated
Comment thread cmd/mcpservers.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants