OpenObserve MCP Server
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., "@OpenObserve MCP Serversearch logs for 'payment failed' errors in the last hour"
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.
OpenObserve MCP Server
Model Context Protocol server for querying OpenObserve from AI agents (Claude, Cursor, OpenCode, etc.).
Features
Multi-instance — query multiple OpenObserve deployments in a single call
Adaptive strategy — raw fetch ≤1 h, reservoir sampling 1–6 h, hourly aggregation 6 h–7 d, daily aggregation >7 d
Batch queries — parallel multi-query execution with configurable concurrency
LRU cache — TTL-based result caching with per-entry size cap
Cursor pagination — stateless pagination across instances via base64 cursors
Langfuse tracing — optional observability for every tool call
Related MCP server: openobserve-community-mcp
Installation
npm install -g openobserve-mcp
# or without installing:
npx openobserve-mcp --config /path/to/config.jsonConfiguration
Create a JSON config file:
{
"instances": [
{
"id": "prod",
"name": "Production",
"url": "https://openobserve.example.com",
"auth": { "type": "env", "envVar": "PROD_O2_TOKEN" },
"defaults": { "org": "default", "timeout": 30000, "maxResults": 1000 },
"capabilities": ["logs", "traces", "metrics"],
"tags": ["production"]
}
],
"batching": { "maxConcurrent": 5 },
"caching": { "enabled": true, "ttl": 300, "maxSize": 1000 }
}auth.envVar must point to an environment variable containing a Base64-encoded user:password string:
export PROD_O2_TOKEN=$(echo -n "user@example.com:password" | base64)Config can also be passed inline via the O2_MCP_CONFIG environment variable (JSON string).
MCP Client Setup
Claude Desktop / Cursor — add to your MCP config:
{
"mcpServers": {
"openobserve": {
"command": "npx",
"args": ["openobserve-mcp", "--config", "/path/to/config.json"],
"env": {
"PROD_O2_TOKEN": "base64token"
}
}
}
}OpenCode — add to .opencode/config.json:
{
"mcp": {
"openobserve": {
"type": "local",
"command": ["npx", "openobserve-mcp", "--config", "/path/to/config.json"],
"environment": {
"PROD_O2_TOKEN": "base64token"
},
"enabled": true
}
}
}Tools
Tool | Description |
| Search log streams with SQL across one or more instances. Automatically selects query strategy based on time range. |
| Execute multiple SQL queries in parallel across instances. |
| List configured instances with their capabilities and tags. |
| List available streams on one or more instances. |
| Return field names and types for one or more streams (cached 10 min). |
| Fetch log records surrounding a specific timestamp without writing SQL. |
SQL Reference
-- Basic filter
SELECT * FROM "mystream" WHERE level = 'error'
-- Full-text search
SELECT * FROM "mystream" WHERE match_all('timeout*')
-- Aggregation
SELECT code, COUNT(*) FROM "mystream" GROUP BY code ORDER BY COUNT(*) DESC
-- Time bucketing (do not add _timestamp filters manually)
SELECT histogram(_timestamp, '1 hour') AS ts, COUNT(*) FROM "mystream" GROUP BY tsSupported: =, !=, >, <, >=, <=, IS NULL, IS NOT NULL, AND, OR, NOT, COUNT, SUM, AVG, MIN, MAX, GROUP BY, ORDER BY, match_all(), histogram(). String literals use single quotes. Stream names use double quotes.
Optional: Langfuse Tracing
Set the following environment variables to emit traces to Langfuse:
Variable | Description |
| Set to |
| Langfuse project public key |
| Langfuse project secret key |
| Langfuse host (default: |
Requirements
Node.js ≥ 18.0.0
OpenObserve instance with API access
License
MIT © Adarsh BA
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
- Alicense-qualityCmaintenanceAn MCP server that enables querying logs and metrics from Graylog, Prometheus, and InfluxDB 2.x. It provides tools for executing Lucene log searches, PromQL queries, and Flux queries directly within MCP-compatible clients.Last updatedMIT
- AlicenseBqualityCmaintenanceA read-only MCP server for OpenObserve Community Edition that works over the REST API. Provides tools for searching logs, traces, stream schemas, and dashboards - no Enterprise license required.Last updated816GPL 3.0
- Alicense-qualityCmaintenanceUnified MCP server for observability and monitoring, providing tools to query metrics, logs, and traces through Prometheus, Grafana, Loki, and Jaeger.Last updated2Mozilla Public 2.0
- Alicense-qualityCmaintenanceEnables querying and analyzing distributed traces from Jaeger, including service discovery, trace inspection, and performance analysis, through MCP tools.Last updated2Apache 2.0
Related MCP Connectors
Remote MCP for GenAI span mapping, provider normalization, dashboard schemas, and receipts.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Local-first RAG engine with MCP server for AI agent integration.
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/adarshba/openobserve-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server