spring-mcp-kubernetes
A Spring Boot application that uses Spring AI's spring-ai-starter-mcp-server. It leverages the Kubernetes client library to interact with the Kubernetes API.
Features
- Communicates with MCP via stdio
- Integrates with Kubernetes using the official client library: https://github.com/kubernetes-client
- Built with Java, Spring Boot, and Gradle
Getting Started
Prerequisites
- Java 17 or higher
- Gradle 7.x or higher
- Access to a Kubernetes cluster
Build
./gradlew build
Run
java -jar build/libs/spring-mcp-kubernetes-\<version\>.jar
Configuration
Create an mcp.json configuration file for your stdio Spring Boot application:
{
"servers": {
"mcp-server-name": {
"command": "java",
"args": [
"-jar",
"path\\to\\your\\jar"
]
}
}
}
Usage
- Build the project using Gradle.
- Configure your
mcp.jsonas shown above. - Start the application with the appropriate command.