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:
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository7 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- flink-mcp-enterpriseSkill
- flink-mcp-examplesSkill
- flink-mcp-security-reviewSkill
- flink-mcp-enterpriseSkill
- flink-mcp-examplesSkill
- flink-mcp-security-reviewSkill
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
- Very specific: line 24
After behavior changes: mvn test must stay green.
- Very specific: line 84
Keep Logback on stderr; include MDC trace= via Trace.
- Distinctive: line 87
Do not claim features that are not implemented (no inventing OTel exporters, mTLS, etc.).
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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.
Files
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: classifierall). - 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
- Secure by default — writes off until
MCP_FLINK_WRITE_ENABLED=trueandMCP_FLINK_APPROVAL_SECRETis set. - Stdout is MCP JSON-RPC only — all logs go to stderr (Logback). Never add
System.out.println. - Fail-closed governance order: expose → readonly/scope → policy → approval → rate limit → breaker → timed execute → DLP/bound → audit.
- Path injection defense — always
Inputs.requireId/requireInt/ jar allow-list before building REST paths or reading files. - MCP SDK 1.1.3 API verbatim —
JacksonMcpJsonMapperSupplier().get(); do not pass JacksonObjectMapperinto transport constructors. - Source encoding UTF-8 without BOM — BOM breaks
javac(illegal character: '\ufeff'). - After behavior changes:
mvn testmust stay green; runpython examples/run_all.py --skip-buildwhen 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/"]| Package | Role |
config | Env config + validate |
governance | Pipeline, rate limit, breaker, DLP |
security | Approvals, Bearer, policy, nonces |
client | Flink REST + SQL Gateway + SQL guard |
observability | Trace/MDC, metrics, audit |
transport | Jetty 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 MCPMint approval tokens:
java -cp target/flink-mcp-server-0.2.0-all.jar \
io.github.vaquarkhan.flinkmcp.security.ApprovalTokens <secret> stop_job <jobId> 300How to help users
| User ask | Do this |
| Run / install | README.md Quick start + doc/getting-started.md |
| Download-and-run demos | examples/README.md → run_all.ps1 / run_all.sh |
| Security model | doc/security-controls.md + non-negotiables above |
| Config knobs | doc/configuration.md |
| Errors | doc/error-codes.md |
| Tools / resources | doc/tools-and-resources.md |
| Tutorial | doc/tutorial.md |
| Add example | examples/0N_slug/{README.md,run.py,data/} + wire into run_all.py |
| Change governance | Update Governance.java + tests + doc/error-codes.md if new codes |
| Publish Maven | docs/PUBLISHING.md / doc/publishing.md |
| Website | site/ 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=viaTrace. - 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
| Skill | When |
flink-mcp-enterprise | Build, test, configure, MCP wiring |
flink-mcp-examples | Examples / Docker Flink / run_all |
flink-mcp-security-review | Approvals, DLP, policy, scopes |
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
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.

