tiny-loki-mcp
Provides read-only access to Grafana Loki logs, allowing agents to query log labels, values, and recent logs via LogQL without exposing Loki's full API.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tiny-loki-mcpshow me recent logs from the web service"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
tiny-loki-mcp
tiny-loki-mcp is a small read-only Model Context Protocol server for Grafana
Loki. It exposes a narrow set of tools for agents that need to inspect recent
logs without learning Loki's HTTP API.
Tools
loki_labels: list available label names.loki_label_values: list values for one label.loki_query: run a bounded LogQL range query.loki_recent: fetch recent logs by optional host and service labels.
All tools are read-only. The server does not expose Loki delete, admin, or push APIs.
Related MCP server: Grafana-Loki MCP Server
Configuration
Environment variables:
LOKI_URL: Loki base URL. Defaults tohttp://127.0.0.1:3100.LOKI_MAX_LIMIT: maximum entries per query. Defaults to500.LOKI_MAX_LOOKBACK_SECONDS: maximum lookback window. Defaults to86400.LOKI_TIMEOUT_MS: HTTP request timeout. Defaults to10000.
Run
npm install
npm run build
LOKI_URL=http://127.0.0.1:3100 node dist/index.jsMCP Client Example
{
"mcpServers": {
"tiny-loki": {
"command": "node",
"args": ["/path/to/tiny-loki-mcp/dist/index.js"],
"env": {
"LOKI_URL": "http://127.0.0.1:3100"
}
}
}
}Safety
The server caps query limits and lookback windows. It returns compact records with labels, timestamp, and line content instead of raw Loki responses.
Dependency Updates
Dependency updates are managed by Dependabot through .github/dependabot.yml.
Dependabot opens weekly grouped PRs for npm and GitHub Actions updates. These
PRs are never auto-merged; review and run the normal verification path before
merge.
Releases
Releases use semantic versioning with vMAJOR.MINOR.PATCH tags. Release notes
are tracked in CHANGELOG.md. Package publishing is not enabled.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables AI agents to query Prometheus metrics and Loki logs for intelligent alert investigation and troubleshooting. Provides service discovery, metric querying, log searching, and correlation tools to help identify root causes of issues.Last updated9
- Alicense-qualityDmaintenanceEnables querying and formatting Loki logs from Grafana via the Model Context Protocol. It supports LogQL queries, label retrieval, and provides results in text, JSON, or markdown formats.Last updated29MIT
- Flicense-qualityDmaintenanceEnables AI models to query and analyze Kubernetes cluster logs through Grafana Loki, supporting semantic operations like error aggregation and pod restart detection. It provides tools for regex-based log searching and namespace discovery to facilitate natural language troubleshooting.Last updated
- AlicenseBqualityCmaintenanceAn MCP server for querying Grafana Loki directly with a discovery-first workflow — labels, values, series, and LogQL queries without requiring Grafana.Last updated55MIT
Related MCP Connectors
Read-only access to Auralogs production logs: search logs, inspect errors, review AI analyses.
Run SOQL queries to explore and retrieve Salesforce data. Inspect records, fields, and relationshi…
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
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/myers-gh1328/tiny-loki-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server