Skip to main content
Glama
ramraj-patel

query-layer

by ramraj-patel

MCP Server for Query Layer API

Ein MCP-Server (Model Context Protocol), der eine Query-Layer-API für Metriken für KI-Assistenten bereitstellt. Erstellt mit dem offiziellen Python MCP SDK v2.

Schnellstart

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

Öffnen Sie den MCP Inspector unter der in der Konsole ausgegebenen URL. Sie sehen, dass das ping-Tool verfügbar ist.

Related MCP server: prometheus-mcp

Cursor-Integration

Die Datei .cursor/mcp.json ist vorkonfiguriert. Starten Sie Cursor neu. Danach steht der MCP-Server query-layer dem KI-Assistenten zur Verfügung.

Lokales Tracing mit Phoenix (optional)

# 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

Sehen Sie sich Traces unter http://localhost:6006 an — Phoenix rendert MCP-Tool-Aufrufe, Prompts und GenAI-Spans nativ.

Dokumentation

Dokument

Zweck

Plan

Problemstellung, Lösungsansatz, Umsetzungsplan

Review

Prüfung des Plans auf Produktionsreife

Design

MCP-Konzepte, Technologieentscheidungen, Designentscheidungen

Getting Started

Einrichtung, Installation, Start, Konfiguration, Fehlerbehebung

Observability

Logging, Tracing, OTLP, lokales Phoenix

Projektstruktur

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

Lizenz

Apache 2.0 — siehe 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