Mcp Victoriatraces

io.github.VictoriaMetrics-Community由 GitHub 账号 VictoriaMetrics-Community 发布v1.5.0更新于 Oct 24, 2026

MCP Server for VictoriaTraces. Provides integration with VictoriaTraces API and documentation

已验证STDIO仅桌面知识与记忆安全与监控

概览

AI 生成的概览

本地 MCP 服务器,将 AI 助手连接到 VictoriaTraces 实例,用于只读的链路、服务与依赖查询以及离线文档搜索。

可以做什么
列出所有被追踪的服务及其 span 名称(操作)。查询链路,并按链路 ID 获取单条链路。查询服务依赖关系图。在无网络访问时搜索内置的 VictoriaTraces 文档。
适用场景
适合在排查 VictoriaTraces 部署中的分布式链路时使用,让助手直接获取服务、链路和依赖信息,或离线查阅 VictoriaTraces 文档。
运行要求
以本地进程运行(二进制、Go 构建、Docker 镜像或 Helm chart)。需要通过 VT_INSTANCE_ENTRYPOINT 提供可访问的 VictoriaTraces 实例地址;若 API 需要认证,可选设置 VT_INSTANCE_BEARER_TOKEN。需要能访问该实例的网络。
安装前请注意
VT_INSTANCE_BEARER_TOKEN 中的令牌以及 VT_INSTANCE_HEADERS 中的自定义请求头都是发往 VictoriaTraces 实例的凭据,不要写入共享配置。该服务器被描述为只读,但会查询实时可观测数据,README 也提醒应复核 AI 给出的结果。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Victoriatraces,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

VictoriaTraces MCP Server

[Latest Release] [Trust Score] [License] [Slack] [X] [Reddit]

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

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.

Requirements

Installation

Go

bash
go install github.com/VictoriaMetrics-Community/mcp-victoriatraces/cmd/mcp-victoriatraces@latest

Binaries

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):

bash
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.gztar axvf mcp-victoriatraces_Linux_x86_64.tar.gz

Docker

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.

bash
docker run -d --name mcp-victoriatraces \  -e VT_INSTANCE_ENTRYPOINT=https://localhost:10428 \  -e MCP_SERVER_MODE=http \  -e MCP_LISTEN_ADDR=:8081 \  -p 8081:8081 \  ghcr.io/victoriametrics-community/mcp-victoriatraces

You 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:

    bash
    git clone https://github.com/VictoriaMetrics-Community/mcp-victoriatraces.gitcd mcp-victoriatraces
  • Build binary from cloned source code:

    bash
    make build# after that you can find binary mcp-victoriatraces and copy this file to your PATH or run inplace
  • Build image from cloned source code:

    bash
    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:

VariableDescriptionRequiredDefaultAllowed values
VT_INSTANCE_ENTRYPOINTURL to VictoriaTraces instanceYes--
VT_INSTANCE_BEARER_TOKENAuthentication token for VictoriaTraces APINo--
VT_INSTANCE_HEADERSCustom HTTP headers to send with requests (comma-separated key=value pairs)No--
VT_DEFAULT_TENANT_IDDefault tenant ID used when tenant is not specified in requests (format: AccountID:ProjectID or AccountID)No0:0-
MCP_SERVER_MODEServer operation mode. See Modes for details.Nostdiostdio, sse, http
MCP_LISTEN_ADDRAddress for SSE or HTTP server to listen onNolocalhost:8081-
MCP_DISABLED_TOOLSComma-separated list of tools to disableNo--
MCP_HEARTBEAT_INTERVALDefines 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)
No30s-
MCP_LOG_FORMATLog output formatNotexttext, json
MCP_LOG_LEVELMinimum log levelNoinfodebug, info, warn, error

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 /sse and /message endpoints for SSE connections.
  • http - Streamable HTTP. Server will expose the /mcp endpoint for HTTP connections.

More info about traqnsports you can find in MCP docs:

Сonfiguration examples

bash
export VT_INSTANCE_ENTRYPOINT="https://localhost:10428"
# Custom headers for authentication (e.g., behind a reverse proxy)# Expected syntax is key=value separated by commasexport VT_INSTANCE_HEADERS="<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>"
# Server modeexport 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:

EndpointDescription
/sse + /messageEndpoints for messages in SSE mode (for MCP clients that support SSE)
/mcpHTTP endpoint for streaming messages in HTTP mode (for MCP clients that support Streamable HTTP)
/metricsMetrics in Prometheus format for monitoring the MCP server
/health/livenessLiveness check endpoint to ensure the server is running
/health/readinessReadiness 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:

json
{  "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):

json
{  "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:

sh
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.

Visual Studio Code

Add this to your VS Code MCP config file:

json
{  "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:

json
  "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 JSON
  • Put the following to the input field:
json
{  "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.

json
{  "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 answers

But 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:

ToolDescription
documentationSearch in embedded VictoriaTraces documentation
servicesList of all traced services
service_namesGet all the span names (operations) of a service
tracesQuery traces
traceGet trace info by trace ID
dependenciesQuery the service dependency graph

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:

PromptDescription
documentationSearch VictoriaTraces documentation for specific topics

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.

来源:README.md,提交 ace79e7

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.5.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分