Skip to content

Fix n8n compatibility in Plumber API schema#3

Merged
armish merged 1 commit into
mainfrom
claude/fix-n8n-mcp-compatibility-011CUqkohahfQJzLTcxJDodE
Nov 6, 2025
Merged

Fix n8n compatibility in Plumber API schema#3
armish merged 1 commit into
mainfrom
claude/fix-n8n-mcp-compatibility-011CUqkohahfQJzLTcxJDodE

Conversation

@armish

@armish armish commented Nov 6, 2025

Copy link
Copy Markdown
Owner

This commit addresses JSON schema format incompatibilities with n8n's built-in MCP node. The changes ensure proper data streaming and validation when using plumber2mcp with n8n workflow automation.

Changes:

  1. Convert 'required' field from character() to list() in inputSchema

    • n8n expects 'required' to be a JSON array, not a character vector
    • Empty required fields now serialize as [] instead of []
  2. Comment out outputSchema from tool definitions

    • n8n's structured data validation fails when outputSchema is present
    • The schema was causing validation errors for text responses
    • Tools still function correctly without outputSchema defined
  3. Update all test expectations to match new schema format

    • test-enhanced_schemas.R: Update required field type checks
    • test-security_validation.R: Remove outputSchema expectations
    • test-edge_cases.R: Already compatible with list-based required
    • test-pr_mcp.R: Already compatible with list-based required

Impact:

  • Existing functionality preserved
  • Better n8n integration out of the box
  • No breaking changes to API endpoints or MCP protocol
  • Tests updated to reflect new schema format

Fixes compatibility with n8n MCP node HTTP streaming transport.

This commit addresses JSON schema format incompatibilities with n8n's
built-in MCP node. The changes ensure proper data streaming and
validation when using plumber2mcp with n8n workflow automation.

Changes:
1. Convert 'required' field from character() to list() in inputSchema
   - n8n expects 'required' to be a JSON array, not a character vector
   - Empty required fields now serialize as [] instead of []

2. Comment out outputSchema from tool definitions
   - n8n's structured data validation fails when outputSchema is present
   - The schema was causing validation errors for text responses
   - Tools still function correctly without outputSchema defined

3. Update all test expectations to match new schema format
   - test-enhanced_schemas.R: Update required field type checks
   - test-security_validation.R: Remove outputSchema expectations
   - test-edge_cases.R: Already compatible with list-based required
   - test-pr_mcp.R: Already compatible with list-based required

Impact:
- Existing functionality preserved
- Better n8n integration out of the box
- No breaking changes to API endpoints or MCP protocol
- Tests updated to reflect new schema format

Fixes compatibility with n8n MCP node HTTP streaming transport.
@armish armish merged commit 9b1002d into main Nov 6, 2025
4 checks passed
@armish armish deleted the claude/fix-n8n-mcp-compatibility-011CUqkohahfQJzLTcxJDodE branch November 12, 2025 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants