Karma MCP Server

Karma MCP Server

Enables Claude to interact with Karma Alert dashboard to monitor and analyze Kubernetes alerts. Provides tools to check alert status, filter by cluster/severity, get detailed alert information, and analyze alert statistics and trends.

Category
Visit Server

README

Karma MCP Server

Simple MCP server for integrating Claude with Karma Alert dashboard.

Quick Start

1. Install dependencies

uv pip install -e .

2. Configure environment

cp .env.example .env
# Edit .env and set KARMA_URL to your Karma instance

3. Test with your Karma instance

# Port forward to your Karma instance (if in Kubernetes)
kubectl port-forward svc/karma 8080:80 -n monitoring

# Set environment variable
export KARMA_URL=http://localhost:8080

# Test the MCP tools (optional)
uv run python tests/manual/test_mcp_tools.py

# Run the server
cd src && python -m karma_mcp.server

4. Using Docker (Alternative)

# Build the Docker image
./docker/build.sh

# Run with Docker
KARMA_URL=http://your-karma-url:8080 ./docker/run.sh

# Or use docker-compose
cp .env.docker .env
# Edit .env with your settings
docker-compose up -d

5. Configure in Claude Desktop

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "karma": {
      "command": "python",
      "args": ["-m", "karma_mcp.server"],
      "env": {
        "KARMA_URL": "http://localhost:8080"
      }
    }
  }
}

Available Tools

  • check_karma: Check connection to Karma server
  • list_alerts: List all active alerts with basic info
  • get_alerts_summary: Get statistical summary of alerts by severity and state
  • get_alert_details: Get detailed information about a specific alert by name
  • list_clusters: List all available Kubernetes clusters with alert counts
  • list_alerts_by_cluster: Filter alerts by specific cluster name

How it works

This MCP server connects to your Karma Alert dashboard API and provides tools for Claude to:

  1. Check if Karma is accessible
  2. Retrieve and display active alerts
  3. Filter alerts by cluster, severity, namespace, and state
  4. Get detailed information about specific alerts
  5. Analyze alert statistics and trends

The server uses the Karma JSON API endpoints to fetch alert data.

Testing

Manual testing scripts are available in tests/manual/:

# Test all MCP tools
uv run python tests/manual/test_mcp_tools.py

# Test cluster filtering
uv run python tests/manual/test_cluster_features.py

# Debug API responses
uv run python tests/manual/debug_data.py

See tests/manual/README.md for complete testing documentation.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Development Setup

# Clone the repository
git clone <repository-url>
cd karma-mcp

# Install dependencies
uv pip install -e .

# Set up pre-commit hooks (optional)
# pip install pre-commit
# pre-commit install

Running Tests

# Run manual tests
uv run python tests/manual/test_mcp_tools.py

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured