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-20260521143347-5fe0e0972cd5
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-20260521143347-5fe0e0972cd5 h1:LKCR4P9D2wR2D1wJlhv887at5/odYJ/Ohk7IoXtTWkk=
github.com/ovn-kubernetes/ovn-kubernetes-mcp v0.0.0-20260521143347-5fe0e0972cd5/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 @@ -9,6 +9,7 @@ import (
_ "github.com/containers/kubernetes-mcp-server/pkg/toolsets/kubevirt"
_ "github.com/containers/kubernetes-mcp-server/pkg/toolsets/netedge"
_ "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"
)
236 changes: 236 additions & 0 deletions pkg/mcp/testdata/toolsets-ovn-kubernetes-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
[
{
"annotations": {
"idempotentHint": true,
"openWorldHint": true,
"readOnlyHint": true,
"title": "OVN: Get"
},
"description": "Query records from an OVN database table with flexible filtering.\n\nCan list all records in a table (when no record specified) or get a specific record (when record specified).\n\nCommon Northbound tables: Logical_Switch, Logical_Router, Logical_Switch_Port, Logical_Router_Port, ACL, Address_Set, Port_Group, Load_Balancer, NAT.\nCommon Southbound tables: Chassis, Port_Binding, Datapath_Binding, Logical_Flow, MAC_Binding, Multicast_Group, SB_Global.",
"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"
},
"columns": {
"description": "Comma-separated list of columns to display (e.g., \"name,_uuid,ports\")",
"type": "string"
},
"database": {
"description": "OVN database to query - \"nbdb\" for Northbound or \"sbdb\" for Southbound",
"enum": [
"nbdb",
"sbdb"
],
"type": "string"
},
"head": {
"description": "Return only first N lines (default: 100 if tail is not specified)",
"minimum": 1,
"type": "integer"
},
"name": {
"description": "Name of the pod running OVN",
"type": "string"
},
"namespace": {
"description": "Kubernetes namespace of the OVN pod",
"type": "string"
},
"pattern": {
"description": "Regex pattern to filter results (only applies when listing all records)",
"type": "string"
},
"record": {
"description": "Record identifier (UUID or name). If not specified, lists all records",
"type": "string"
},
"table": {
"description": "Name of the OVN table (e.g., \"Logical_Switch\", \"Port_Binding\")",
"type": "string"
},
"tail": {
"description": "Return only last N lines",
"minimum": 1,
"type": "integer"
}
},
"required": [
"namespace",
"name",
"database",
"table"
],
"type": "object"
},
"name": "ovn_get",
"title": "OVN: Get"
},
{
"annotations": {
"idempotentHint": true,
"openWorldHint": true,
"readOnlyHint": true,
"title": "OVN: Logical Flow List"
},
"description": "List logical flows from the OVN Southbound database.\n\nRuns 'ovn-sbctl lflow-list' to retrieve logical flows which represent the compiled logical network pipeline. Essential for debugging packet forwarding.",
"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"
},
"datapath": {
"description": "Datapath name or UUID to filter flows for a specific logical switch/router",
"type": "string"
},
"head": {
"description": "Return only first N lines (default: 100 if tail is not specified)",
"minimum": 1,
"type": "integer"
},
"name": {
"description": "Name of the pod running OVN",
"type": "string"
},
"namespace": {
"description": "Kubernetes namespace of the OVN pod",
"type": "string"
},
"pattern": {
"description": "Regex pattern to filter flows",
"type": "string"
},
"tail": {
"description": "Return only last N lines",
"minimum": 1,
"type": "integer"
}
},
"required": [
"namespace",
"name"
],
"type": "object"
},
"name": "ovn_lflow_list",
"title": "OVN: Logical Flow List"
},
{
"annotations": {
"idempotentHint": true,
"openWorldHint": true,
"readOnlyHint": true,
"title": "OVN: Show"
},
"description": "Display a comprehensive overview of OVN configuration from either the Northbound or Southbound database.\n\nFor Northbound (nbdb): Runs 'ovn-nbctl show' and displays logical switches, logical routers, their ports, and connections between them.\nFor Southbound (sbdb): Runs 'ovn-sbctl show' and displays chassis information, port bindings, and their relationships.",
"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"
},
"database": {
"description": "OVN database to query - \"nbdb\" for Northbound or \"sbdb\" for Southbound",
"enum": [
"nbdb",
"sbdb"
],
"type": "string"
},
"head": {
"description": "Return only first N lines (default: 100 if tail is not specified)",
"minimum": 1,
"type": "integer"
},
"name": {
"description": "Name of the pod running OVN (e.g., \"ovnkube-node-xxxxx\")",
"type": "string"
},
"namespace": {
"description": "Kubernetes namespace of the OVN pod (e.g., \"openshift-ovn-kubernetes\")",
"type": "string"
},
"tail": {
"description": "Return only last N lines",
"minimum": 1,
"type": "integer"
}
},
"required": [
"namespace",
"name",
"database"
],
"type": "object"
},
"name": "ovn_show",
"title": "OVN: Show"
},
{
"annotations": {
"idempotentHint": true,
"openWorldHint": true,
"readOnlyHint": true,
"title": "OVN: Trace"
},
"description": "Trace a packet through the OVN logical network.\n\nRuns 'ovn-trace' to simulate packet processing through the logical network pipeline. Shows which logical flows match, what actions are taken, and the final disposition. Essential for debugging connectivity issues.\n\nMicroflow examples:\n- inport==\"pod1\" \u0026\u0026 eth.src==00:00:00:00:00:01 \u0026\u0026 ip4.src==10.244.0.5 \u0026\u0026 ip4.dst==10.244.1.5\n- inport==\"pod1\" \u0026\u0026 eth.src==00:00:00:00:00:01 \u0026\u0026 icmp \u0026\u0026 ip4.src==10.244.0.5 \u0026\u0026 ip4.dst==8.8.8.8",
"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"
},
"datapath": {
"description": "Name of the logical switch or router to start the trace",
"type": "string"
},
"head": {
"description": "Return only first N lines (default: 100 if tail is not specified)",
"minimum": 1,
"type": "integer"
},
"microflow": {
"description": "Microflow specification describing the packet to trace",
"type": "string"
},
"mode": {
"description": "Output verbosity mode (default: \"detailed\")",
"enum": [
"detailed",
"summary",
"minimal"
],
"type": "string"
},
"name": {
"description": "Name of the pod running OVN",
"type": "string"
},
"namespace": {
"description": "Kubernetes namespace of the OVN pod",
"type": "string"
},
"pattern": {
"description": "Regex pattern to filter trace output",
"type": "string"
},
"tail": {
"description": "Return only last N lines",
"minimum": 1,
"type": "integer"
}
},
"required": [
"namespace",
"name",
"datapath",
"microflow"
],
"type": "object"
},
"name": "ovn_trace",
"title": "OVN: Trace"
}
]
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