VictoriaTraces MCP Server
OfficialProvides a comprehensive interface for traces, observability, and debugging tasks related to VictoriaTraces instances, allowing querying, exploring, and analyzing traces data through MCP tools.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
VictoriaTraces MCP Server
The implementation of Model Context Protocol (MCP) server for VictoriaTraces.
This provides access to your VictoriaTraces instance and seamless integration with VictoriaTraces APIs and documentation. It can give you a comprehensive interface for traces, observability, and debugging tasks related to your VictoriaTraces instances, enable advanced automation and interaction capabilities for engineers and tools.
Features
This MCP server allows you to use almost all read-only APIs of VictoriaTraces:
Get services and operations (span names)
Query traces, explore and analyze traces data
Integration with VictoriaMetrics Cloud VictoriaTraces deployments
In addition, the MCP server contains embedded up-to-date documentation and is able to search it without online access.
More details about the exact available tools and prompts can be found in the Usage section.
You can combine functionality of tools, docs search in your prompts and invent great usage scenarios for your VictoriaTraces instance. And please note the fact that the quality of the MCP Server and its responses depends very much on the capabilities of your client and the quality of the model you are using.
You can also combine the MCP server with other observability or doc search MCP Servers and get even more powerful results.
Related MCP server: LangSmith MCP Server
Requirements
VictoriaTraces instance (single-node or cluster) or VictoriaMetrics Cloud account with VictoriaTraces deployments
Go 1.25 or higher (if you want to build from source)
Installation
Go
go install github.com/VictoriaMetrics-Community/mcp-victoriatraces/cmd/mcp-victoriatraces@latestBinaries
Just download the latest release from Releases page and put it to your PATH.
Example for Linux x86_64 (note that other architectures and platforms are also available):
latest=$(curl -s https://api.github.com/repos/VictoriaMetrics-Community/mcp-victoriatraces/releases/latest | grep 'tag_name' | cut -d\" -f4)
wget https://github.com/VictoriaMetrics-Community/mcp-victoriatraces/releases/download/$latest/mcp-victoriatraces_Linux_x86_64.tar.gz
tar axvf mcp-victoriatraces_Linux_x86_64.tar.gzDocker
You can run VictoriaTraces MCP Server using Docker.
This is the easiest way to get started without needing to install Go or build from source.
docker run -d --name mcp-victoriatraces \
-e VT_INSTANCE_ENTRYPOINT=https://localhost:10428 \
-e MCP_SERVER_MODE=http \
-e MCP_LISTEN_ADDR=:8081 \
-e MCP_AUTH_TOKEN=your-secret-token \
-p 8081:8081 \
ghcr.io/victoriametrics-community/mcp-victoriatracesYou should replace environment variables with your own parameters.
Note that the MCP_SERVER_MODE=http flag is used to enable Streamable HTTP mode.
More details about server modes can be found in the Configuration section.
See available docker images in github registry.
Also see Using Docker instead of binary section for more details about using Docker with MCP server with clients in stdio mode.
Source Code
For building binary from source code you can use the following approach:
Clone repo:
git clone https://github.com/VictoriaMetrics-Community/mcp-victoriatraces.git cd mcp-victoriatracesBuild binary from cloned source code:
make build # after that you can find binary mcp-victoriatraces and copy this file to your PATH or run inplaceBuild image from cloned source code:
docker build -t mcp-victoriatraces . # after that you can use docker image mcp-victoriatraces for running or pushing
Helm
Check out VictoriaTraces MCP Server Helm chart documentation for more details about installation using Helm.
Configuration
MCP Server for VictoriaTraces is configured via environment variables:
Variable | Description | Required | Default | Allowed values |
| URL to VictoriaTraces instance. Cannot be used with | Yes (if you don't use | - | - |
| API key from VictoriaMetrics Cloud Console to work with VictoriaTraces deployments in VictoriaMetrics Cloud. Set it to | Yes (if you don't use | - | - |
| Base URL of the VictoriaMetrics Cloud API | No |
| - |
| Authentication token for VictoriaTraces API | No | - | - |
| Custom HTTP headers to send with requests (comma-separated key=value pairs) | No | - | - |
| PEM-encoded CA certificate(s) to verify the TLS certificates of VictoriaTraces and the VictoriaMetrics Cloud API with, instead of the system CA bundle. Useful when mounting a CA file is not possible. Literal | No | - | - |
| Path to a file with PEM-encoded CA certificate(s) to verify the TLS certificates of VictoriaTraces and the VictoriaMetrics Cloud API with, instead of the system CA bundle. The file is re-read automatically, so CA rotation does not need a restart. Cannot be used with | No | - | - |
| HTTP header names to forward from incoming MCP requests to VictoriaTraces (comma-separated list). Overrides | No | - | - |
| Default tenant ID used when tenant is not specified in requests (format: | No |
| - |
| Server operation mode. See Modes for details. | No |
|
|
| Address for SSE or HTTP server to listen on | No |
| - |
| Comma-separated list of tools to disable | No | - | - |
| Defines the heartbeat interval for the streamable-http protocol. It means the MCP server will send a heartbeat to the client through the GET connection, to keep the connection alive from being closed by the network infrastructure (e.g. gateways) | No |
| - |
| Log output format | No |
|
|
| Minimum log level. | No |
|
|
| Text that fully replaces the default MCP server instructions sent to clients. Useful for tailoring the server to a particular instance (environment, tenants, naming conventions, etc.) | No | - | - |
| Bearer token for authenticating incoming MCP requests. Clients must send | No | - | - |
Modes
MCP Server supports the following modes of operation (transports):
stdio- Standard input/output mode, where the server reads commands from standard input and writes responses to standard output. This is the default mode and is suitable for local servers.sse- Server-Sent Events. Server will expose the/sseand/messageendpoints for SSE connections.http- Streamable HTTP. Server will expose the/mcpendpoint for HTTP connections.
More info about traqnsports you can find in MCP docs:
Сonfiguration examples
export VT_INSTANCE_ENTRYPOINT="https://localhost:10428"
# For VictoriaMetrics Cloud (instead of VT_INSTANCE_ENTRYPOINT)
export VMC_API_KEY="<your-api-key>"
# Require clients to send "Authorization: Bearer <token>" (optional, only for sse/http modes)
export MCP_AUTH_TOKEN="your-secret-token"
# Custom headers for authentication (e.g., behind a reverse proxy)
# Expected syntax is key=value separated by commas
export VT_INSTANCE_HEADERS="<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
# Forward specific headers from incoming MCP requests to VictoriaTraces (sse/http modes only)
export MCP_PASSTHROUGH_HEADERS="X-Token,X-Access-Key"
# Server mode
export MCP_SERVER_MODE="sse"
export MCP_SSE_ADDR="0.0.0.0:8082"Endpoints
In SSE and HTTP modes the MCP server provides the following endpoints:
Endpoint | Description |
| Endpoints for messages in SSE mode (for MCP clients that support SSE) |
| HTTP endpoint for streaming messages in HTTP mode (for MCP clients that support Streamable HTTP) |
| Metrics in Prometheus format for monitoring the MCP server |
| Liveness check endpoint to ensure the server is running |
| Readiness check endpoint to ensure the server is ready to accept requests |
Setup in clients
Cursor
Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server and paste the following configuration into your Cursor ~/.cursor/mcp.json file:
{
"mcpServers": {
"victoriatraces": {
"command": "/path/to/mcp-victoriatraces",
"env": {
"VT_INSTANCE_ENTRYPOINT": "<YOUR_VT_INSTANCE>",
"VT_INSTANCE_BEARER_TOKEN": "<YOUR_VT_BEARER_TOKEN>",
"VT_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
}
}
}
}See Cursor MCP docs for more info.
Claude Desktop
Add this to your Claude Desktop claude_desktop_config.json file (you can find it if open Settings -> Developer -> Edit config):
{
"mcpServers": {
"victoriatraces": {
"command": "/path/to/mcp-victoriatraces",
"env": {
"VT_INSTANCE_ENTRYPOINT": "<YOUR_VT_INSTANCE>",
"VT_INSTANCE_BEARER_TOKEN": "<YOUR_VT_BEARER_TOKEN>",
"VT_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
}
}
}
}See Claude Desktop MCP docs for more info.
Claude Code
Run the command:
claude mcp add victoriatraces -- /path/to/mcp-victoriatraces \
-e VT_INSTANCE_ENTRYPOINT=<YOUR_VT_INSTANCE> \
-e VT_INSTANCE_BEARER_TOKEN=<YOUR_VT_BEARER_TOKEN> \
-e VT_INSTANCE_HEADERS="<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"See Claude Code MCP docs for more info.
Codex
Codex CLI and the IDE extension use the same MCP configuration file: ~/.codex/config.toml
(or .codex/config.toml in a trusted project).
Run the command:
codex mcp add victoriatraces \
--env VT_INSTANCE_ENTRYPOINT=<YOUR_VT_INSTANCE> \
--env VT_INSTANCE_BEARER_TOKEN=<YOUR_VT_BEARER_TOKEN> \
--env VT_INSTANCE_HEADERS="<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>" \
-- /path/to/mcp-victoriatracesOr add the following to your Codex ~/.codex/config.toml file:
[mcp_servers.victoriatraces]
command = "/path/to/mcp-victoriatraces"
[mcp_servers.victoriatraces.env]
VT_INSTANCE_ENTRYPOINT = "<YOUR_VT_INSTANCE>"
VT_INSTANCE_BEARER_TOKEN = "<YOUR_VT_BEARER_TOKEN>"
VT_INSTANCE_HEADERS = "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"If you run the server in Streamable HTTP mode, you can register it with:
codex mcp add victoriatraces --url http://localhost:8081/mcpSee Codex MCP docs for more info.
OpenCode
Add the following to your OpenCode config file in ~/.config/opencode/opencode.json:
{
"mcp": {
"victoriatraces": {
"type": "local",
"command": ["/path/to/mcp-victoriatraces"],
"enabled": true,
"environment": {
"VT_INSTANCE_ENTRYPOINT": "<YOUR_VT_INSTANCE>",
"VT_INSTANCE_BEARER_TOKEN": "<YOUR_VT_BEARER_TOKEN>",
"VT_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
}
}
}
}See OpenCode MCP docs for more info.
Visual Studio Code
Add this to your VS Code MCP config file:
{
"servers": {
"victoriatraces": {
"type": "stdio",
"command": "/path/to/mcp-victoriatraces",
"env": {
"VT_INSTANCE_ENTRYPOINT": "<YOUR_VT_INSTANCE>",
"VT_INSTANCE_BEARER_TOKEN": "<YOUR_VT_BEARER_TOKEN>",
"VT_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
}
}
}
}See VS Code MCP docs for more info.
Zed
Add the following to your Zed config file:
"context_servers": {
"victoriatraces": {
"command": {
"path": "/path/to/mcp-victoriatraces",
"args": [],
"env": {
"VT_INSTANCE_ENTRYPOINT": "<YOUR_VT_INSTANCE>",
"VT_INSTANCE_BEARER_TOKEN": "<YOUR_VT_BEARER_TOKEN>",
"VT_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
}
},
"settings": {}
}
}
}See Zed MCP docs for more info.
JetBrains IDEs
Open
Settings->Tools->AI Assistant->Model Context Protocol (MCP).Click
Add (+)Select
As JSONPut the following to the input field:
{
"mcpServers": {
"victoriatraces": {
"command": "/path/to/mcp-victoriatraces",
"env": {
"VT_INSTANCE_ENTRYPOINT": "<YOUR_VT_INSTANCE>",
"VT_INSTANCE_BEARER_TOKEN": "<YOUR_VT_BEARER_TOKEN>",
"VT_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
}
}
}
}Windsurf
Add the following to your Windsurf MCP config file.
{
"mcpServers": {
"victoriatraces": {
"command": "/path/to/mcp-victoriatraces",
"env": {
"VT_INSTANCE_ENTRYPOINT": "<YOUR_VT_INSTANCE>",
"VT_INSTANCE_BEARER_TOKEN": "<YOUR_VT_BEARER_TOKEN>",
"VT_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
}
}
}
}See Windsurf MCP docs for more info.
Using Docker instead of binary
You can run VictoriaTraces MCP Server using Docker instead of local binary.
You should replace run command in configuration examples above in the following way:
{
"mcpServers": {
"victoriatraces": {
"command": "docker",
"args": [
"run",
"-i", "--rm",
"-e", "VT_INSTANCE_ENTRYPOINT",
"-e", "VT_INSTANCE_BEARER_TOKEN",
"-e", "VT_INSTANCE_HEADERS",
"ghcr.io/victoriametrics-community/mcp-victoriatraces",
],
"env": {
"VT_INSTANCE_ENTRYPOINT": "<YOUR_VT_INSTANCE>",
"VT_INSTANCE_BEARER_TOKEN": "<YOUR_VT_BEARER_TOKEN>",
"VT_INSTANCE_HEADERS": "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
}
}
}
}Usage
After installing and configuring the MCP server, you can start using it with your favorite MCP client.
You can start dialog with AI assistant from the phrase:
Use MCP VictoriaTraces in the following answersBut it's not required, you can just start asking questions and the assistant will automatically use the tools and documentation to provide you with the best answers.
Toolset
MCP VictoriaTraces provides numerous tools for interacting with your VictoriaTraces instance.
Here's a list of available tools:
Tool | Description |
| Search in embedded VictoriaTraces documentation |
| List of all traced services |
| Get all the span names (operations) of a service |
| Query traces |
| Get trace info by trace ID |
| Query the service dependency graph |
VictoriaMetrics Cloud
Additional tools available for VictoriaMetrics Cloud deployments (with VMC_API_KEY parameter).
In this mode every VictoriaTraces tool except documentation takes a required deployment_id argument with the ID of the VictoriaTraces deployment to work with,
and the MCP server uses an access token of that deployment to query it: a read-only token without a tenant, or a read-write one when the deployment has no such read-only token.
Create a read-only access token for the deployment to keep write credentials out of the MCP server.
Tool | Description |
| List of VictoriaTraces deployments |
| List of access tokens of a deployment |
| List of VictoriaTraces deployment tiers |
| List of regions |
| List of cloud providers |
| List of alerting and recording rules files of a deployment |
| Content of an alerting and recording rules file of a deployment |
Prompts
The server includes pre-defined prompts for common tasks.
These are just examples at the moment, the prompt library will be added to in the future:
Prompt | Description |
| Search VictoriaTraces documentation for specific topics |
FAQ
How to use one MCP server instance for several VictoriaTraces instances?
Set MCP_PASSTHROUGH_HEADERS on the MCP server and put vmauth with header-based routing in front of your VictoriaTraces instances.
Each MCP client then sends its own header value in its config, and vmauth routes the request to the matching instance.
Which headers win when the same header is set in several places?
Headers listed in MCP_PASSTHROUGH_HEADERS override the same headers from VT_INSTANCE_HEADERS.
A forwarded Authorization header also replaces the one built from VT_INSTANCE_BEARER_TOKEN.
The AccountID and ProjectID headers are the exception. The server always sets them from the tenant tool argument or from VT_DEFAULT_TENANT_ID, so forwarding them from the client has no effect.
Roadmap
Implement multitenant version of MCP (that will support several deployments)
Add service graph tool after release of this feature (see the PR)
Disclaimer
AI services and agents along with MCP servers like this cannot guarantee the accuracy, completeness and reliability of results. You should double check the results obtained with AI.
The quality of the MCP Server and its responses depend very much on the capabilities of your client and the quality of the model you are using.
Contributing
Contributions to the MCP VictoriaTraces project are welcome!
Please feel free to submit issues, feature requests, or pull requests.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Lets AI agents analyze API metrics, request logs, and traces, and manage apps and alerts.
Query your AI agent traces, root-cause verdicts and issues, and run investigations, from your agent.
Query Logfire traces and metrics with SQL, and manage dashboards, alerts and issues.
Run endpoints and read-only SQL, and append events to Data Sources in Tinybird.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables interaction with Datadog's monitoring platform to search logs, search trace spans, and perform trace span aggregation for analysis.3MIT
- FlicenseAqualityDmaintenanceEnables read-only querying of LangSmith traces including runs, children, and URLs without extra instrumentation.51-
- AlicenseBqualityDmaintenanceEnables querying Grafana Tempo traces and spans with flexible filtering, including TraceQL queries, tag-based filters, duration ranges, and aggregated statistics.6GPL 3.0
- FlicenseNot gradedqualityAmaintenanceEnables AI agents and MCP clients to query trace, session, exception, prompt, dataset, score, and metric data for enhanced debugging and observability.-