Loki MCP Server
A read-only MCP server for Grafana Loki that allows AI agents to discover labels, execute bounded LogQL queries, count log lines by label or time, and export logs to local files. It supports multiple Loki instances and requires JDK 21 for building or uses a prebuilt JAR.
Package and access
Local package with source-attributed installation metadata. Koskamo does not execute packages during review.
What you can do with it
- Discover label names and values in Loki stream sets
- Read bounded pages of LogQL query results
- Count matching log lines by label or time bucket
- Export matching log lines to a local file
Source and maintenance
- Maintenance checked
Packages and installation
Source-provided package data. Koskamo has not executed or live-probed this package.
ghcr.io/igorolv/loki-mcp-server:0.1.0
{
"transport": "stdio",
"identifier": "ghcr.io/igorolv/loki-mcp-server:0.1.0",
"registryType": "oci",
"runtimeArguments": [
{
"name": "--mount",
"type": "named",
"value": "type=bind,src={data_dir},dst=/data",
"variables": {
"data_dir": {
"format": "filepath",
"isRequired": true,
"description": "Host directory containing connections.json (for example ~/.loki-mcp-server)"
}
},
"isRequired": true,
"description": "Host directory holding connections.json; the server also writes its logs and default exports there."
}
]
}Tools
Reported by the attributed source; not independently observed by Koskamo.
Connect from your client
Each snippet configures the same source-provided package; replace placeholders before use.
Cursor
{
"mcpServers": {
"loki-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/igorolv/loki-mcp-server:0.1.0"
]
}
}
}Cline
{
"mcpServers": {
"loki-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/igorolv/loki-mcp-server:0.1.0"
]
}
}
}VS Code
{
"servers": {
"loki-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/igorolv/loki-mcp-server:0.1.0"
]
}
}
}Claude Desktop
{
"mcpServers": {
"loki-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/igorolv/loki-mcp-server:0.1.0"
]
}
}
}Let your agent find its tools
Find servers like Loki MCP Server from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.