nifi-mcp
Provides tools for interacting with the Apache NiFi REST API, enabling management of process groups, processors, connections, queues, controller services, parameters, provenance, and version control in a NiFi instance.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nifi-mcpshow me the process group tree"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nifi-mcp
An MCP server and a CLI for the Apache NiFi REST API, sharing one async client.
nifi-mcp— exposes NiFi to an LLM agent over stdio (59 tools).nifi— the same capabilities from a terminal, with tables by default and--jsonfor scripting.
Built and verified against NiFi 1.15.3. See SPEC.md for the design decisions.
Install
uv sync
source .venv/bin/activate
nifi doctor # verify connectivity, auth, host header, and versionRelated MCP server: n8n Workflow Builder
Configuration
Settings resolve in this order: environment → .env → defaults.
Copy .env.example to .env to start. The important ones:
Variable | Default | Meaning |
|
| The NiFi instance |
|
| Host header override — see below |
|
| Gates every mutating MCP tool |
|
| TLS verification (dev server is self-signed) |
Credentials
Credentials come from the environment, and only from the environment:
Variable | Meaning |
| Login identity |
| Login password |
Set them however your environment does it — exported in the shell, in the MCP server's
env block, or in a .env file next to pyproject.toml (gitignored). The process is
handed its secret; it never goes looking for one on disk, so what it authenticates with
does not depend on the directory it was launched from.
export NIFI_USERNAME='7090b632-6bb7-4a11-b6bc-c308a331e559'
export NIFI_PASSWORD='...'
nifi doctorNiFi in single-user mode generates the pair on its first run and logs it once, to
logs/nifi-app.log on the NiFi host:
grep 'Generated \(Username\|Password\)' logs/nifi-app.log... o.a.n.a.s.SingleUserCredentialsGenerator Generated Username [<uuid>]
... o.a.n.a.s.SingleUserCredentialsGenerator Generated Password [<password>]Copy those two values into the variables above. If the line has already been rotated out of the log, set a pair of your own instead:
./bin/nifi.sh set-single-user-credentials <username> <password> # on the NiFi hostThe values are exchanged for a JWT at POST /access/token; the token is cached, its
exp is decoded, and it is refreshed about 60s before expiry (and once more on any
401). The password itself is sent only at login, is held in a SecretStr, and never
appears in logs or repr().
The host header
NiFi validates the Host header against nifi.web.proxy.host. Reaching the instance by
an address that is not in that allowlist — for example from WSL at 172.21.80.1 when NiFi
runs on the Windows host — gets this:
The request contained an invalid host header [172.21.80.1:8443]NIFI_HOST_HEADER rewrites the header without changing where the connection goes. Set it
to an empty value if your NiFi accepts the real host. nifi doctor diagnoses this case.
CLI
nifi doctor # connectivity + auth + version diagnostics
nifi about # version and identity
nifi status # flow health at a glance
nifi bulletins # recent warnings and errors
nifi pg tree # the flow, as a tree
nifi pg list|get|create|delete|start|stop
nifi processor list|get|create|update|start|stop|run-once|terminate|delete
nifi connection list|get|create|delete
nifi queue list|peek|empty
nifi cs list|get|create|enable|disable|delete
nifi param list|get|create|set|delete
nifi types search|show
nifi provenance query|lineage
nifi version status|registries|commit
nifi system diagnostics|counters|clusterGlobal flags: --json (raw JSON), --yes (skip destructive prompts), --dry-run
(show what would happen), --verbose (log HTTP to stderr).
Exit codes: 0 ok, 1 NiFi error, 2 usage error, 3 connection or auth failure.
Example: build and run a flow
GID=$(nifi --json pg create demo | jq -r .id)
GEN=$(nifi --json processor create GenerateFlowFile --pg $GID --name gen \
--period "1 sec" --prop "File Size=64B" | jq -r .id)
LOG=$(nifi --json processor create LogAttribute --pg $GID --name log \
--y 300 --auto-terminate success | jq -r .id)
nifi connection create $GEN $LOG -r success --pg $GID
nifi pg start $GID
nifi connection list $GID # watch the queue
nifi pg stop $GID
nifi --yes pg delete $GIDComponent types accept short names (GenerateFlowFile); they are resolved against the
instance's catalogue. nifi types search kafka finds what is installed.
MCP server
Register with Claude Code:
claude mcp add nifi -- /home/alexsaez/projects/nifi-mcp/.venv/bin/nifi-mcpOr add to your MCP client config directly:
{
"mcpServers": {
"nifi": {
"command": "/home/alexsaez/projects/nifi-mcp/.venv/bin/nifi-mcp",
"env": {
"NIFI_BASE_URL": "https://172.21.80.1:8443",
"NIFI_HOST_HEADER": "localhost:8443",
"NIFI_USERNAME": "7090b632-6bb7-4a11-b6bc-c308a331e559",
"NIFI_PASSWORD": "...",
"NIFI_ALLOW_WRITE": "false"
}
}
}
}Note that env values in this config file are stored in plain text, so it should be
readable only by you. To keep the password out of the file entirely, export
NIFI_USERNAME / NIFI_PASSWORD in the shell that launches the client and reference
them as "${NIFI_PASSWORD}" if your client expands variables, or omit them here and let
the server inherit them.
If the configuration is wrong the server still starts and each tool call returns a
structured error naming the problem. It does not exit, because a process that dies
before the transport is established shows up in the client as nothing more than
"connection closed". nifi doctor diagnoses the same things from a terminal.
Write safety
Two layers, because the caller is a model:
NIFI_ALLOW_WRITE— when false (the default), mutating tools are not registered. The model sees 28 read tools and cannot attempt a write at all. Set it totrueto register all 59.confirm— the 9 destructive tools (deletes,nifi_empty_queue,nifi_terminate_processor,nifi_stop_version_control) takeconfirm. Called without it, they report exactly what would be affected and change nothing.
Tools also carry MCP annotations (read_only_hint, destructive_hint) so clients can
apply their own policy.
The CLI is deliberately not gated by NIFI_ALLOW_WRITE — a human at a terminal is
already the confirmation. Destructive commands prompt instead; --yes skips the prompt.
Development
pytest # 49 unit tests, no server needed
NIFI_INTEGRATION=1 pytest # + 5 live tests against NIFI_BASE_URL
ruff check src tests && mypy src/nifi_mcpIntegration tests build a real flow inside a scratch process group and tear it down afterwards; they never touch anything outside it.
Layout
src/nifi_mcp/
├── config.py settings from environment and .env
├── errors.py typed exceptions with actionable hints
├── client.py async client: auth, host header, revisions, retries
├── compat.py version detection, 1.x/2.x differences
├── summaries.py trim NiFi entities to the useful fields
├── api/ one module per resource family
├── tools/ MCP tool definitions (read_tools / write_tools)
├── server.py MCP entry point
└── cli.py Typer CLINotes on the NiFi API
Three things the client handles so callers don't have to:
Revisions. Every mutating call must echo the revision it read (optimistic locking).
update_with_revisionfetches, merges, and retries once on a409.Async request endpoints. Queue listings, drop requests, provenance queries, and parameter updates are submitted, polled, then deleted. Some of these are
POSTs that only read; those bypass the write gate explicitly.Display strings. NiFi returns
queuedCountas a formatted string ("1,234"). The summaries expose numericcount/bytesalongside the_displayvariants.
Known gaps
NiFi 2.x auth (OIDC/SAML) — the compat layer detects the version, but 2.x is untested.
Version-control writes are implemented but unexercised: no registry is configured on the dev server.
Cluster management, tenants/policies, and templates are out of scope (SPEC.md §11).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityAmaintenanceEnables AI agents to create, retrieve, update, and manage n8n workflows through the n8n API. Supports full workflow lifecycle management including activation, deactivation, and deletion operations.396MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage n8n automation workflows through natural language commands, including creating, executing, monitoring, and organizing workflows with full CRUD operations and execution management.1482MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with n8n workflow automation instances through the REST API. Supports workflow management, execution control, tag organization, execution history monitoring, and webhook management.19634MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to manage n8n workflow automation instances through tools for workflow CRUD operations, execution monitoring, and webhook triggering. It facilitates programmatic interaction with n8n instances via the n8n API with AI-optimized descriptions and error handling.62MIT
Related MCP Connectors
Create and manage AI agents that collaborate and solve problems through natural language interacti…
Free public MCP for AI agents — 193 tools, 44 workflows. No API key.
Universal AI API Orchestrator — 1,554 tools, 96 services. One install.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/alexxonline/nifi-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server