Configuration

Environment variables, TLS, transport modes, and tool category management for the Obtrace MCP server.

Configuration

Environment variables

VariableRequiredDefaultDescription
OBTRACE_URLYesBase URL of the Obtrace API (e.g. https://api.obtrace.ai)
OBTRACE_API_KEYYesAPI key for authentication
OBTRACE_TENANT_IDNoDefault tenant ID for scoping all queries
OBTRACE_PROJECT_IDNoDefault project ID for scoping queries
OBTRACE_TLS_CA_CERTNoPath to custom CA certificate file
OBTRACE_TLS_CLIENT_CERTNoPath to client certificate for mTLS
OBTRACE_TLS_CLIENT_KEYNoPath to client key for mTLS
OBTRACE_TLS_INSECURENofalseSkip TLS certificate verification (dev only)

CLI flags

FlagDefaultDescription
--transportstdioTransport mode: stdio, sse, streamable-http
--addr:8000Listen address for SSE and streamable-http
--enabled-toolsallComma-separated list of tool categories to enable
--enable-writefalseEnable write/mutating tools
--disable-<category>falseDisable a specific tool category
--versionPrint version and exit

Transport modes

Stdio (default)

Used for local CLI and IDE integrations. The MCP client launches the server as a subprocess and communicates over stdin/stdout.

mcp-obtrace

SSE (Server-Sent Events)

HTTP-based transport for web integrations. The server exposes an SSE endpoint for receiving tool results.

mcp-obtrace --transport sse --addr :8000

Streamable HTTP

Alternative HTTP transport for environments that don't support SSE.

mcp-obtrace --transport streamable-http --addr :8000

Tool categories

Enable or disable tool categories selectively:

# Only logs and traces
mcp-obtrace --enabled-tools logs,traces
 
# Everything except replay
mcp-obtrace --disable-replay
 
# Only incidents with write access
mcp-obtrace --enable-write --enabled-tools incidents

Available categories: logs, traces, metrics, dashboards, incidents, alerts, ai, projects, replay, search.

TLS / mTLS

For production deployments requiring mutual TLS:

export OBTRACE_TLS_CA_CERT=/etc/ssl/obtrace/ca.pem
export OBTRACE_TLS_CLIENT_CERT=/etc/ssl/obtrace/client.pem
export OBTRACE_TLS_CLIENT_KEY=/etc/ssl/obtrace/client-key.pem
mcp-obtrace

Never use OBTRACE_TLS_INSECURE=true in production.

Scoping

All API requests are scoped by tenant and project:

  • Tenant ID: Set globally via OBTRACE_TENANT_ID or per-tool via the project_id parameter
  • Project ID: Set globally via OBTRACE_PROJECT_ID or per-tool via the project_id parameter

Per-tool project_id overrides the global default when provided.

Nesta página