-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Description
Feature request description
Bundling an MCP server with the CLI has some advantages:
- Gives the agent direct access to the CLI without access to shell
- Limited CLI access, to non-destructive commands
- The user does not have to install additional binaries
Ophis converts cobra.Command trees to mcp tools, each command is a tool, with flags and args as input objects. The user can add the mcp server to Claude or VSCode with podman mcp claude enable
or podman mcp vscode enable
Suggest potential solution
// podman/cmd/mcp/command.go
package mcp
import (
"github.com/containers/podman/v5/cmd/podman/registry"
"github.com/njayp/ophis"
)
var mcpCommands = ophis.Command(&ophis.Config{
Filters: []ophis.Filter{
ophis.AllowFilter([]string{
"podman ps",
"podman logs",
"podman inspect",
"podman stats",
"podman top",
"podman port",
"podman images",
}),
},
})
func init() {
registry.Commands = append(registry.Commands, registry.CliCommand{
Command: mcpCommands,
})
}
Have you considered any alternatives?
No response
Additional context
No response
drewcassidy
Metadata
Metadata
Assignees
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.