MCP Configuration Reference
{
"version": 1,
"servers": [{
"name": "metrics",
"command": "/usr/local/bin/example-mcp",
"args": ["--stdio"],
"env": {"EXAMPLE_ENDPOINT": "http://metrics.example"},
"working_directory": "/var/lib/akritas",
"allow": ["read"],
"timeout_ms": 5000
}]
}
version must be 1. Server names use the tool-name character rules. allow is required, non-empty, unique, and contains read, write, or dangerous. The Web runtime ultimately publishes only authorized read definitions. Commands run directly without a shell.
Bundled VictoriaMetrics server
akritas mcp-victoriametrics implements MCP over stdio and accepts these
operator-owned flags:
| Flag | Default | Meaning |
|---|---|---|
-base-url | http://127.0.0.1:8428/prometheus | Read API root before /api/v1; cluster roots include /select/<tenant>/prometheus. |
-bearer-token-env | empty | Name of the environment variable containing a bearer token. |
-username-env | empty | Name of the environment variable containing a basic-auth username. |
-password-env | empty | Name of the environment variable containing a basic-auth password. |
-account-id | empty | Fixed AccountID request header. |
-project-id | empty | Fixed ProjectID request header; requires an account ID. |
-request-timeout | 15s | HTTP timeout for each VictoriaMetrics request. |
-max-response-bytes | 196608 | Maximum decompressed JSON response; accepted range is 1024 through 245760. |
-debug | false | Log bounded failed-response diagnostics to stderr. |
Bearer and basic authentication are mutually exclusive. Basic authentication requires both environment-variable flags. The configured variables must exist and contain non-empty values when the child starts. Credentials are never tool arguments.
Every exposed VictoriaMetrics tool is annotated and registered as read.
Instant and range expressions are limited to 16384 bytes. Discovery accepts at
most 10 selectors, each at most 4096 bytes, and a limit no greater than 1000.
The VictoriaMetrics response must be a successful JSON envelope and fit the
configured response bound.
With -debug, a failed response log contains the fixed API endpoint, HTTP
status, content type, failure reason, and at most 2048 bytes of the response
body. It excludes the request URL query, headers, credentials, and successful
response bodies. The response preview can contain sensitive operational data.