mcp-victorialogs
mcp-victorialogs
README
VictoriaLogs MCP Server
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
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.
Requirements
- VictoriaLogs instance (single-node or cluster)
- Go 1.24 or higher (if you want to build from source)
Installation
Go
go install github.com/VictoriaMetrics-Community/mcp-victorialogs/cmd/mcp-victorialogs@latest
Source Code
git clone https://github.com/VictoriaMetrics-Community/mcp-victorialogs.git
cd mcp-victorialogs
go build -o bin/mcp-victorialogs ./cmd/mcp-victorialogs/main.go
# after that add bin/mcp-victorialogs file to your PATH
Binaries
Just download the latest release from Releases page and put it to your PATH.
Docker
Coming soon...
Smithery
To install VictoriaLogs MCP Server for your client automatically via Smithery, yo can use the following commands:
# Get the list of supported MCP clients
npx -y @smithery/cli list clients
#Available clients:
# claude
# cline
# windsurf
# roocode
# witsy
# enconvo
# cursor
# vscode
# vscode-insiders
# boltai
# amazon-bedrock
# Install VictoriaLogs MCP server for your client
npx -y @smithery/cli install @VictoriaMetrics-Community/mcp-victorialogs --client <YOUR-CLIENT-NAME>
# and follow the instructions
Configuration
MCP Server for VictoriaLogs is configured via environment variables:
| Variable | Description | Required | Default | Allowed values |
|---|---|---|---|---|
VL_INSTANCE_ENTRYPOINT |
URL to VictoriaLogs instance | Yes | - | - |
VL_INSTANCE_BEARER_TOKEN |
Authentication token for VictoriaLogs API | No | - | - |
MCP_SERVER_MODE |
Server operation mode | No | stdio |
stdio, sse |
MCP_SSE_ADDR |
Address for SSE server to listen on | No | :8081 |
- |
Сonfiguration examples
# For a public playground
export VL_INSTANCE_ENTRYPOINT="https://play-vmlogs.victoriametrics.com"
# Server mode
export MCP_SERVER_MODE="sse"
export MCP_SSE_ADDR="0.0.0.0:8081"
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": {
"victorialogs": {
"command": "/path/to/mcp-victorialogs",
"env": {
"VL_INSTANCE_ENTRYPOINT": "<YOUR_VL_INSTANCE>",
"VL_INSTANCE_BEARER_TOKEN": "<YOUR_VL_BEARER_TOKEN>"
}
}
}
}
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": {
"victorialogs": {
"command": "/path/to/mcp-victorialogs",
"env": {
"VL_INSTANCE_ENTRYPOINT": "<YOUR_VL_INSTANCE>",
"VL_INSTANCE_BEARER_TOKEN": "<YOUR_VL_BEARER_TOKEN>"
}
}
}
}
See Claude Desktop MCP docs for more info.
Claude Code
Run the command:
claude mcp add victorialogs -- /path/to/mcp-victorialogs \
-e VL_INSTANCE_ENTRYPOINT=<YOUR_VL_INSTANCE> \
-e VL_INSTANCE_BEARER_TOKEN=<YOUR_VL_BEARER_TOKEN>
See Claude Code MCP docs for more info.
Visual Studio Code
Add this to your VS Code MCP config file:
{
"servers": {
"victorialogs": {
"type": "stdio",
"command": "/path/to/mcp-victorialogs",
"env": {
"VL_INSTANCE_ENTRYPOINT": "<YOUR_VL_INSTANCE>",
"VL_INSTANCE_BEARER_TOKEN": "<YOUR_VL_BEARER_TOKEN>"
}
}
}
}
See VS Code MCP docs for more info.
Zed
Add the following to your Zed config file:
"context_servers": {
"victorialogs": {
"command": {
"path": "/path/to/mcp-victorialogs",
"args": [],
"env": {
"VL_INSTANCE_ENTRYPOINT": "<YOUR_VL_INSTANCE>",
"VL_INSTANCE_BEARER_TOKEN": "<YOUR_VL_BEARER_TOKEN>"
}
},
"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:
{
"mcpServers": {
"victorialogs": {
"command": "/path/to/mcp-victorialogs",
"env": {
"VL_INSTANCE_ENTRYPOINT": "<YOUR_VL_INSTANCE>",
"VL_INSTANCE_BEARER_TOKEN": "<YOUR_VL_BEARER_TOKEN>"
}
}
}
}
Windsurf
Add the following to your Windsurf MCP config file.
{
"mcpServers": {
"victorialogs": {
"command": "/path/to/mcp-victorialogs",
"env": {
"VL_INSTANCE_ENTRYPOINT": "<YOUR_VL_INSTANCE>",
"VL_INSTANCE_BEARER_TOKEN": "<YOUR_VL_BEARER_TOKEN>"
}
}
}
}
See Windsurf MCP docs for more info.
Amazon Bedrock
Coming soon....
Using Docker instead of binary
Coming soon...
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 VictoriaLogs 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 VictoriaLogs provides numerous tools for interacting with your VictoriaLogs instance.
Here's a list of available tools:
| Tool | Description |
|---|---|
documentation |
Search in embedded VictoriaLogs documentation |
facets |
Most frequent values per each log field |
field_names |
List of field names for the query |
field_values |
List of field values for the query |
flags |
View non-default flags of the VictoriaLogs instance |
hits |
The number of matching log entries grouped by buckets |
query |
Execute LogsQL queries |
stats_query |
Querying log stats for the given time |
stats_query_range |
Querying log stats on the given time range |
stream_field_names |
List of stream fields for the query |
stream_field_names |
List of stream field values for the query |
stream_ids |
List of stream IDs for the query |
streams |
List of streams for the query |
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 |
|---|---|
documentation |
Search VictoriaLogs documentation for specific topics |
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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。