Skip to main content
Glama
ramraj-patel

query-layer

by ramraj-patel

Servidor MCP para Query Layer API

Un servidor MCP (Model Context Protocol) que expone una API de capa de consultas de métricas a asistentes de IA. Creado con el SDK oficial de MCP para Python v2.

Inicio rápido

# Prerequisites: Python 3.10+, uv
uv sync
uv run mcp dev src/server.py

Abra el MCP Inspector en la URL que se muestra en la consola. Verá la herramienta ping disponible.

Related MCP server: prometheus-mcp

Integración con Cursor

El archivo .cursor/mcp.json está preconfigurado. Reinicie Cursor y el servidor MCP query-layer estará disponible para el asistente de IA.

Trazado local con Phoenix (Opcional)

# Terminal 1: start Phoenix
uv run phoenix serve

# Terminal 2: run the server pointing at Phoenix
export PHOENIX_COLLECTOR_ENDPOINT=http://localhost:6006
uv run mcp dev src/server.py

Vea las trazas en http://localhost:6006 — Phoenix renderiza de forma nativa las llamadas a herramientas MCP, los prompts y los spans de GenAI.

Documentación

Document

Purpose

Plan

Descripción general, enfoque de la solución, plan de implementación

Review

Revisión del plan de nivel de producción

Design

Conceptos de MCP, opciones tecnológicas, decisiones de diseño

Getting Started

Puesta en marcha, instalación, ejecución, configuración y resolución de problemas

Observability

Registro, trazado, OTLP y Phoenix local

Estructura del proyecto

src/
  server.py          # MCPServer + tools (entry point)
  logging_config.py  # Structured JSON logging to stderr
  otel_config.py     # OpenTelemetry exporter configuration
.cursor/
  mcp.json           # Cursor MCP server configuration
docs/
  plan.md            # Full implementation plan
  review.md          # Plan review
  design.md          # Design document
  getting-started.md # Setup guide
  observability.md   # Observability guide

Licencia

Apache 2.0 — consulte LICENSE.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Provides access to Prometheus metrics and queries through standardized Model Context Protocol interfaces, allowing AI assistants to execute PromQL queries and analyze metrics data.
    6
    521
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Provides seamless integration between AI assistants and Prometheus, enabling natural language interactions with your monitoring infrastructure. This server allows for effortless querying, discovery, and analysis of metrics.
    10
    497 npm
    27
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to query Prometheus metrics, monitor alerts, and analyze system health through read-only access to your Prometheus server with built-in query safety and optional AI-powered metric analysis.
    MIT