https://github.com/upbound/controlplane-mcp-server
MCP Server providing various tools for working with a Control Plane
https://github.com/upbound/controlplane-mcp-server
ai crossplane crossplane-functions functions go golang intelligent-functions mcp mcp-server upbound upbound-ai upbound-crossplane upbound-official uxp xp
Last synced: 3 months ago
JSON representation
MCP Server providing various tools for working with a Control Plane
- Host: GitHub
- URL: https://github.com/upbound/controlplane-mcp-server
- Owner: upbound
- License: apache-2.0
- Created: 2025-07-03T03:15:04.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-08-12T19:23:32.000Z (11 months ago)
- Last Synced: 2025-08-12T21:25:05.990Z (11 months ago)
- Topics: ai, crossplane, crossplane-functions, functions, go, golang, intelligent-functions, mcp, mcp-server, upbound, upbound-ai, upbound-crossplane, upbound-official, uxp, xp
- Language: Go
- Homepage: https://docs.upbound.io
- Size: 78.1 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# controlplane-mcp-server
[](https://github.com/upbound/controlplane-mcp-server/actions/workflows/ci.yaml)
[](https://crossplane.slack.com/archives/C01TRKD4623)
[](https://github.com/upbound/controlplane-mcp-server/releases)
## Features
* Read Events: Look up events corresponding to the supplied pod.
* Read Pod Logs: Look up logs corresponding to the supplied pod.
## Example Usage with Intelligent Function
```yaml
apiVersion: pkg.crossplane.io/v1beta1
kind: DeploymentRuntimeConfig
metadata:
name: ctp-mcp
spec:
serviceAccountTemplate:
metadata:
# We need to provide additional permissions to the function. In order to
# do that we create a deterministic ServiceAccount name.
name: function-pod-analyzer
deploymentTemplate:
spec:
selector: {}
template:
spec:
containers:
- name: package-runtime
args:
- --debug
# Fine for local development (using crossplane render). Not fine
# when integrated with Crossplane.
# - --insecure
env:
# Inform the function of the CTP1 MCP Server.
# transport: http-stream indicates that we'll communicate with the
# MCP server over StreamableHTTP.
- name: MCP_SERVER_TOOL_CTP1_TRANSPORT
value: http-stream
# baseURL indicates which address and endpoint to reach out to for
# tooling.
- name: MCP_SERVER_TOOL_CTP1_BASEURL
value: http://localhost:8080/mcp
- name: controlplane-mcp-server
image: xpkg.upbound.io/upbound/controlplane-mcp-server:v0.1.0
args:
- --debug
```
Required Permissions for the function:
```yaml
---
# log-and-event-reader provides sufficient yet narrow scoped permissions for
# reading pod logs and events related to the pod.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: log-and-event-reader
rules:
# controlplane-mcp-server needs get/list on pods, pods/log, and events
# in order to retrieve information for analysis.
- apiGroups:
- ""
resources:
- events
- pods
- pods/log
verbs:
- get
- list
---
# Bind the above ClusterRole to the function's service account.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: log-and-event-reader
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: log-and-event-reader
subjects:
- kind: ServiceAccount
name: function-pod-analyzer
namespace: crossplane-system
```
Function Spec:
```yaml
---
apiVersion: pkg.crossplane.io/v1beta1
kind: Function
metadata:
name: function-claude
spec:
package: xpkg.upbound.io/upbound/function-claude:v0.1.0
runtimeConfigRef:
name: ctp-mcp
```
## Available Tools
1. get_pod_logs
Read the logs of the given container of the given Kubernetes pod in the given namespace.
Parameters:
* namespace (string, required): The Kubernetes namespace of the pod
* pod (string, required): The name of the Kubernetes pod
* container (string): The name of the container of the pod whose logs are being
read
2. get_pod_events
Read the events of the given Kubernetes pod in the given namespace.
Parameters:
* namespace (string, required): The Kubernetes namespace of the pod
* pod (string, required): The name of the Kubernetes pod
* container (string): The name of the container of the pod whose logs are being
read