cloud-native-mcp-server

module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2026 License: MIT

README

Cloud Native MCP Server

Go Report Card Go Version

🇨🇳 中文文档 | 🇬🇧 English

A high-performance Model Context Protocol (MCP) server for Kubernetes and cloud-native infrastructure management with 10 integrated services and 250+ tools.


Features

  • 10 Integrated Services: Kubernetes, Grafana, Prometheus, Kibana, Elasticsearch, Helm, Alertmanager, Jaeger, OpenTelemetry, Utilities
  • 210+ MCP Tools: Comprehensive toolset for infrastructure operations
  • Multi-Protocol Support: SSE and streamable-http modes
  • Smart Caching: LRU cache with TTL support for optimal performance
  • Performance Optimized: JSON encoding pool, response size control, intelligent limits
  • Enhanced Authentication: API Key (with complexity requirements), Bearer Token (JWT validation), Basic Auth
  • Secrets Management: Secure credential storage and rotation
  • Input Sanitization: Protection against injection attacks
  • Audit Logging: Track all tool calls and operations
  • LLM-Optimized: Summary tools and pagination to prevent context overflow

LLM Tool Calling Tips

  • Prefer summary and paginated tools first, then switch to full-detail tools only when needed.
  • Send structured JSON objects and arrays when a parameter represents an object or list; many handlers still accept legacy JSON strings for compatibility.
  • Use RFC3339 timestamps for Prometheus and tracing time fields.
  • For Kubernetes, omit namespace for cluster-scoped resources and include it for namespaced resources.
  • For Kibana, some handlers accept both camelCase and snake_case parameter aliases, but the schema name is still the preferred form.

Services Overview

Service Tools Description
kubernetes 34 Core container orchestration and resource management
helm 34 Application package management and deployment
grafana 43 Visualization, monitoring dashboards, and alerting
prometheus 20 Metrics collection, querying, and monitoring
kibana 73 Log analysis, visualization, and data exploration
elasticsearch 12 Log storage, search, and data indexing
alertmanager 16 Alert rules management and notifications
jaeger 8 Distributed tracing and performance analysis
opentelemetry 9 Metrics, traces, and logs collection and analysis
utilities 6 General-purpose utility tools

Total: 250+ tools


Quick Start

Binary
# Download the latest release
curl -LO https://github.com/mahmut-Abi/cloud-native-mcp-server/releases/latest/download/cloud-native-mcp-server-linux-amd64
chmod +x cloud-native-mcp-server-linux-amd64

# Run in SSE mode (default)
./cloud-native-mcp-server-linux-amd64 --mode=sse --addr=0.0.0.0:8080
Docker
docker run -d \
  --name cloud-native-mcp-server \
  -p 8080:8080 \
  -v ~/.kube:/root/.kube:ro \
  mahmutabi/cloud-native-mcp-server:latest
From Source
git clone https://github.com/mahmut-Abi/cloud-native-mcp-server.git
cd cloud-native-mcp-server

make build
./cloud-native-mcp-server --mode=sse --addr=0.0.0.0:8080

API Endpoints

SSE Mode
Endpoint Description
/api/aggregate/sse All services (recommended)
/api/kubernetes/sse Kubernetes service
/api/helm/sse Helm service
/api/grafana/sse Grafana service
/api/prometheus/sse Prometheus service
/api/kibana/sse Kibana service
/api/elasticsearch/sse Elasticsearch service
/api/alertmanager/sse Alertmanager service
/api/jaeger/sse Jaeger service
/api/opentelemetry/sse OpenTelemetry service
/api/utilities/sse Utilities service
Streamable-HTTP Mode

Use --mode=streamable-http to expose MCP streamable HTTP endpoints such as:

  • /api/aggregate/streamable-http
SSE Smoke Test

Validate SSE handshake and initialize end-to-end against a running server:

# without auth
make sse-smoke BASE_URL=http://127.0.0.1:8080

# with API key auth
API_KEY=your-key make sse-smoke BASE_URL=http://127.0.0.1:8080

Documentation


Build

# Build for current platform
make build

# Run tests
make test

# Code linting
make lint

# Docker build
make docker-build

Contributing

Contributions are welcome! Please read our contributing guidelines and submit pull requests.


License

MIT License - see LICENSE for details.

Directories

Path Synopsis
cmd
server command
internal
constants
Package constants defines common constants used across the cloud-native-mcp-server
Package constants defines common constants used across the cloud-native-mcp-server
secrets
Package secrets provides secure secrets management for API keys, tokens, and other sensitive data.
Package secrets provides secure secrets management for API keys, tokens, and other sensitive data.
services/alertmanager
Package alertmanager provides Alertmanager integration for the MCP server.
Package alertmanager provides Alertmanager integration for the MCP server.
services/alertmanager/client
Package client provides HTTP client for Alertmanager API operations.
Package client provides HTTP client for Alertmanager API operations.
services/alertmanager/tools
Package tools defines MCP tools for Alertmanager operations.
Package tools defines MCP tools for Alertmanager operations.
services/elasticsearch/client
Package client provides Elasticsearch HTTP client operations for the MCP server.
Package client provides Elasticsearch HTTP client operations for the MCP server.
services/grafana
Package grafana provides Grafana dashboard and monitoring integration for the MCP server.
Package grafana provides Grafana dashboard and monitoring integration for the MCP server.
services/grafana/cache
Package cache provides caching functionality for Grafana client operations.
Package cache provides caching functionality for Grafana client operations.
services/grafana/client
Package client provides Grafana HTTP API client functionality.
Package client provides Grafana HTTP API client functionality.
services/grafana/handlers
Package handlers provides HTTP request handlers for Grafana MCP tools.
Package handlers provides HTTP request handlers for Grafana MCP tools.
services/grafana/tools
Package tools provides Grafana MCP tools for dashboard and data source management.
Package tools provides Grafana MCP tools for dashboard and data source management.
services/helm
Package helm provides Helm chart and release management integration for the MCP server.
Package helm provides Helm chart and release management integration for the MCP server.
services/helm/client
Package client provides Helm client operations for the MCP server.
Package client provides Helm client operations for the MCP server.
services/helm/handlers
Package handlers provides MCP tool handlers for the Helm service.
Package handlers provides MCP tool handlers for the Helm service.
services/helm/tools
Package tools provides MCP tool definitions for the Helm service.
Package tools provides MCP tool definitions for the Helm service.
services/kibana
Package kibana provides Kibana integration for the MCP server.
Package kibana provides Kibana integration for the MCP server.
services/kibana/client
Package client provides Kibana HTTP API client functionality.
Package client provides Kibana HTTP API client functionality.
services/kibana/handlers
Package handlers provides HTTP handlers for Kibana MCP operations.
Package handlers provides HTTP handlers for Kibana MCP operations.
services/kibana/tools
Package tools provides MCP tool definitions for Kibana operations.
Package tools provides MCP tool definitions for Kibana operations.
services/kubernetes
Package kubernetes provides Kubernetes API integration for the MCP server.
Package kubernetes provides Kubernetes API integration for the MCP server.
services/kubernetes/client
Package client provides Kubernetes API client functionality with caching and optimization.
Package client provides Kubernetes API client functionality with caching and optimization.
services/opentelemetry
Package opentelemetry provides OpenTelemetry integration for the MCP server.
Package opentelemetry provides OpenTelemetry integration for the MCP server.
services/opentelemetry/client
Package client provides HTTP client for OpenTelemetry Collector API operations.
Package client provides HTTP client for OpenTelemetry Collector API operations.
services/opentelemetry/handlers
Package handlers provides tool handlers for OpenTelemetry operations.
Package handlers provides tool handlers for OpenTelemetry operations.
services/opentelemetry/tools
Package tools provides MCP tool definitions for OpenTelemetry operations.
Package tools provides MCP tool definitions for OpenTelemetry operations.
services/prometheus
Package prometheus provides Prometheus monitoring integration for the MCP server.
Package prometheus provides Prometheus monitoring integration for the MCP server.
services/prometheus/client
Package client provides Prometheus HTTP API client functionality.
Package client provides Prometheus HTTP API client functionality.
services/prometheus/handlers
Package handlers provides HTTP handlers for Prometheus MCP operations.
Package handlers provides HTTP handlers for Prometheus MCP operations.
services/prometheus/tools
Package tools provides MCP tool definitions for Prometheus operations.
Package tools provides MCP tool definitions for Prometheus operations.
services/tools
Package tools provides shared utilities for building and managing MCP tool definitions.
Package tools provides shared utilities for building and managing MCP tool definitions.
services/utilities
Package utilities provides general-purpose utility tools for the MCP server.
Package utilities provides general-purpose utility tools for the MCP server.
services/utilities/handlers
Package handlers provides MCP tool handlers for the utilities service.
Package handlers provides MCP tool handlers for the utilities service.
services/utilities/tools
Package tools provides MCP tool definitions for the utilities service.
Package tools provides MCP tool definitions for the utilities service.
util/sanitize
Package sanitize provides input sanitization utilities for security
Package sanitize provides input sanitization utilities for security

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL