gnodet opened a new pull request, #29186:
URL: https://github.com/apache/camel/pull/29186

   ## Summary
   
   Closes CAMEL-26358.
   
   Integrates the official 
[`@modelcontextprotocol/conformance`](https://www.npmjs.com/package/@modelcontextprotocol/conformance)
 npm suite into the `camel-mcp-server` test suite, providing an external 
protocol-level validation of the Camel Main HTTP MCP server.
   
   ## What changed
   
   ### New: `OfficialMcpConformanceIT`
   
   A JUnit 5 integration test that:
   1. Starts a `camel-platform-http-main` HTTP server with ai-tool routes whose 
names match the official conformance scenario requirements (`test_simple_text`, 
`test_error_handling`, `test_image_content`, etc.)
   2. Invokes `npx @modelcontextprotocol/conformance server --url 
http://localhost:<port>/mcp --expected-failures expected-failures.yaml`
   3. Asserts exit code 0
   
   The test is gated by `@EnabledIfSystemProperty(named = 
"official-mcp-conformance", ...)` so it is skipped unless Node.js is available.
   
   ### New: `expected-failures.yaml`
   
   Baseline of known gaps, with one comment per entry explaining the missing 
capability:
   - **tools-call-image / audio / embedded-resource / mixed-content** — Camel's 
MCP bridge produces only `TextContent`; typed content is not yet wired
   - **tools-call-with-logging / with-progress** — server→client notifications 
during tool execution are not yet plumbed
   - **tools-call-sampling / elicitation / elicitation-sep*** — 
`sampling/createMessage` and `elicitation/create` round-trips are not yet 
implemented
   - **resources-read-text / binary / templates-read / subscribe / 
unsubscribe** — resource read/subscribe dispatch not yet implemented
   - **prompts-\*** — MCP prompts have no Camel DSL equivalent yet
   - **completion-complete** — `completion/complete` endpoint not yet 
implemented
   - **dns-rebinding-protection** — Host/Origin validation for non-localhost 
requests not yet enforced
   
   The stale-baseline check enforces baseline hygiene: if a capability is added 
and the entry is not removed from the YAML, the test fails with exit 1.
   
   ### New: `-Poc` Maven profile
   
   ```bash
   mvn verify -Poc          # run the official conformance suite
   mvn verify               # skip it (normal CI)
   ```
   
   The profile is off by default because it requires Node.js ≥ 18 and npm 
registry access. CI environments without Node.js are unaffected.
   
   ### Updated: `test-execution.md`
   
   Documents how to run the new test and what the expected-failures baseline 
means.
   
   ## How to verify
   
   ```bash
   # Requires Node.js ≥ 18 and internet access (npm registry for first run)
   mvn verify -Poc -pl components/camel-ai/camel-mcp-server
   ```
   
   Expected output includes:
   ```
   Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 — OfficialMcpConformanceIT
   BUILD SUCCESS
   ```
   
   The conformance suite summary shows 8 scenarios passing outright, the rest 
registered in the baseline.
   
   _Filed by Hermes Agent on behalf of Guillaume Nodet_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to