loki-tail-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | HTTP listen port. Default: 8325 | 8325 |
| LOKI_URL | No | Loki base URL. Default: http://loki:3100 | http://loki:3100 |
| LOKI_ALIASES | No | Extra vocabulary merged over the built-ins: term=fragment or term=frag|frag2, comma-separated. | |
| LOKI_TIMEOUT | No | Upstream request timeout (s). Default: 30 | 30 |
| LOKI_MAX_LIMIT | No | Row cap maximum. Default: 1000 | 1000 |
| LOKI_TENANT_ID | No | Sent as X-Scope-OrgID for multi-tenant Loki. | |
| LOKI_BASIC_AUTH | No | user:password for a basic-auth-fronted Loki (reverse proxy, Grafana Cloud). | |
| MCP_BEARER_TOKEN | No | Required in HTTP mode; server refuses to start without it. Not used in --stdio mode. | |
| LOKI_DEFAULT_LIMIT | No | Row cap. Default: 100 | 100 |
| LOKI_EPHEMERAL_PATTERNS | No | Comma-separated regexes marking names as ephemeral; replaces the defaults when set. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| loki_query_rangeA | Run a LogQL range query against Loki. query: LogQL expression, e.g. Returns compact |
| loki_query_instantA | Run a LogQL instant query at a single point in time. Best for metric queries like |
| loki_tail_containerA | Tail the most recent log lines for a single container. container: Container name (e.g. |
| loki_list_labelsA | List all label names Loki has seen in the given lookback window. lookback: Duration ( |
| loki_list_label_valuesA | List all values seen for a given label in the lookback window. label: Label name (e.g. |
| loki_patternsA | Mine a container's recent logs into recurring patterns — the fastest
way to summarize what a noisy service is saying. One call turns
thousands of lines into a ranked list of templates ( container: exact container name (use loki_list_containers / loki_tail_container to find it). minutes: how far back to mine. Default 60. Requires the Loki pattern ingester; only logs ingested after it was enabled are mined, so a small window right after enablement is normal. |
| loki_log_volumeA | Rank containers by log volume (bytes) — "which service suddenly got noisy". Leave container empty to rank the whole fleet; set it to scope to one container. minutes: window to measure. Default 60. limit: max rows. Default 10. |
| loki_detected_fieldsA | Discover the fields Loki can auto-extract from a container's logs
(name, type, cardinality, parser — e.g. logfmt/json). Use this before
writing a LogQL parse stage in loki_query_range, e.g. finding that a
service logs logfmt with a container: exact container name. minutes: window to sample. Default 60. limit: max fields. Default 20. |
| loki_list_containersA | List durable container names actively logging in the lookback window. Hides ephemeral noise — podman auto-names ( lookback: Duration ( |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/snickery/loki-tail-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server