Skip to main content

NiFi MCP (Model Context Protocol)

This repository contains the NiFi MCP project. It provides a chat interface allowing users to interact with Apache NiFi instances using natural language queries. The system uses a Large Language Model (LLM) integrated with custom tools (MCP Tools) that can communicate with the NiFi API to retrieve information, document flows, and create and perform actions on NiFi components.

It has been tested with Nifi versions 1.23 and 1.28, but could work on other versions assuming the Nifi REST Api stays consistent. While it is quite functional, you will find that the type of LLM model you use will have a big effect on how well it follows your instructions. I have found o4-mini and gpt-4.1 to be good.

It's ability to read and document existing flows is very good. It's ability to create new and modify existing flows is OK, but often takes several iterations and some user help. My future plans are to refine the tools to improve this aspect. I may also introduce some tools to help it debug flows itself.

Example Conversations

Recent Updates

For the latest updates and release notes, see the GitHub Releases page.

Roadmap

My future plan is to work on improving the tool's accuracy and efficiency (reducing the number of tokens needed to acheive the goal). To do this I will focus on introducing guided workflows which can provide more granular control over the steps and quality, which may also lead to the ability to use less powerful and cheaper LLM's while improving the results. I feel creating new flows and documenting large flows will particularly benefit from this.

After this I will consider looking into support for more models. I will say that the Gemini support has been harder than expected due to its protobuf usage, and has slowed my progress along the roadmap, so for this reason I am going to hold off adding other models for now.

Setup Instructions

Note: These instructions should also be followed after pulling a new version as there may be new package requirements.

To set up the development environment and install all dependencies, follow these steps:

  1. Clone the Repository:

    git clone git@github.com:ms82119/NiFiMCP.git
    cd NiFiMCP
    
  2. Set Up a Virtual Environment: It's recommended to use a virtual environment to manage dependencies. You can create one using venv:

    python3 -m venv .venv
    
  3. Activate the Virtual Environment:

    • On macOS and Linux:
      source .venv/bin/activate
      
    • On Windows:
      .venv\Scripts\activate
      
  4. Install Dependencies: Use uv to install dependencies based on pyproject.toml and uv.lock:

    uv sync
    
  5. Update the config.yaml file with your Nifi details and LLM API keys Use the config.example.yaml as your guide for format and structure

  6. Run the MCP Server: Start the MCP server with:

    uvicorn nifi_mcp_server.server:app --reload --port 8000
    
  7. Run the Streamlit Client: Start the Streamlit client with:

    python -m streamlit run nifi_chat_ui/app.py
    

Usage Tips

For detailed usage information, tips, and UI features, see the Usage Guide.

Running Automated Tests

For comprehensive testing information and examples, see the Testing Guide.

Metadata

Release files for iflow-mcp_ms82119_nifimcp 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iflow-mcp_ms82119_nifimcp 0.1.4
File Size Uploaded
iflow_mcp_ms82119_nifimcp-0.1.4.tar.gz 232.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iflow-mcp_ms82119_nifimcp 0.1.4
File Interpreter ABI Platform
iflow_mcp_ms82119_nifimcp-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 495.0 kB

Release files / iflow_mcp_ms82119_nifimcp-0.1.4.tar.gz

Download URL iflow_mcp_ms82119_nifimcp-0.1.4.tar.gz
Size 232.2 kB
Tags Source
SHA-256 checksum
How to use checksums
259d67742689beba138f8a1ed3c6e1a47a065d16bdcec7ad7aad60ef48ec5150
BLAKE2b-256 checksum
How to use checksums
0fb6934fa9159cf45d038a4647835d1cbb78e9654812a4637d8018ed03f41c5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","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_ms82119_nifimcp-0.1.4-py3-none-any.whl

Download URL iflow_mcp_ms82119_nifimcp-0.1.4-py3-none-any.whl
Size 262.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e23ac7f68bbb029f6e0970a5806ed01eb8a4809e4323d517919541bb5a8ffc1
BLAKE2b-256 checksum
How to use checksums
f1784aa2c83057fcbaf94e4c9c44bcca8920db257b656f4eaf9f8ff1fee8d1a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","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 history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page