
Mcp Victorialogs
io.github.VictoriaMetrics-Community由 GitHub 帳號 VictoriaMetrics-Community 發布v1.8.0更新於 Nov 3, 2026
MCP Server for VictoriaLogs. Provides integration with VictoriaLogs API and documentation
概覽
針對 VictoriaLogs 的 MCP 伺服器,讓助理執行 LogsQL 查詢、瀏覽日誌串流與欄位,並檢索內建的 VictoriaLogs 文件。
- 可以做什麼
- 執行 LogsQL 查詢並探索 VictoriaLogs 執行個體中的日誌資料
- 列出串流、串流 ID、欄位名稱與欄位值,並列出各欄位出現頻率最高的取值
- 以指標形式統計日誌,包括依時間桶分組的命中數與指定時間範圍的統計
- 檢視 VictoriaLogs 執行個體的非預設參數與旗標
- 透過 documentation 工具與提示詞離線檢索內建的 VictoriaLogs 文件
- 適用情境
- 當你使用 VictoriaLogs,並希望助理透過查詢日誌與閱讀內建文件來排查故障、分析可觀測性問題時適合使用。
- 執行需求
- 以本機程序執行(二進位檔、Go 建置、Docker 映像或 Helm chart),或使用 Streamable HTTP 模式的公開測試端點。需要 VL_INSTANCE_ENTRYPOINT 指向 VictoriaLogs 執行個體;VL_INSTANCE_BEARER_TOKEN 在 API 需要驗證時使用。需要能連線該執行個體的網路;僅在從原始碼建置時需要 Go 1.26 以上。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Mcp Victorialogs,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
VictoriaLogs MCP Server
[Latest Release] [License] [Slack] [X] [Reddit]
The implementation of Model Context Protocol (MCP) server for VictoriaLogs.
This provides access to your VictoriaLogs instance and seamless integration with VictoriaLogs APIs and documentation. It can give you a comprehensive interface for logs, observability, and debugging tasks related to your VictoriaLogs 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 VictoriaLogs, i.e. all functions available in Web UI:
- Querying logs and exploring logs data
- Showing parameters of your VictoriaLogs instance
- Listing available streams, fields, field values
- Query statistics for the logs as metrics
- UI with setup instructions and tools inspection on the root endpoint (only in Streamable HTTP mode)
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 VictoriaLogs 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 related MCP Servers and get even more powerful results.
Try without installation
There is a publicly available instance of the VictoriaMetrics MCP Server that you can use to test the features without installing it:
Attention! This URL is not supposed to be opened in a browser, it is intended to be used in MCP clients.
It's available in Streamable HTTP Mode mode and configured to work with Public VictoriaLogs Playground.
Here is example of configuration for Claude Desktop:
Requirements
- VictoriaLogs instance: (single-node or cluster)
- Go 1.26 or higher (if you want to build from source)
Installation
Go
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):
Docker
You can run VictoriaLogs MCP Server using Docker.
This is the easiest way to get started without needing to install Go or build from source.
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:
-
Build binary from cloned source code:
-
Build image from cloned source code:
Helm
Check out VictoriaLogs MCP Server Helm chart documentation for more details about installation using Helm.
Configuration
MCP Server for VictoriaLogs is configured via environment variables:
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 transports you can find in MCP docs:
Сonfiguration examples
Endpoints
In SSE and HTTP modes the MCP server provides the following endpoints:
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:
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):
See Claude Desktop MCP docs for more info.
Claude Code
Run the command:
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:
Or add the following to your Codex ~/.codex/config.toml file:
If you run the server in Streamable HTTP mode, you can register it with:
See Codex MCP docs for more info.
Visual Studio Code
Add this to your VS Code MCP config file:
See VS Code MCP docs for more info.
Zed
Add the following to your Zed config file:
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:
Windsurf
Add the following to your Windsurf MCP config file.
See Windsurf MCP docs for more info.
Using Docker instead of binary
You can run VictoriaLogs MCP Server using Docker instead of local binary.
You should replace run command in configuration examples above in the following way:
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:
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 VictoriaLogs provides numerous tools for interacting with your VictoriaLogs instance.
Here's a list of available tools:
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:
FAQ
Why is the MCP server using more resources than I would expect from a simple API proxy?
The server contains an embedded vector database with VictoriaMetrics documentation and blog posts for the documentation tool.
It helps to answer complex questions about VictoriaLogs without providing all data to LLM.
This is the main source of resource usage. To reduce it, add documentation to MCP_DISABLED_TOOLS environment variable to completely disable the vector database loading.
How to use one MCP server instance for several VictoriaMetrics instances?
You can use MCP_PASSTHROUGH_HEADERS parameter in the MCP Server together with Header-based routing in vmauth to route MCP calls between instances based on HTTP header values from your MCP client config.
Roadmap
- Support "Explain query" tool
- Support optional integration with VictoriaMetrics Cloud
- Add some extra knowledge to server in addition to current documentation tool:
- VictoriaMetrics blog posts
- Github issues
- Public slack chat history
- CRD schemas
- Implement multitenant version of MCP (that will support several deployments)
- Add flags/configs validation tool
- Enabling/disabling tools via configuration
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 depends very much on the capabilities of your client and the quality of the model you are using.
Contributing
Contributions to the MCP VictoriaLogs project are welcome!
Please feel free to submit issues, feature requests, or pull requests.
來源:README.md,提交 3ee92d4
工具
0版本歷史
1- v1.8.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分