flink-mcp — Flink MCP Server
This project provides an MCP server that connects to Apache Flink SQL Gateway.
Prerequisites
-
A running Apache Flink cluster and SQL Gateway
- Start cluster:
./bin/start-cluster.sh - Start gateway:
./bin/sql-gateway.sh start -Dsql-gateway.endpoint.rest.address=localhost - Verify:
curl http://localhost:8083/v3/info
- Start cluster:
-
Configure environment:
- Set
SQL_GATEWAY_API_BASE_URL(defaulthttp://localhost:8083). You can use a.envfile at repo root.
- Set
Run
Install and run via the console script:
pip install -e .
flink-mcp
MCP clients should launch the server over stdio with command: flink-mcp.
Ensure SQL_GATEWAY_API_BASE_URL is set in your environment or .env.
Tools (v0.2.5)
flink_info(resource): returns cluster info from/v3/info.open_new_session(properties?: dict)->{ sessionHandle, ... }.get_config(sessionHandle: str): returns session configuration.configure_session(sessionHandle: str, statement: str): apply session-scoped DDL/config (CREATE/USE/SET/RESET/LOAD/UNLOAD/ADD JAR).run_query_collect_and_stop(sessionHandle: str, query: str, max_rows: int=5, max_seconds: float=15.0): execute, fetch up to N rows within T seconds, then STOP the job if ajobIDis present; closes the operation.run_query_stream_start(sessionHandle: str, query: str): execute a streaming query and return{ jobID, operationHandle }; the job is left running.fetch_result_page(sessionHandle: str, operationHandle: str, token: int): fetch a single page; returns{ page, nextToken, isEnd }.cancel_job(sessionHandle: str, jobId: str): issueSTOP JOB '<jobId>', wait until DESCRIBE JOB status is not RUNNING; returns{ jobID, status, jobGone, jobStatus }.
Notes
-
Tools are stateless; clients manage and pass session/operation handles explicitly.
-
run_query_stream_startreturns bothjobIDandoperationHandle; usefetch_result_pageto stream results. -
cancel_jobissues STOP and waits using DESCRIBE JOB;close_operationis invoked internally where appropriate. -
Endpoints target SQL Gateway v3-style paths.
Metadata
Release files for iflow-mcp_cledar-flink-mcp 0.2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| iflow_mcp_cledar_flink_mcp-0.2.6.tar.gz | 10.9 kB | Without provenance | Details for iflow_mcp_cledar_flink_mcp-0.2.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iflow_mcp_cledar_flink_mcp-0.2.6-py3-none-any.whl | Python 3 | none | any | Details for iflow_mcp_cledar_flink_mcp-0.2.6-py3-none-any.whl |
Total release size: 19.5 kB
Release files / iflow_mcp_cledar_flink_mcp-0.2.6.tar.gz
| Download URL | iflow_mcp_cledar_flink_mcp-0.2.6.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
64d3436d1ac50605341983c92c9c8811aa15808aae5f55e4a5860f72f21b468b
|
|
BLAKE2b-256 checksum How to use checksums |
8340c0b37bcda4f10855d9146453ca8df23bd7411accdd1cc485117f6c7533b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / iflow_mcp_cledar_flink_mcp-0.2.6-py3-none-any.whl
| Download URL | iflow_mcp_cledar_flink_mcp-0.2.6-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e31da2c4144c67e7e313bdcc01f3133a7627623fa75bad1728c3a7c7120a1442
|
|
BLAKE2b-256 checksum How to use checksums |
cef51fcc2b869b89c68e400b3942a35087d4913c0d7c821bd545507ed1af3941
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for iflow-mcp_cledar-flink-mcp 0.2.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.