Provides access to your VictoriaMetrics instance and seamless integration with VictoriaMetrics APIs and documentation. It can give you a comprehensive interface for monitoring, observability, and debugging tasks related to your VictoriaMetrics instances, enable advanced automation and interaction capabilities for engineers and tools.
20 Tools
Version 4.43 or later needs to be installed to add the server automatically
Use cases
About
Provides access to your VictoriaMetrics instance and seamless integration with VictoriaMetrics APIs and documentation. It can give you a comprehensive interface for monitoring, observability, and debugging tasks related to your VictoriaMetrics instances, enable advanced automation and interaction capabilities for engineers and tools.
| Attribute | Details |
|---|---|
| Docker Image | ghcr.io/victoriametrics-community/mcp-victoriametrics |
| Author | VictoriaMetrics-Community |
| Repository | https://github.com/VictoriaMetrics-Community/mcp-victoriametrics |
| Attribute | Details |
|---|---|
| Dockerfile | https://github.com/VictoriaMetrics-Community/mcp-victoriametrics/blob/4db876ab9d9c09bb24035bc709988cb691ad8626/Dockerfile |
| Commit | 4db876ab9d9c09bb24035bc709988cb691ad8626 |
| Docker Image built by | VictoriaMetrics-Community |
| Docker Scout Health Score | Not available |
| Verify Signature | Not available |
| Licence | Apache License 2.0 |
| Tools provided by this Server | Short Description |
|---|---|
active_queries | Active queries |
alerts | List of alerts |
documentation | Search documentation resources |
downsampling_filters_debug | Downsampling filters debugger |
explain_query | Explain Query |
flags | List of non-default flags (parameters) |
label_values | List of label values |
labels | List of label names |
metric_relabel_debug | Metric relabel debugger |
metrics | List of metric names |
metrics_metadata | List of metrics metadata (name, type, help and unit) |
prettify_query | Prettify Query |
query | Instant Query |
query_range | Range Query |
retention_filters_debug | Retention filters debugger |
rules | List of alerting and recording rules |
series | List of time series |
tenants | List of tenants |
top_queries | Top queries |
tsdb_status | TSDB Stats (information about cardinality of the data) |
active_queriesActive queries. This tool can determine currently active queries in the VictoriaMetrics instance. This information is obtained from the "/api/v1/status/active_queries" HTTP endpoint of VictoriaMetrics API.
| Parameters | Type | Description |
|---|---|---|
tenant | stringoptional | Name of the tenant for which the active queries will be displayed |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
alertsList of firing and pending alerts of the VictoriaMetrics instance. This tool uses /api/v1/alerts endpoint of vmalert API, proxied by VictoriaMetrics API.
| Parameters | Type | Description |
|---|---|---|
group | stringoptional | Filter alerts by their group name. If not specified, all groups are included. |
limit | numberoptional | Maximum number of alerts to return. If not specified, all alerts are returned. |
offset | numberoptional | Number of alerts to skip before starting to collect the result set. Default is 0. |
state | stringoptional | Filter alerts by their state. Possible values: 'firing', 'pending', 'all'. Default is 'all'. |
tenant | stringoptional | Name of the tenant for which the list of alerts will be displayed |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
documentationSearch documentation resources for the given search query, returning the URIs of the resources that match the search criteria sorted by relevance. This tool can help to get context for any VictoriaMetrics related question.
| Parameters | Type | Description |
|---|---|---|
query | string | Query for search (for example, list of keywords) |
limit | numberoptional | Maximum number of results to return |
This tool is read-only. It does not modify its environment.
downsampling_filters_debugDownsampling filters debug tool is used to debug flag "downsampling.period" with some series and see what downsampling strategy will be applied for which series in Enterprise version of VictoriaMetrics. This tool use "/downsampling-filters-debug" API endpoint of VictoriaMetrics API.
| Parameters | Type | Description |
|---|---|---|
flags | string | Commandline flags values for downsampling.period. For example: -downsampling.period={env="dev"}:7d:5m,{env="dev"}:30d:30m -downsampling.period=30d:1m -downsampling.period=60d:5m |
metrics | string | Set of metrics to be debugged. The metrics should be in the format of <metric_name>{<label_name>="<label_value>",...}. |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
explain_queryExplain how MetricsQL query works
| Parameters | Type | Description |
|---|---|---|
query | string | MetricsQL or PromQL expression for explanation |
This tool is read-only. It does not modify its environment.
flagsList of non-default flags (parameters) of the VictoriaMetrics instance. This tools uses /flags endpoint of VictoriaMetrics API.
label_valuesList of label values from VictoriaMetrics instance for a provided label name. This tool uses /api/v1/label/{labelName}/values endpoint of VictoriaMetrics API.
| Parameters | Type | Description |
|---|---|---|
label_name | string | Name of the label to query its values |
end | stringoptional | End timestamp for selection labels values |
limit | numberoptional | Maximum number of label values to return |
match | stringoptional | Time series selector argument that selects the series from which to read the label values |
start | stringoptional | Start timestamp for selection labels values |
tenant | stringoptional | Name of the tenant for which the list of label values will be displayed |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
labelsList of label names of the VictoriaMetrics instance. This tools uses /api/v1/labels endpoint of VictoriaMetrics API.
| Parameters | Type | Description |
|---|---|---|
end | stringoptional | End timestamp for selection labels names |
limit | numberoptional | Maximum number of label names to return |
match | stringoptional | Time series selector argument that selects the series from which to read the label names |
start | stringoptional | Start timestamp for selection labels names |
tenant | stringoptional | Name of the tenant for which the list of labels will be displayed |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
metric_relabel_debugMetric relabel debug tool can help with step-by-step debugging of Prometheus-compatible relabeling rules. It can be used to check how the relabeling rules are applied to the given metric. The tool use "/metric-relabel-debug" endpoint of the VictoriaMetrics API.
| Parameters | Type | Description |
|---|---|---|
metric | string | Set of metrics to be relabeled. The metrics should be in the format of {<label_name>="<label_value>",...}. |
relabel_configs | string | Prometheus-compatible relabeling rules |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
metricsList of available metrics of the VictoriaMetrics instance. This tool uses /api/v1/label/__name__/values endpoint of VictoriaMetrics API.
| Parameters | Type | Description |
|---|---|---|
end | stringoptional | End timestamp for selection metric names |
limit | numberoptional | Maximum number of metric names to return |
match | stringoptional | Time series selector argument that selects the series from which to read the metrics |
start | stringoptional | Start timestamp for selection metric names |
tenant | stringoptional | Name of the tenant for which the list of metrics will be displayed |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
metrics_metadataReturns stored metrics details (metadata) such as name, type, help (description), and unit, and can be used to generate natural language queries. This tool uses /api/v1/metadata endpoint of VictoriaMetrics API.
| Parameters | Type | Description |
|---|---|---|
limit | numberoptional | Maximum number of metrics to return |
metric | stringoptional | A metric name to filter metadata for. All metric metadata is retrieved if left empty |
search | stringoptional | A keyword for search in description and metric name |
tenant | stringoptional | Name of the tenant for which the list of metrics will be displayed |
type | stringoptional | The metric type by which the list of metrics will be filtered |
unit | stringoptional | The unit by which the list of metrics will be filtered |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
prettify_queryPrettify (format) MetricsQL query. This tool uses /prettify-query endpoint of VictoriaMetrics API.
| Parameters | Type | Description |
|---|---|---|
query | string | MetricsQL or PromQL expression for prettification. This is the query that will be formatted. |
tenant | stringoptional | Name of the tenant for which the data will be displayed |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
queryInstant query executes PromQL or MetricsQL query expression at the given time. The result of Instant query is a list of time series matching the filter in query expression. Each returned series contains exactly one (timestamp, value) entry, where timestamp equals to the time query arg, while the value contains query result at the requested time. This tool uses /api/v1/query endpoint of VictoriaMetrics API.
| Parameters | Type | Description |
|---|---|---|
query | string | MetricsQL or PromQL expression for the query of the data |
nocache | booleanoptional | If true, the query will not use the rollup cache on execution. |
step | stringoptional | Optional interval for searching for raw samples in the past when executing the query (used when a sample is missing at the specified time). For example, the request /api/v1/query?query=up&step=1m looks for the last written raw sample for the metric up in the (now()-1m, now()] interval (the first millisecond is not included). If omitted, step is set to 5m (5 minutes) by default. |
tenant | stringoptional | Name of the tenant for which the data will be displayed |
time | stringoptional | Timestamp in millisecond precision to evaluate the query at. If omitted, time is set to now() (current timestamp). The time param can be specified in multiple allowed formats. |
timeout | stringoptional | Optional query timeout. For example, timeout=5s. Query is canceled when the timeout is reached. By default the timeout is set to the value of -search.maxQueryDuration command-line flag passed to single-node VictoriaMetrics or to vmselect component of VictoriaMetrics cluster. |
trace | booleanoptional | If true, the query will be traced and the trace will be returned in the response. This is useful for debugging and performance analysis. |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
query_rangeRange query executes the query expression at the given [start…end] time range with the given step. The result of Range query is a list of time series matching the filter in query expression. Each returned series contains (timestamp, value) results for the query executed at start, start+step, start+2step, …, start+Nstep timestamps. In other words, Range query is an Instant query executed independently at start, start+step, …, start+N*step timestamps with the only difference that an instant query does not return ephemeral samples (see below). Instead, if the database does not contain any samples for the requested time and step, it simply returns an empty result. This tool uses /api/v1/query_range endpoint of VictoriaMetrics API.
| Parameters | Type | Description |
|---|---|---|
query | string | MetricsQL or PromQL expression for the query of the data |
start | string | The starting timestamp of the time range for query evaluation |
end | stringoptional | The ending timestamp of the time range for query evaluation. If the end isn’t set, then the end is automatically set to the current time. |
nocache | booleanoptional | If true, the query will not use the rollup cache on execution. |
step | stringoptional | the interval between data points, which must be returned from the range query. The query is executed at start, start+step, start+2step, …, start+Nstep timestamps, where N is the whole number of steps that fit between start and end. end is included only when it equals to start+N*step. If the step isn’t set, then it default to 5m (5 minutes). |
tenant | stringoptional | Name of the tenant for which the data will be displayed |
timeout | stringoptional | optional query timeout. For example, timeout=5s. Query is canceled when the timeout is reached. By default the timeout is set to the value of -search.maxQueryDuration command-line flag passed to single-node VictoriaMetrics or to vmselect component in VictoriaMetrics cluster. |
trace | booleanoptional | If true, the query will be traced and the trace will be returned in the response. This is useful for debugging and performance analysis. |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
retention_filters_debugRetention filters debug tool is used to debug flag "retentionFilter" and "retentionPeriod" with some series and see what retention policy will be applied for which series in Enterprise version of VictoriaMetrics. This tool use "/retention-filters-debug" API endpoint of VictoriaMetrics API.
| Parameters | Type | Description |
|---|---|---|
flags | string | Commandline flags values for retentionPeriod and retentionFilter. For example: -retentionPeriod=1y -retentionFilters={env!="prod"}:2w |
metrics | string | Set of metrics to be debugged. The metrics should be in the format of <metric_name>{<label_name>="<label_value>",...}. |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
rulesList of alerting and recording rules of VictoriaMetrics instance. This tool uses /api/v1/rules endpoint of vmalert API proxied by VictoriaMetrics API.
| Parameters | Type | Description |
|---|---|---|
exclude_alerts | booleanoptional | Exclude alerts from the list |
filter | stringoptional | Extra filter for rules with possible problems: unhealthy (rules that get some errors during evaluation) or noMatch (rules that don't match any time series) |
rule_files | arrayoptional | Filter rules by file names |
rule_groups | arrayoptional | Filter rules by group names |
rule_names | arrayoptional | Filter rules by name |
tenant | stringoptional | Name of the tenant for which the list of rules will be displayed |
type | stringoptional | Rules type to be displayed: alert or record |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
seriesList of available time series of the VictoriaMetrics instance. This tool uses /api/v1/series endpoint of VictoriaMetrics API.
| Parameters | Type | Description |
|---|---|---|
end | stringoptional | End timestamp for selection time series |
limit | numberoptional | Maximum number of time series to return |
match | stringoptional | Time series selector argument that selects the series |
start | stringoptional | Start timestamp for selection time series |
tenant | stringoptional | Name of the tenant for which the list of time series will be displayed |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
tenantsList of tenants of the VictoriaMetrics instance. This tool uses /admin/tenants endpoint of VictoriaMetrics API.
top_queriesTop queries. This tool can determine top queries of the following query types:
topN|number|The number of top entries to return in the response. By default is 20.
maxLifetime|stringoptional|Max lifetime of the queries to be taken into account during stats calculation. By default is 10m.
tenant|stringoptional|Name of the tenant for which the top queries will be displayedThis tool is read-only. It does not modify its environment.
This tool interacts with external entities.
tsdb_statusThe following tool returns various cardinality statistics about the VictoriaMetrics TSDB:
This tool returns TSDB stats from "/api/v1/status/tsdb" endpoint of VictoriaMetrics API (in the way similar to Prometheus).
| Parameters | Type | Description |
|---|---|---|
date | stringoptional | The date for collecting the stats. By default, the stats is collected for the current day. Pass date=1970-01-01 in order to collect global stats across all the days. |
extraLabel | stringoptional | Optional extra_label=<label_name>=<label_value> query arg, which can be used for enforcing additional label filters for queries. For example, /api/v1/query_range?extra_label=user_id=123&extra_label=group_id=456&query= would automatically add {user_id="123",group_id="456"} label filters to the given . This functionality can be used for limiting the scope of time series visible to the given tenant. |
focusLabel | stringoptional | Returns label values with the highest number of time series for the given label name in the seriesCountByFocusLabelValue list. |
match | stringoptional | Arbitrary time series selector for series to take into account during stats calculation. By default all the series are taken into account. |
tenant | stringoptional | Name of the tenant for which the TSDB stats will be displayed |
topN | numberoptional | is the number of top entries to return in the response |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
{
"mcpServers": {
"victoriametrics": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"VM_INSTANCE_ENTRYPOINT",
"-e",
"VM_INSTANCE_TYPE",
"-e",
"VM_INSTANCE_HEADERS",
"-e",
"MCP_SERVER_MODE",
"-e",
"MCP_LISTEN_ADDR",
"-e",
"MCP_DISABLED_TOOLS",
"-e",
"MCP_DISABLE_RESOURCES",
"-e",
"MCP_HEARTBEAT_INTERVAL",
"-e",
"VM_INSTANCE_BEARER_TOKEN",
"ghcr.io/victoriametrics-community/mcp-victoriametrics"
],
"env": {
"VM_INSTANCE_ENTRYPOINT": "https://play.victoriametrics.com",
"VM_INSTANCE_TYPE": "cluster",
"VM_INSTANCE_HEADERS": "HEADER2=HEADER_VALUE,HEADER2=HEADER_VALUE_2",
"MCP_SERVER_MODE": "stdio",
"MCP_LISTEN_ADDR": ":8080",
"MCP_DISABLED_TOOLS": "export,metric_statistics,test_rules",
"MCP_DISABLE_RESOURCES": "false",
"MCP_HEARTBEAT_INTERVAL": "30s",
"VM_INSTANCE_BEARER_TOKEN": "<instance_bearer_token_for_authentication>"
}
}
}
}