Loki MCP Server — AI skill for Claude Code
Read-only MCP server for Grafana Loki: lets AI agents (Claude Code, Cursor, Copilot) discover labels, read bounded LogQL pages, count lines by label or time, and export logs — across several Loki stan.
How to install Loki MCP Server
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open igorolv/loki-mcp-server and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Loki MCP Server does
Read-only MCP server for Grafana Loki: lets AI agents (Claude Code, Cursor, Copilot) discover labels, read bounded LogQL pages, count lines by label or time, and export logs — across several Loki stands
Alternatives in AI
- Engage.Scorecard — Calibrate model verdict trust (Wilson-bounded miss-rate) to short-circuit re-validation 348 ★
- Claude Code Sourcemap Learning Notebook — Reverse-engineering Claude Code's 512K+ lines of TypeScript — architecture, design decisions, and 11 transfera 160 ★
- Deterministic Agent Control Protocol — Governance gateway for AI agents — bounded, auditable, session-aware control with MCP proxy, shell proxy & HTT 88 ★
README
Loki MCP Server
[](https://github.com/igorolv/loki-mcp-server/actions/workflows/build.yml) [](https://github.com/igorolv/loki-mcp-server/releases/latest) [](LICENSE) [](https://adoptium.net/) [](https://modelcontextprotocol.io/) [](https://glama.ai/mcp/servers/igorolv/loki-mcp-server) [](https://mcpservers.org/servers/igorolv/loki-mcp-server)
A local stdio MCP server for reading Grafana Loki with an agent. It exposes five text tools and supports Loki 2.6.1 and 3.x. Loki itself is read only; the only write is a local exportLogs file.
| Tool | Purpose |
|---|---|
| listConnections | Show configured stands, operator hints and effective tool limits |
| discoverLogs | List label names, values of one label, matching stream label sets, or values among those sets |
| queryLogs | Read newest or oldest bounded pages of a LogQL log query as compact text; raw=true previews returned lines and stream labels |
| countLogs | Count matching lines on Loki, optionally by label, clock aligned time bucket or both |
| exportLogs | Save matching lines to a local file, raw or rendered with a template |
Every data tool requires an explicit connection. queryLogs, countLogs and exportLogs require a LogQL **log query**, such as {app="backend"} |= "ERROR". Use discoverLogs to find label names, values and real combinations in stream label sets. The server builds only the count_over_time expression for countLogs; it does not infer filters or interpret causes. Tool responses
Related Skills
Ctx Forge
The context engineering CLI for AI coding agents. Assemble, count, remember, and export perfect context bundle
Cocommit
Count the commits you and an AI agent wrote together — an SVG card for your GitHub profile, from git history r
AI CLI Observability
Self-hosted OpenTelemetry observability stack for Codex, Claude Code, and Gemini CLI, with Grafana dashboards
Sdlc Rightsize
Discover eligible routes, plan bounded local evaluations, and render a Pareto model-task map.
Worldclass AI Design
把 AI 从「安全、平均、紫渐变」的委员会设计,推进到有独立视觉身份的设计。Discover→Define→Deliver 三阶段 + 7 项技术,附完整实战案例(纸带流水记账工具,Pages 即在线演示)。Source
Frontend Inspo MCP
Local MCP server that lets AI coding agents (Claude, Cursor, Kiro) discover and pull real frontend code & UI c
Related Agents
Agentic Auditor
PYA specialist spawned by the /pya orchestrator. Audits AI agent and LLM surfaces in an untrusted repository:
Orch Scout
Cheap-tier mechanical worker for the orchestrator. Use for Class: scan work — grep, glob, list, count, fetch a
Label Classifier
Assigns type:, priority:, effort: labels to a backlog item, each with one-line reasoning. Returns 'unclear' pe