技能潮 SkillTide 提交收录
官方说明7 个来源MCP 服务8 天前
incu6us/loki-mcp-server

incu6us/loki-mcp-server

Query Grafana Loki dir
在 GitHub 查看 ↗直链 · 无中转页
配置模板(请按你的客户端调整)
claude mcp add loki-mcp-server -- npx -y loki-mcp-server
这是根据仓库名生成的可粘贴骨架,命令行参数与包名请以该项目 README 为准。
★ 数取值
7 ★ · incu6us/loki-mcp-server · 取自 GitHub 搜索 API · (2026-10-16 20:00:20 核对)
来源明细
收录自 punkpeye/awesome-mcp-servers 榜单(我们从中收集的条目之一) · 条目类型:MCP 服务
收录与活跃
收录于 2026-10-09 · 最近见到 2026-10-16 · 共见到 32 次 · 被 7 个来源列出
评分构成
综合分 703 · 7 ★ · 7 个来源 · mcp
常见问题(答案都来自我们的记录)
怎么安装?
我们【没有】从该仓库取到安装命令(我们的 install 覆盖率只有约 4%)。请看它的 README 或 releases 页。
它适合谁 / 用来做什么?
我们把它归在这些标签下: MCP 服务。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
仓库 incu6us/loki-mcp-server;我们收录于 2026-10-09;最近见到 2026-10-16。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。
第三方质量标记

Loki MCP Server

以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →

Query Grafana Loki logs directly from AI agents using the Model Context Protocol (MCP).
Built in Go. Enables AI-powered log analysis using LogQL.
Supports integration with:
- Claude Desktop
- AI agent frameworks
- automation tools
- DevOps workflows
Motivation
The official grafana/loki-mcp exposes a single loki_query tool, which means the LLM must already know valid label names and values before it can build a query. This project takes a different approach by providing **5 granular tools** — labels, label_values, and series let the LLM discover what's available in Loki first, then construct precise query_range or query calls. The result is more accurate log retrieval with fewer wasted round-trips.
Additionally, this server enforces **strict input validation** (limit caps, direction validation, label name format checks, mutually exclusive auth) to surface errors early instead of forwarding bad requests to Loki.
Features
- **query_range** — Execute LogQL range queries to fetch logs over a time window
- **query** — Execute LogQL instant queries for point-in-time evaluation
- **labels** — List all available label names
- **label_values** — List values for a specific label
- **series** — Find active log stream series matching a selector
Installation
Homebrew
Go install
Or build from source:
Configuration
The server is configured entirely via environment variables, injected by the MCP client.
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| LOKI_URL | yes | — | Base URL of the Loki instance |
| LOKI_USERNAME | no | — | Basic auth username |
| LOKI_PASSWORD | no | — | Basic auth password |
| LOKI_BEARER_TOKEN | no | — | Bearer token authentication |
| LOKI_TLS_SKIP_VERIFY | no | false | Skip TLS certificate verification |
| LOKI_TENANT_ID | no | — | X-Scope-OrgID header for multi-tenant deployments |
| LOKI_HTTP_TIMEOUT | no | 30s | HTTP request timeout (Go duration, e.g. 10s, 1m) |
| MCP_HTTP_ADDR | no | — | Listen address for the streamable HTTP transport, e.g. :8080. Unset means stdio |
> **Note:** Basic auth (LOKI_USERNAME/LOKI_PASSWORD) and bearer token (LOKI_BEARER_TOKEN) are mutually exclusive.
Transports
By default the server speaks MCP over stdio, which is what Claude Code, Claude Desktop
and most local clients expect.
Set MCP_HTTP_ADDR to serve the streamable HTTP transport instead, for running the
server as a remote endpoint behind a proxy or gateway:
The HTTP mode is stateless, so it can run behind a load balancer with several replicas.
It carries no authentication of its own — put it behind TLS and an authenticating proxy
before exposing it, and remember that whoever reaches the endpoint can read every log
line the configured LOKI_URL credentials can see.
Usage with Claude Code
Add to your Claude Code MCP configuration (~/.claude.json):
Usage with Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
Tools
query_range
Execute a LogQL range query against Loki to fetch logs over a time window.
| Parameter | Type | Required | Default | Description |
来源
awesome · https://github.com/incu6us/loki-mcp-server
按领域浏览
MCP 服务
Traction
7 ★
收录于
昨天

更多MCP 服务

查看MCP 服务全部 5,525 条 →

所属领域与标签

每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。

浏览全部领域 →

← 返回索引