Kloudfuse MCP Server
Kloudfuse developed a Model Context Protocol (MCP) Server to help platform engineers and SREs diagnose problems in their environment. It acts as a bridge between an AI model and external tools or data sources. It translates the AI’s requests into queries that can be used to investigate problems/issues and provide insights to various systems.
There are two ways to run the Kloudfuse MCP Server:
-
Local — Run the MCP Server as a Docker container on your local machine.
-
Remote — Deploy the MCP Server on your Kloudfuse cluster and connect to it over HTTPS.
Local MCP Server
Run a local instance of the MCP Server with Docker. The MCP client launches the container and communicates with it directly.
Prerequisites
-
Docker is installed on your local machine
-
Access Kloudfuse Image Repo via API token (token.json)
-
Service Account Token
-
An MCP client
NOTE: This is a private Docker repository. You will need credentials from Kloudfuse to pull the MCP Server image
Installation
cat token.json | docker login -u _json_key --password-stdin https://us.gcr.io
docker pull us.gcr.io/mvp-demo-301906/kfuse/kf-mcp:latest
| After every Kloudfuse release, pull the latest Docker image to ensure you have the most up-to-date MCP Server. |
Client Configuration
This section provides configuration examples for connecting your MCP client to a local Kloudfuse MCP Server. The examples below use Claude Desktop, but the configuration approach can be adapted to other MCP clients.
You will need to add the following content to the claude_desktop_config.json
MacOS - ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows - %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"kf-mcp-<ALIAS>": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"KF_URL",
"-e",
"KF_TOKEN",
"us.gcr.io/mvp-demo-301906/kfuse/kf-mcp:latest"
],
"env": {
"KF_URL": "<KLOUDFUSE_URL>",
"KF_TOKEN": "<KLOUDFUSE_SERVICE_TOKEN>"
}
}
}
}
Replace the following values:
-
<ALIAS>: The name you want to use for reference when using your MCP client -
<KLOUDFUSE_URL>: Your Kloudfuse instance URL -
<KLOUDFUSE_SERVICE_TOKEN>: A Kloudfuse Service Account Token
Note: Access will be limited based upon the service token that is used.
Remote MCP Server
| This feature is available starting in Kloudfuse 3.5.3. |
Instead of running the MCP Server locally with Docker, you can deploy it directly on your Kloudfuse cluster. This eliminates the need for local Docker setup and allows any MCP client to connect to a centrally hosted server.
Prerequisites
-
A running Kloudfuse cluster (v3.5.3 or later)
-
Access to modify your
custom_values.yaml -
A Kloudfuse Service Account Token for authentication
Enabling Remote MCP
Add the following section to your custom_values.yaml:
kf-mcp:
enabled: true
After updating the configuration, run a Kloudfuse upgrade to apply the changes. Once the upgrade completes, the MCP Server will be available at:
https://<KLOUDFUSE_URL>/mcp
Replace <KLOUDFUSE_URL> with the address of your Kloudfuse instance.
Client Configuration
MCP clients can connect to the remote server using the URL above. All requests must include an authorization header with a valid Kloudfuse Service Account Token.
For example, in Claude Desktop’s claude_desktop_config.json:
{
"mcpServers": {
"kf-mcp-<ALIAS>": {
"type": "http",
"url": "https://<KLOUDFUSE_URL>/mcp",
"headers": {
"Authorization": "Bearer <KLOUDFUSE_SERVICE_TOKEN>"
}
}
}
}
Replace the following values:
-
<ALIAS>: A name for this MCP server connection (use a unique name per cluster) -
<KLOUDFUSE_URL>: Your Kloudfuse instance address -
<KLOUDFUSE_SERVICE_TOKEN>: A Kloudfuse Service Account Token
| Access is scoped to the permissions of the service token used. |
Using mcp-remote Proxy
If your MCP client does not support remote transport or authorization headers on the client side, you can use the mcp-remote local proxy to connect to the remote MCP Server.
For example, in Claude Desktop’s claude_desktop_config.json:
{
"mcpServers": {
"kf-mcp-<ALIAS>": {
"command": "npx",
"args": [
"mcp-remote",
"https://<KLOUDFUSE_URL>/mcp",
"--header",
"Authorization: Bearer <KLOUDFUSE_SERVICE_TOKEN>"
]
}
}
}
Replace <ALIAS>, <KLOUDFUSE_URL>, and <KLOUDFUSE_SERVICE_TOKEN> with your connection name, Kloudfuse instance address, and service account token.
MCP Prompts
The Model Context Protocol (MCP) provides a standardized method for servers to expose prompt templates to clients. These templates allow the MCP servers to provide structured messages and instructions for interacting with language models. The Kloudfuse MCP Server includes predefined MCP prompt templates. These templates have been tuned to improve query accuracy.
Note: If you have multiple Kloudfuse clusters, create multiple prompts to target each cluster. Otherwise, it might pull data from environments unrelated to the one you are investigating.
KF Assistant
To take advantage of the MCP Prompts, you need to use the kf_assistant.
The KF Assistant prompt provides:
-
Consistent Workflow - Guides AI agents through a structured troubleshooting workflow
-
Standardized Label usage - Uses existing labels to avoid LLM hallucinations and common mistakes
-
Data correlation - The agent will help correlate findings across the various data streams
Customization
To help the KF Assistant, you can disable items that you don’t want it to investigate.
1) Open the Claude AI Desktop
2) Click on the Prompt Button, and click the kf-mcp-${ALIAS} that you want to customize
3) From the Menu that appears you can disable/enable items to focus searches and improve performance. (By default, everything is enabled)
Usage
To use the KF Assistant you will need to select a specific assistant. In particular, you want to do this when you have multiple Assistants set up.
1) Open the Claude AI Desktop
2) Click on the Template Button
3) Click the kf-${KLOUDFUSE_SERVER} assistant you want to use
4) You will now see a prompt for that KF Assistant
These are example natural language queries that you can use with the KF Assistant:
Troubleshooting:
-
"Show me error logs for the payment service in the last hour"
-
"What traces have errors in the frontend service?"
-
"Which pods are crashing in the production namespace?"
Metrics Analysis:
-
"Query CPU usage for the payment service"
-
"What are the available metrics for the database service?"
-
"Show me memory utilization trends over the last 24 hours"
Infrastructure:
-
"List all pods in the production namespace"
-
"Show me the deployment configuration for the api service"
-
"What nodes are running in the cluster?"
Alerts:
-
"Show me all firing alerts"
-
"What alerts fired in the last 24 hours?"
-
"What is the query expression for the high-latency alert?"
Dependencies:
-
"What services does the frontend call?"
-
"Show me the service dependency graph"
-
"Which services depend on the database?"
Best Practices
When troubleshooting, these are some suggested approaches,
-
Provide environment details: Include details (service names, namespaces, clusters) about the environment you are investigating.
-
Use labels: Using labels will help limit searches to items you are researching. This will improve performance and give more accurate results.
-
Specify time ranges: Using specific time ranges will improve the response time and will narrow searches to issues that you are researching at the moment.