OpenObserve MCP
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
stdio MCP server for OpenObserve Community Edition, using only the regular REST API.
This package is designed for local MCP clients such as Claude and Codex.
What it is:
- stdio only
- Community Edition only
- read-only only
- regular OpenObserve REST API only
- no native /mcp endpoint
The server can boot without an active OpenObserve configuration so hosted MCP platforms can start it,
but every tool call still requires a reachable external OpenObserve instance configured via OO_BASE_URL
and credentials.
Quick Start
1. Create a config file
This creates a sample config at:
Edit it:
Example:
2. Add it to Claude
3. Add it to Codex
4. Add it to OpenCode
OpenCode configures MCP servers under mcp in its config file. According to the official docs,
you can add MCP servers in your global config at ~/.config/opencode/opencode.json or in a
project-level opencode.json.
See:
- OpenCode MCP servers docs
- OpenCode config docs
If you created the sample config with openobserve-mcp init-config, you can point OpenCode to it:
You can also inline the OpenObserve settings directly in the OpenCode MCP config:
OpenCode's MCP docs also support optional enabled, environment, and timeout fields for local
servers if you want to tune startup behavior.
Docker / Glama
This repository also publishes a container image for Docker-based MCP clients and Glama deployments:
OO_ORG_ID is optional when the credentials only have access to one organization.
Use OO_USERNAME and OO_PASSWORD for basic auth, or OO_TOKEN for bearer auth.
The container can start without these values for hosted MCP platforms, but tool calls will fail until
you configure a real external OpenObserve instance.
Configuration
Default config path:
Supported settings:
- OO_BASE_URL
- OO_ORG_ID optional
- OO_AUTH_MODE
- OO_USERNAME and OO_PASSWORD for basic auth
- OO_TOKEN for bearer auth
- OO_TIMEOUT_SECONDS
- OO_VERIFY_SSL
- OO_CONFIG_FILE optional explicit path to a config file
Config precedence:
1. explicit OO_CONFIG_FILE
2. ~/.config/openobserve-mcp/config.env
3. legacy .env.local in the current directory
4. process environment overrides file values
You can also pass config directly via MCP client env settings.
Claude with inline env
Codex with inline env
OpenCode with inline env
If you prefer to keep everything in OpenCode config instead of a separate config.env, use:
Official OpenCode references:
- Config locations and precedence
- Local MCP server configuration
Tools
- list_streams