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
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ require (
github.com/google/uuid v1.6.0
github.com/miekg/dns v1.1.72
github.com/modelcontextprotocol/go-sdk v1.6.1
github.com/ovn-kubernetes/ovn-kubernetes-mcp v0.0.0-20260605095148-52ec23dbc6b1
github.com/prometheus/client_golang v1.23.2
github.com/rhobs/obs-mcp v0.2.0
github.com/spf13/afero v1.15.0
Expand Down Expand Up @@ -82,7 +83,7 @@ require (
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-errors/errors v1.5.1 // indirect
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.25.0 // indirect
Expand Down
18 changes: 10 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ github.com/fsnotify/fsnotify v1.10.1 h1:b0/UzAf9yR5rhf3RPm9gf3ehBPpf0oZKIjtpKrx5
github.com/fsnotify/fsnotify v1.10.1/go.mod h1:TLheqan6HD6GBK6PrDWyDPBaEV8LspOxvPSjC+bVfgo=
github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk=
github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
github.com/go-gorp/gorp/v3 v3.1.0 h1:ItKF/Vbuj31dmV4jxA1qblpSwkl9g1typ24xoe70IGs=
github.com/go-gorp/gorp/v3 v3.1.0/go.mod h1:dLEjIyyRNiXvNZ8PSmzpt1GsWAUK8kjVhEpjH8TixEw=
github.com/go-jose/go-jose/v4 v4.1.4 h1:moDMcTHmvE6Groj34emNPLs/qtYXRVcd6S7NHbHz3kA=
Expand Down Expand Up @@ -238,8 +238,8 @@ github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/jsonschema-go v0.4.3 h1:/DBOLZTfDow7pe2GmaJNhltueGTtDKICi8V8p+DQPd0=
github.com/google/jsonschema-go v0.4.3/go.mod h1:r5quNTdLOYEz95Ru18zA0ydNbBuYoo9tgaYcxEYhJVE=
github.com/google/pprof v0.0.0-20260302011040-a15ffb7f9dcc h1:VBbFa1lDYWEeV5FZKUiYKYT0VxCp9twUmmaq9eb8sXw=
github.com/google/pprof v0.0.0-20260302011040-a15ffb7f9dcc/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI=
github.com/google/pprof v0.0.0-20260402051712-545e8a4df936 h1:EwtI+Al+DeppwYX2oXJCETMO23COyaKGP6fHVpkpWpg=
github.com/google/pprof v0.0.0-20260402051712-545e8a4df936/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI=
github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0=
github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
Expand Down Expand Up @@ -336,14 +336,16 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/oklog/ulid/v2 v2.1.1 h1:suPZ4ARWLOJLegGFiZZ1dFAkqzhMjL3J1TzI+5wHz8s=
github.com/oklog/ulid/v2 v2.1.1/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ=
github.com/onsi/ginkgo/v2 v2.28.1 h1:S4hj+HbZp40fNKuLUQOYLDgZLwNUVn19N3Atb98NCyI=
github.com/onsi/ginkgo/v2 v2.28.1/go.mod h1:CLtbVInNckU3/+gC8LzkGUb9oF+e8W8TdUsxPwvdOgE=
github.com/onsi/gomega v1.39.1 h1:1IJLAad4zjPn2PsnhH70V4DKRFlrCzGBNrNaru+Vf28=
github.com/onsi/gomega v1.39.1/go.mod h1:hL6yVALoTOxeWudERyfppUcZXjMwIMLnuSfruD2lcfg=
github.com/onsi/ginkgo/v2 v2.28.3 h1:4JvMdwtFU0imd8fHx25OJXoDMRexnf8v5NHKYSTTji4=
github.com/onsi/ginkgo/v2 v2.28.3/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44=
github.com/onsi/gomega v1.40.0 h1:Vtol0e1MghCD2ZVIilPDIg44XSL9l2QAn8ZNaljWcJc=
github.com/onsi/gomega v1.40.0/go.mod h1:M/Uqpu/8qTjtzCLUA2zJHX9Iilrau25x1PdoSRbWh5A=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
github.com/ovn-kubernetes/ovn-kubernetes-mcp v0.0.0-20260605095148-52ec23dbc6b1 h1:yKbkH3yujV7ojV7O1o4QQjuQliyZdcuLpIZ+yNoRrkA=
github.com/ovn-kubernetes/ovn-kubernetes-mcp v0.0.0-20260605095148-52ec23dbc6b1/go.mod h1:R/Q8gRkYAIjOqrKe576AHveESEmhDIxBCuSfiY7rIB0=
github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o=
github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI=
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
Expand Down
1 change: 1 addition & 0 deletions pkg/mcp/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
_ "github.com/containers/kubernetes-mcp-server/pkg/toolsets/netedge"
_ "github.com/containers/kubernetes-mcp-server/pkg/toolsets/oadp"
_ "github.com/containers/kubernetes-mcp-server/pkg/toolsets/openshift"
_ "github.com/containers/kubernetes-mcp-server/pkg/toolsets/ovnkubernetes"
_ "github.com/containers/kubernetes-mcp-server/pkg/toolsets/tekton"
_ "github.com/rhobs/obs-mcp/pkg/toolset"
)
283 changes: 283 additions & 0 deletions pkg/mcp/testdata/toolsets-ovn-kubernetes-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,283 @@
[
{
"annotations": {
"openWorldHint": true,
"readOnlyHint": true,
"title": "OVN-Kubernetes: OVS Dump Conntrack"
},
"description": "Dump connection tracking entries from OVS datapath.\n\nRuns 'ovs-appctl dpctl/dump-conntrack' command and returns the conntrack entries.\n\nParameters:\n- namespace: Kubernetes namespace of the OVS pod\n- name: Name of the pod running OVS\n- filter (optional): Regex pattern to filter conntrack entries\n- additional_params (optional): Additional parameters (e.g., [\"zone=5\"])\n- head (optional): Return only first N lines\n- tail (optional): Return only last N lines",
"inputSchema": {
"properties": {
"additional_params": {
"description": "Additional parameters to pass to dpctl/dump-conntrack (e.g., [\"zone=5\"])",
"items": {
"type": "string"
},
"type": "array"
},
"apply_tail_first": {
"description": "If both head and tail are set and apply_tail_first is true, apply tail before head. Default: false",
"type": "boolean"
},
"filter": {
"description": "Regex pattern to filter conntrack entries",
"type": "string"
},
"head": {
"description": "Return only first N lines. Default: 100 lines if tail is not specified",
"type": "integer"
},
"name": {
"description": "Name of the pod running OVS (e.g., \"ovnkube-node-xxxxx\")",
"type": "string"
},
"namespace": {
"description": "Kubernetes namespace of the OVS pod (e.g., \"openshift-ovn-kubernetes\")",
"type": "string"
},
"tail": {
"description": "Return only last N lines",
"type": "integer"
}
},
"required": [
"namespace",
"name"
],
"type": "object"
},
"name": "ovs_appctl_dump_conntrack",
"title": "OVN-Kubernetes: OVS Dump Conntrack"
},
{
"annotations": {
"openWorldHint": true,
"readOnlyHint": true,
"title": "OVN-Kubernetes: OVS Ofproto Trace"
},
"description": "Trace a packet through the OpenFlow pipeline.\n\nRuns 'ovs-appctl ofproto/trace' command to simulate packet processing through OpenFlow tables.\n\nParameters:\n- namespace: Kubernetes namespace of the OVS pod\n- name: Name of the pod running OVS\n- bridge: Name of the OVS bridge (e.g., \"br-int\")\n- flow: Flow specification (e.g., \"in_port=1,ip,nw_src=10.244.0.5,nw_dst=10.96.0.1\")\n- filter (optional): Regex pattern to filter trace output\n- head (optional): Return only first N lines\n- tail (optional): Return only last N lines",
"inputSchema": {
"properties": {
"apply_tail_first": {
"description": "If both head and tail are set and apply_tail_first is true, apply tail before head. Default: false",
"type": "boolean"
},
"bridge": {
"description": "Name of the OVS bridge (e.g., \"br-int\")",
"type": "string"
},
"filter": {
"description": "Regex pattern to filter trace output",
"type": "string"
},
"flow": {
"description": "Flow specification describing the packet to trace (e.g., \"in_port=1,ip,nw_src=10.244.0.5,nw_dst=10.96.0.1\")",
"type": "string"
},
"head": {
"description": "Return only first N lines. Default: 100 lines if tail is not specified",
"type": "integer"
},
"name": {
"description": "Name of the pod running OVS (e.g., \"ovnkube-node-xxxxx\")",
"type": "string"
},
"namespace": {
"description": "Kubernetes namespace of the OVS pod (e.g., \"openshift-ovn-kubernetes\")",
"type": "string"
},
"tail": {
"description": "Return only last N lines",
"type": "integer"
}
},
"required": [
"namespace",
"name",
"bridge",
"flow"
],
"type": "object"
},
"name": "ovs_appctl_ofproto_trace",
"title": "OVN-Kubernetes: OVS Ofproto Trace"
},
{
"annotations": {
"openWorldHint": true,
"readOnlyHint": true,
"title": "OVN-Kubernetes: OVS List Bridges"
},
"description": "List all OVS bridges on a specific pod.\n\nRuns 'ovs-vsctl list-br' command and returns the names of all configured bridges.\n\nParameters:\n- namespace: Kubernetes namespace of the OVS pod\n- name: Name of the pod running OVS",
"inputSchema": {
"properties": {
"name": {
"description": "Name of the pod running OVS (e.g., \"ovnkube-node-xxxxx\")",
"type": "string"
},
"namespace": {
"description": "Kubernetes namespace of the OVS pod (e.g., \"openshift-ovn-kubernetes\")",
"type": "string"
}
},
"required": [
"namespace",
"name"
],
"type": "object"
},
"name": "ovs_list_br",
"title": "OVN-Kubernetes: OVS List Bridges"
},
{
"annotations": {
"openWorldHint": true,
"readOnlyHint": true,
"title": "OVN-Kubernetes: OVS List Interfaces"
},
"description": "List all interfaces on a specific OVS bridge.\n\nRuns 'ovs-vsctl list-ifaces' command and returns the names of all interfaces attached to the specified bridge.\n\nParameters:\n- namespace: Kubernetes namespace of the OVS pod\n- name: Name of the pod running OVS\n- bridge: Name of the OVS bridge (e.g., \"br-int\")",
"inputSchema": {
"properties": {
"bridge": {
"description": "Name of the OVS bridge (e.g., \"br-int\")",
"type": "string"
},
"name": {
"description": "Name of the pod running OVS (e.g., \"ovnkube-node-xxxxx\")",
"type": "string"
},
"namespace": {
"description": "Kubernetes namespace of the OVS pod (e.g., \"openshift-ovn-kubernetes\")",
"type": "string"
}
},
"required": [
"namespace",
"name",
"bridge"
],
"type": "object"
},
"name": "ovs_list_ifaces",
"title": "OVN-Kubernetes: OVS List Interfaces"
},
{
"annotations": {
"openWorldHint": true,
"readOnlyHint": true,
"title": "OVN-Kubernetes: OVS List Ports"
},
"description": "List all ports on a specific OVS bridge.\n\nRuns 'ovs-vsctl list-ports' command and returns the names of all ports attached to the specified bridge.\n\nParameters:\n- namespace: Kubernetes namespace of the OVS pod\n- name: Name of the pod running OVS\n- bridge: Name of the OVS bridge (e.g., \"br-int\")",
"inputSchema": {
"properties": {
"bridge": {
"description": "Name of the OVS bridge (e.g., \"br-int\")",
"type": "string"
},
"name": {
"description": "Name of the pod running OVS (e.g., \"ovnkube-node-xxxxx\")",
"type": "string"
},
"namespace": {
"description": "Kubernetes namespace of the OVS pod (e.g., \"openshift-ovn-kubernetes\")",
"type": "string"
}
},
"required": [
"namespace",
"name",
"bridge"
],
"type": "object"
},
"name": "ovs_list_ports",
"title": "OVN-Kubernetes: OVS List Ports"
},
{
"annotations": {
"openWorldHint": true,
"readOnlyHint": true,
"title": "OVN-Kubernetes: OVS Dump Flows"
},
"description": "Dump OpenFlow flows from a specific OVS bridge.\n\nRuns 'ovs-ofctl dump-flows' command on the specified bridge and returns the flow entries.\n\nParameters:\n- namespace: Kubernetes namespace of the OVS pod\n- name: Name of the pod running OVS\n- bridge: Name of the OVS bridge (e.g., \"br-int\")\n- filter (optional): Regex pattern to filter flows\n- head (optional): Return only first N lines\n- tail (optional): Return only last N lines",
"inputSchema": {
"properties": {
"apply_tail_first": {
"description": "If both head and tail are set and apply_tail_first is true, apply tail before head. Default: false",
"type": "boolean"
},
"bridge": {
"description": "Name of the OVS bridge (e.g., \"br-int\")",
"type": "string"
},
"filter": {
"description": "Regex pattern to filter flows",
"type": "string"
},
"head": {
"description": "Return only first N lines. Default: 100 lines if tail is not specified",
"type": "integer"
},
"name": {
"description": "Name of the pod running OVS (e.g., \"ovnkube-node-xxxxx\")",
"type": "string"
},
"namespace": {
"description": "Kubernetes namespace of the OVS pod (e.g., \"openshift-ovn-kubernetes\")",
"type": "string"
},
"tail": {
"description": "Return only last N lines",
"type": "integer"
}
},
"required": [
"namespace",
"name",
"bridge"
],
"type": "object"
},
"name": "ovs_ofctl_dump_flows",
"title": "OVN-Kubernetes: OVS Dump Flows"
},
{
"annotations": {
"openWorldHint": true,
"readOnlyHint": true,
"title": "OVN-Kubernetes: OVS Show"
},
"description": "Display a comprehensive overview of OVS configuration.\n\nRuns 'ovs-vsctl show' command and returns detailed information about bridges, ports, interfaces,\ncontrollers, and their configurations in a hierarchical format.\n\nParameters:\n- namespace: Kubernetes namespace of the OVS pod\n- name: Name of the pod running OVS\n- head (optional): Return only first N lines. Default: 100 lines if tail is not specified\n- tail (optional): Return only last N lines\n- apply_tail_first (optional): If both head and tail are set and apply_tail_first is true, apply tail before head",
"inputSchema": {
"properties": {
"apply_tail_first": {
"description": "If both head and tail are set and apply_tail_first is true, apply tail before head. Default: false",
"type": "boolean"
},
"head": {
"description": "Return only first N lines. Default: 100 lines if tail is not specified",
"type": "integer"
},
"name": {
"description": "Name of the pod running OVS (e.g., \"ovnkube-node-xxxxx\")",
"type": "string"
},
"namespace": {
"description": "Kubernetes namespace of the OVS pod (e.g., \"openshift-ovn-kubernetes\")",
"type": "string"
},
"tail": {
"description": "Return only last N lines",
"type": "integer"
}
},
"required": [
"namespace",
"name"
],
"type": "object"
},
"name": "ovs_vsctl_show",
"title": "OVN-Kubernetes: OVS Show"
}
]
2 changes: 2 additions & 0 deletions pkg/mcp/toolsets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/containers/kubernetes-mcp-server/pkg/toolsets/kiali"
"github.com/containers/kubernetes-mcp-server/pkg/toolsets/kubevirt"
"github.com/containers/kubernetes-mcp-server/pkg/toolsets/openshift"
"github.com/containers/kubernetes-mcp-server/pkg/toolsets/ovnkubernetes"
"github.com/containers/kubernetes-mcp-server/pkg/toolsets/tekton"
"github.com/modelcontextprotocol/go-sdk/mcp"
"github.com/stretchr/testify/suite"
Expand Down Expand Up @@ -178,6 +179,7 @@ func (s *ToolsetsSuite) TestGranularToolsetsTools() {
&helm.Toolset{},
&kiali.Toolset{},
&kubevirt.Toolset{},
&ovnkubernetes.Toolset{},
&tekton.Toolset{},
}
for _, testCase := range testCases {
Expand Down
Loading