Repository navigation
Conversation
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for proposing these new MCP integration components @Vinz2168.
This seems generic enough to fit within general goals for community-maintained capabilities, and the overall module structure looks sound.
There are some conventional items to address like unnecessary public modifiers on Property Descriptors and using multiline text blocks instead of concatenation for descriptions, which are easily adjusted.
On the test side, although the project is not completely consistent, the OkHttp MockWebServer library should be used for HTTP server testing instead of Jetty to provide better control over request and response handling.
As this is a larger effort, it may take some time to review fully, but those or some initial items to address.
|
Thanks for the review @exceptionfactory! Pushed an update addressing the initial items:
|
|
Pushed 689cba5 addressing the review feedback. Could a maintainer please approve the workflows when convenient? Thanks! |
|
Pushed cc512a8 to fix a timing-dependent assertion in StandardMcpClientServiceTest.reconnectsAfterServerRestartInvalidatesTheSession, which failed on the Windows and Corretto JDK 21 builds. After a 404 for an unknown session, the MCP SDK can re-initialize on its own before the service drops the session, so the test now accepts one or two new handshakes. The separate integration-tests failure is unrelated: MongoDBControllerServiceIT and MongoDBLookupServiceIT timed out connecting to the MongoDB test container. |
|
The previous CI failure was unrelated to this change (Testcontainers MongoDB ITs in |
|
All checks passed except docker-tests, which failed before compiling because the Develocity Maven extension could not be resolved from Maven Central (infrastructure issue). Could that job be re-run when convenient? The review feedback has been addressed in 689cba5 and cc512a8, ready for another look. Thanks! |
|
Hi @exceptionfactory, all points from your review have been addressed in 689cba5 (SSE transport removed, package-private descriptors, text blocks, mockwebserver3 instead of Jetty). All checks pass except docker-tests, which failed resolving com.gradle:develocity-maven-extension:2.6.0 from Maven Central; that job is green on main again since 10/28, so a re-run should clear it. Could you take another look when you have a moment? Thanks! |
- Add McpClientService API and StandardMcpClientService supporting the Streamable HTTP and SSE transports, with optional SSL Context Service, Bearer Token and sensitive dynamic properties sent as HTTP headers - Add InvokeMcpServer supporting Call Tool, Read Resource, Get Prompt and List Tools, Resources and Prompts, with configurable output content - Add optional include-mcp profile to nifi-assembly Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Removed legacy HTTP+SSE transport and Transport property - Removed unnecessary public modifiers on Property Descriptors and Relationships - Replaced concatenated descriptions with text blocks - Replaced Jetty with OkHttp MockWebServer in client service tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Replaced deprecated httpRequestCustomizer with addHttpRequestCustomizer - Declared pattern variables final Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Rebased onto the latest |
Summary
NIFI-16524
This adds a new
nifi-mcp-bundlethat lets NiFi act as a client ofModel Context Protocol (MCP) servers, so
flows can consume MCP tools, resources and prompts deterministically,
without an LLM in the loop.
McpClientService(API) andStandardMcpClientService: one MCP sessionper service, shared by all referencing processors, over Streamable HTTP or
SSE, with an optional SSL Context Service (TLS/mTLS), Bearer Token and
sensitive dynamic properties sent as HTTP headers. It connects lazily if
the server is down when the service is enabled, reconnects after transport
failures, and supports config verification.
InvokeMcpServer: Call Tool, Read Resource, Get Prompt and ListTools/Resources/Prompts. Arguments come from FlowFile content or from a
property with Expression Language. Output can be the full result, text
only, or the tool's
structuredContent. Relationships:success,tool error(isError: true),originalandfailure.the NiFi BOM), json-schema-validator, SnakeYAML Engine, ITU (Apache 2.0)
and Reactive Streams (CC0). All are documented in the NAR's
LICENSE/NOTICE.include-mcpprofile.security implications.
Unit tests run the processor against a fake service, and the service against
a real in-process MCP Java SDK server on Jetty, so no network is needed.
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000VerifiedstatusPull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
./mvnw clean install -P contrib-check(bundle modules)Built and tested locally on JDK 26; relying on CI for JDK 21 and 25.
Licensing
LICENSEandNOTICEfilesDocumentation
🤖 Generated with Claude Code