agentleFS
vaquarkhanvaquarkhan/flink-mcp-enterprise-server/AGENTS.md

flink-mcp-enterprise-server

AGENTS.md0 starsChanged 4 months agoApache-2.0View on GitHub

Author: Viquar Khan Instructions for any coding agent (Cursor, Kiro, GitHub Copilot, ChatGPT/Codex, Google Gemini, Claude Code, Windsurf, etc.). Mint approval tokens:

The file

We split this AGENTS.md into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After behavior changes: mvn test must stay green.

    line 24
  2. Very specific:

    Keep Logback on stderr; include MDC trace= via Trace.

    line 84
  3. Distinctive:

    Do not claim features that are not implemented (no inventing OTel exporters, mTLS, etc.).

    line 87

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md — Flink MCP Enterprise Server

Author: Viquar Khan

Instructions for any coding agent (Cursor, Kiro, GitHub Copilot, ChatGPT/Codex, Google Gemini, Claude Code, Windsurf, etc.).

What this repo is

  • Production Java Model Context Protocol (MCP) server for Apache Flink.
  • Maven artifact: io.github.vaquarkhan:flink-mcp-server (shaded runnable: classifier all).
  • Main class: io.github.vaquarkhan.flinkmcp.FlinkMcpServer.
  • Transports: stdio (default) and HTTP (/mcp + Bearer; /healthz /readyz /metrics).
  • Backends: Flink REST (FLINK_REST_URL) and optional SQL Gateway (MCP_FLINK_GATEWAY_URL).
  • Docs: doc/ · Examples: examples/ · Site: site/ · Skills: .cursor/skills/ + skills/.

Non-negotiables

  1. Secure by default — writes off until MCP_FLINK_WRITE_ENABLED=true and MCP_FLINK_APPROVAL_SECRET is set.
  2. Stdout is MCP JSON-RPC only — all logs go to stderr (Logback). Never add System.out.println.
  3. Fail-closed governance order: expose → readonly/scope → policy → approval → rate limit → breaker → timed execute → DLP/bound → audit.
  4. Path injection defense — always Inputs.requireId / requireInt / jar allow-list before building REST paths or reading files.
  5. MCP SDK 1.1.3 API verbatim — JacksonMcpJsonMapperSupplier().get(); do not pass Jackson ObjectMapper into transport constructors.
  6. Source encoding UTF-8 without BOM — BOM breaks javac (illegal character: '\ufeff').
  7. After behavior changes: mvn test must stay green; run python examples/run_all.py --skip-build when Flink is available.

Layout

flowchart TB
  root["repo root"]
  root --> src["src/main/java/.../flinkmcp/"]
  root --> test["src/test/java — unit tests"]
  root --> ex["examples/ — download-and-run"]
  root --> docs["doc/ + docs/"]
  root --> site["site/ — GitHub Pages"]
  root --> agents["AGENTS.md"]
  root --> skills[".cursor/skills/ + skills/"]
PackageRole
configEnv config + validate
governancePipeline, rate limit, breaker, DLP
securityApprovals, Bearer, policy, nonces
clientFlink REST + SQL Gateway + SQL guard
observabilityTrace/MDC, metrics, audit
transportJetty HTTP + ops endpoints

Commands agents should run

mvn clean test
mvn -DskipTests package
python examples/run_all.py --start-flink          # needs Docker + Python
java -jar target/flink-mcp-server-0.2.0-all.jar   # stdio MCP

Mint approval tokens:

java -cp target/flink-mcp-server-0.2.0-all.jar \
  io.github.vaquarkhan.flinkmcp.security.ApprovalTokens <secret> stop_job <jobId> 300

How to help users

User askDo this
Run / installREADME.md Quick start + doc/getting-started.md
Download-and-run demosexamples/README.md → run_all.ps1 / run_all.sh
Security modeldoc/security-controls.md + non-negotiables above
Config knobsdoc/configuration.md
Errorsdoc/error-codes.md
Tools / resourcesdoc/tools-and-resources.md
Tutorialdoc/tutorial.md
Add exampleexamples/0N_slug/{README.md,run.py,data/} + wire into run_all.py
Change governanceUpdate Governance.java + tests + doc/error-codes.md if new codes
Publish Mavendocs/PUBLISHING.md / doc/publishing.md
Websitesite/ deployed by .github/workflows/pages.yml

Coding standards

  • Java 17 (maven.compiler.release=17); match existing style; prefer small diffs.
  • Keep Logback on stderr; include MDC trace= via Trace.
  • New deny codes must appear in code and doc/error-codes.md.
  • Example runners must exit non-zero when expectations fail or Flink is down.
  • Do not claim features that are not implemented (no inventing OTel exporters, mTLS, etc.).
  • Author attribution: Viquar Khan (@author / file headers).

Skills

  • Cursor: .cursor/skills/*/SKILL.md
  • Portable: skills/*/SKILL.md
  • Index: doc/agents-and-skills.md
SkillWhen
flink-mcp-enterpriseBuild, test, configure, MCP wiring
flink-mcp-examplesExamples / Docker Flink / run_all
flink-mcp-security-reviewApprovals, DLP, policy, scopes

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.