|
1 | 1 | # VictoriaLogs MCP Server |
2 | 2 |
|
3 | 3 | [](https://github.com/VictoriaMetrics/mcp-victorialogs/releases) |
4 | | -[](https://archestra.ai/mcp-catalog/victoriametrics__mcp-victorialogs) |
5 | | -[](https://smithery.ai/server/@VictoriaMetrics/mcp-victorialogs) |
6 | 4 |  |
7 | 5 |  |
8 | 6 |  |
@@ -120,47 +118,22 @@ For building binary from source code you can use the following approach: |
120 | 118 | # after that you can use docker image mcp-victorialogs for running or pushing |
121 | 119 | ``` |
122 | 120 |
|
123 | | -### Smithery |
124 | | - |
125 | | -To install VictoriaLogs MCP Server for your client automatically via [Smithery](https://smithery.ai/server/@VictoriaMetrics/mcp-victorialogs), yo can use the following commands: |
126 | | - |
127 | | -```bash |
128 | | -# Get the list of supported MCP clients |
129 | | -npx -y @smithery/cli list clients |
130 | | -#Available clients: |
131 | | -# claude |
132 | | -# cline |
133 | | -# windsurf |
134 | | -# roocode |
135 | | -# witsy |
136 | | -# enconvo |
137 | | -# cursor |
138 | | -# vscode |
139 | | -# vscode-insiders |
140 | | -# boltai |
141 | | -# amazon-bedrock |
142 | | - |
143 | | -# Install VictoriaLogs MCP server for your client |
144 | | -npx -y @smithery/cli install @VictoriaMetrics/mcp-victorialogs --client <YOUR-CLIENT-NAME> |
145 | | -# and follow the instructions |
146 | | -``` |
147 | | - |
148 | 121 | ## Configuration |
149 | 122 |
|
150 | 123 | MCP Server for VictoriaLogs is configured via environment variables: |
151 | 124 |
|
152 | | -| Variable | Description | Required | Default | Allowed values | |
153 | | -|----------------------------|---------------------------------------------------------|----------|------------------|------------------------| |
154 | | -| `VL_INSTANCE_ENTRYPOINT` | URL to VictoriaLogs instance | Yes | - | - | |
155 | | -| `VL_INSTANCE_BEARER_TOKEN` | Authentication token for VictoriaLogs API | No | - | - | |
156 | | -| `VL_INSTANCE_HEADERS` | Custom HTTP headers to send with requests (comma-separated key=value pairs) | No | - | - | |
157 | | -| `VL_DEFAULT_TENANT_ID` | Default tenant ID used when tenant is not specified in requests (format: `AccountID:ProjectID` or `AccountID`) | No | `0:0` | - | |
158 | | -| `MCP_SERVER_MODE` | Server operation mode. See [Modes](#modes) for details. | No | `stdio` | `stdio`, `sse`, `http` | |
159 | | -| `MCP_LISTEN_ADDR` | Address for SSE or HTTP server to listen on | No | `localhost:8081` | - | |
160 | | -| `MCP_DISABLED_TOOLS` | Comma-separated list of tools to disable | No | - | - | |
161 | | -| `MCP_HEARTBEAT_INTERVAL` | Defines the heartbeat interval for the streamable-http protocol. <br /> It means the MCP server will send a heartbeat to the client through the GET connection, <br /> to keep the connection alive from being closed by the network infrastructure (e.g. gateways) | No | `30s` | - | |
162 | | -| `MCP_LOG_FORMAT` | Log output format | No | `text` | `text`, `json` | |
163 | | -| `MCP_LOG_LEVEL` | Minimum log level | No | `info` | `debug`, `info`, `warn`, `error` | |
| 125 | +| Variable | Description | Required | Default | Allowed values | |
| 126 | +|----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|------------------|----------------------------------| |
| 127 | +| `VL_INSTANCE_ENTRYPOINT` | URL to VictoriaLogs instance | Yes | - | - | |
| 128 | +| `VL_INSTANCE_BEARER_TOKEN` | Authentication token for VictoriaLogs API | No | - | - | |
| 129 | +| `VL_INSTANCE_HEADERS` | Custom HTTP headers to send with requests (comma-separated key=value pairs) | No | - | - | |
| 130 | +| `VL_DEFAULT_TENANT_ID` | Default tenant ID used when tenant is not specified in requests (format: `AccountID:ProjectID` or `AccountID`) | No | `0:0` | - | |
| 131 | +| `MCP_SERVER_MODE` | Server operation mode. See [Modes](#modes) for details. | No | `stdio` | `stdio`, `sse`, `http` | |
| 132 | +| `MCP_LISTEN_ADDR` | Address for SSE or HTTP server to listen on | No | `localhost:8081` | - | |
| 133 | +| `MCP_DISABLED_TOOLS` | Comma-separated list of tools to disable | No | - | - | |
| 134 | +| `MCP_HEARTBEAT_INTERVAL` | Defines the heartbeat interval for the streamable-http protocol. <br /> It means the MCP server will send a heartbeat to the client through the GET connection, <br /> to keep the connection alive from being closed by the network infrastructure (e.g. gateways) | No | `30s` | - | |
| 135 | +| `MCP_LOG_FORMAT` | Log output format | No | `text` | `text`, `json` | |
| 136 | +| `MCP_LOG_LEVEL` | Minimum log level | No | `info` | `debug`, `info`, `warn`, `error` | |
164 | 137 |
|
165 | 138 | ### Modes |
166 | 139 |
|
@@ -260,6 +233,41 @@ claude mcp add victorialogs -- /path/to/mcp-victorialogs \ |
260 | 233 |
|
261 | 234 | See [Claude Code MCP docs](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/tutorials#set-up-model-context-protocol-mcp) for more info. |
262 | 235 |
|
| 236 | +### Codex |
| 237 | + |
| 238 | +Codex CLI and the IDE extension use the same MCP configuration file: `~/.codex/config.toml` |
| 239 | +(or `.codex/config.toml` in a trusted project). |
| 240 | + |
| 241 | +Run the command: |
| 242 | + |
| 243 | +```sh |
| 244 | +codex mcp add victorialogs \ |
| 245 | + --env VL_INSTANCE_ENTRYPOINT=<YOUR_VL_INSTANCE> \ |
| 246 | + --env VL_INSTANCE_BEARER_TOKEN=<YOUR_VL_BEARER_TOKEN> \ |
| 247 | + --env VL_INSTANCE_HEADERS="<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>" \ |
| 248 | + -- /path/to/mcp-victorialogs |
| 249 | +``` |
| 250 | + |
| 251 | +Or add the following to your Codex `~/.codex/config.toml` file: |
| 252 | + |
| 253 | +```toml |
| 254 | +[mcp_servers.victorialogs] |
| 255 | +command = "/path/to/mcp-victorialogs" |
| 256 | + |
| 257 | +[mcp_servers.victorialogs.env] |
| 258 | +VL_INSTANCE_ENTRYPOINT = "<YOUR_VL_INSTANCE>" |
| 259 | +VL_INSTANCE_BEARER_TOKEN = "<YOUR_VL_BEARER_TOKEN>" |
| 260 | +VL_INSTANCE_HEADERS = "<HEADER>=<HEADER_VALUE>,<HEADER>=<HEADER_VALUE>" |
| 261 | +``` |
| 262 | + |
| 263 | +If you run the server in Streamable HTTP mode, you can register it with: |
| 264 | + |
| 265 | +```sh |
| 266 | +codex mcp add victorialogs --url http://localhost:8081/mcp |
| 267 | +``` |
| 268 | + |
| 269 | +See [Codex MCP docs](https://developers.openai.com/codex/mcp) for more info. |
| 270 | + |
263 | 271 | ### Visual Studio Code |
264 | 272 |
|
265 | 273 | Add this to your VS Code MCP config file: |
|
0 commit comments