Skip to main content

MCP server for Apache Flink SQL Gateway

Project description

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/v1/info
  • Configure environment:

    • Set SQL_GATEWAY_API_BASE_URL (default http://localhost:8083). You can use a .env file at repo root.

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

  • open_new_session(properties: dict|None) → returns sessionHandle
  • get_session_handle_config(session_handle: str)
  • execute_query(session_handle: str, query: str, execution_config: dict|None) → returns operationHandle
  • get_operation_status(session_handle: str, operation_handle: str)
  • fetch_result_page(session_handle: str, operation_handle: str, token: int=0)

Notes

  • Endpoints target SQL Gateway v3-style paths when available.
  • Inspired by: "Hands-on MCP Server Deep Dive: Connecting Flink SQL Gateway to the LLM Ecosystem".

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flink_mcp-0.1.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flink_mcp-0.1.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page