Provides tools for querying AWS Managed Prometheus (AMP) using PromQL, supporting instant and range queries, and discovering metrics, labels, and label values.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Prometheus MCP ServerShow me the 99th percentile latency for the API service over the last hour"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Prometheus MCP Server
An MCP (Model Context Protocol) server for querying AWS Managed Prometheus (AMP) with SigV4 authentication. This server enables AI assistants to execute PromQL queries and discover metrics in a secure, VPC-isolated environment.
Features
SigV4 Authentication: Automatically signs requests using AWS credentials (supports EKS Pod Identity/IRSA)
5 MCP Tools:
query_instant- Execute instant PromQL queriesquery_range- Execute range queries for time series datalist_labels- Get all label namesget_label_values- Get values for a specific labellist_metrics- Get all metric names with optional metadata
VPC Isolation: Designed to run inside a VPC with no public exposure
Production Ready: Includes Terraform, Kubernetes manifests, and comprehensive testing
Architecture
Quick Start
Prerequisites
Python 3.11+
AWS CLI configured with credentials
Docker (for building container images)
Terraform 1.5+ (for infrastructure deployment)
kubectl (for Kubernetes deployment)
An SSH key pair in AWS
Local Development
Run Tests
Production Deployment
Step 1: Deploy Infrastructure with Terraform
Resources Created:
VPC with public/private subnets
EKS cluster with managed node group
AWS Managed Prometheus workspace
ECR repository
Bastion host for SSH access
IAM roles with Pod Identity
Step 2: Build and Push Docker Image
Step 3: Deploy to Kubernetes
Step 4: Verify Deployment
Testing via SSH Tunnel
Since the MCP server is only accessible within the VPC, use SSH tunneling to test from your laptop.
Method 1: Manual Setup (3 Terminals)
Terminal 1 - SSH to Bastion and Port-Forward:
Terminal 2 - SSH Tunnel:
Terminal 3 - MCP Inspector:
Method 2: Using the Test Script
This script will display all the commands you need to run.
Verify VPC Isolation
MCP Tools Reference
query_instant
Execute an instant PromQL query at a single point in time.
query_range
Execute a range query to get time series data.
list_labels
Get all label names.
get_label_values
Get all values for a specific label.
list_metrics
Get all metric names.
Configuration
Environment Variables
Variable | Description | Default |
| AMP workspace ID (required) | - |
| AWS region |
|
Terraform Variables
Variable | Description | Default |
| AWS region |
|
| SSH key pair name (required) | - |
| CIDR for SSH access |
|
| Kubernetes version |
|
| EKS node instance type |
|
| Bastion instance type |
|
Project Structure
Cleanup
To destroy all resources:
Or manually:
Security Considerations
VPC Isolation: The MCP server is only accessible via ClusterIP service within the EKS cluster
Pod Identity (IRSA): Uses AWS IAM roles for service accounts instead of static credentials
Least Privilege: IAM role only has permissions to query AMP, not write
No Public Endpoints: All access is via SSH tunnel through bastion
Container Security: Runs as non-root user with read-only filesystem
Troubleshooting
Pod not starting
IAM permissions issues
Cannot connect via SSH tunnel
License
MIT