flink-mcp-server
v0.4.4Platform-independent, read-only MCP server for monitoring Apache Flink clusters via the REST API
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_clusters
Flink clusters from the config file and, if enabled, discovered in Kubernetes (names and URLs, never credentials). `discovery_error` explains a failed discovery.
fleet_overview
Overview of every configured cluster in one call; unreachable clusters are reported with an error instead of failing the whole call.
list_flink_deployments
FlinkDeployments (Flink Kubernetes Operator) with lifecycle, JobManager and job state. Needs Kubernetes access (kubernetes section in the clusters file, or FLINK_KUBERNETES=true).
| Parameter | Type | Description |
|---|---|---|
namespace |
diagnose_deployment
Kubernetes/operator-level health of one FlinkDeployment: operator errors, JobManager state and its pods (CrashLoopBackOff, OOMKilled, image pull errors, unschedulable). Use diagnose_job for problems inside a running job.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
namespace * | string |
cluster_overview
Flink version, TaskManager/slot counts and job counts by state.
| Parameter | Type | Description |
|---|---|---|
cluster |
list_jobs
All jobs (running and recently finished) with state and duration.
| Parameter | Type | Description |
|---|---|---|
cluster |
job_details
State and per-vertex status/parallelism of one job.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | |
cluster |
job_exceptions
Root exception and the most recent entries of the job's exception history.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | |
cluster | ||
limit | integer |
checkpoint_stats
Checkpoint counts, failure rate, last completed/failed checkpoint.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | |
cluster |
backpressure
Per-vertex backpressure (avg ms/s backpressured, busy, idle) for a job.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | |
cluster |
vertex_metrics
Operator/task metrics of a job's vertices (all of them, or one vertex_id from job_details), aggregated over subtasks as min/max/avg. Without names it lists the metric ids (narrow with search, e.g. "lag"). A name may omit the operator prefix: "currentFetchEventTimeLag" matches "Source__<name>.currentFetchEventTimeLag".
| Parameter | Type | Description |
|---|---|---|
job_id * | string | |
cluster | ||
names | ||
search | ||
vertex_id |
list_savepoints
Savepoints of a job, the latest completed checkpoint, and what the job was restored from, each with its storage path. Use it to find where a job can be restarted from; paths are only present for savepoints and for checkpoints retained on cancellation.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | |
cluster |
job_timeline
What happened to a job and when, oldest first: the latest time it entered each state, recorded failures (exception history), failed checkpoints, savepoints and restores, and, for Kubernetes clusters, operator and pod events. Flink keeps no event log, so the result lists its `coverage` limits and any source that could not be read; a restart is shown only when a recorded failure or restore proves it. Keeps the most recent `limit` events.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | |
cluster | ||
limit | integer |
diagnose_job
One-call health verdict for a job: combines state, task status, exceptions, checkpoints, backpressure and source lag into ranked findings. Start here when asked "why is this job unhealthy/slow?". When Prometheus is configured it also reports trends over the last `history` (default "1h"; "off" to skip): restarts, checkpoint failures and durations, sustained backpressure. Those are observations with their metric and window, not causes; a Prometheus problem never changes the live diagnosis.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | |
cluster | ||
history | string |
taskmanagers
TaskManagers with slot usage and resources.
| Parameter | Type | Description |
|---|---|---|
cluster |
list_log_files
Log files of the JobManager, or of one TaskManager when `taskmanager_id` is given (ids come from `taskmanagers`).
| Parameter | Type | Description |
|---|---|---|
cluster | ||
taskmanager_id |
get_logs
Tail of a Flink log: the JobManager's, or one TaskManager's when `taskmanager_id` is given. `level` ("WARN", "ERROR", ...) keeps only entries at that level or above, each with its stack trace; `search` keeps entries containing the text (case-insensitive). `file` defaults to the newest *.log; see `list_log_files`. The result also counts the warnings and errors in the whole file, so a clean tail of a noisy file is not mistaken for a clean log.
| Parameter | Type | Description |
|---|---|---|
cluster | ||
file | ||
level | ||
lines | integer | |
search | ||
taskmanager_id |
job_metrics
Job-level metrics. Give `names` to read values; omit it to list the available metric ids (narrow them with `search`, e.g. "checkpoint"). Flink fetches metrics lazily, so right after a job starts the first answer can take a couple of seconds.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | |
cluster | ||
names | ||
search |
list_jars
JAR files uploaded to the cluster with their entry classes.
| Parameter | Type | Description |
|---|---|---|
cluster |
cluster_config
JobManager configuration (secrets are masked by Flink). Use `search` to filter keys, e.g. "checkpoint" or "state.backend".
| Parameter | Type | Description |
|---|---|---|
cluster | ||
search |
job_config
Execution configuration of a job.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | |
cluster |