Skip to content

🐛 Parsing Bug: Brevo API spec only shows 6 operations instead of 150+ (works fine for larger GitHub API) #10

@NewCoder89

Description

@NewCoder89

🐛 Bug Description

The @reapi/mcp-openapi server is only parsing 6 operations from the Brevo API specification, despite the YAML file containing 150+ operationIds. This appears to be a parsing bug specific to certain YAML structures, as much larger specs work perfectly.

📊 Evidence-Based Comparison

Working Specs:

  • GitHub API: 700+ operations, 8.7MB YAML → 100% parsed correctly
  • OpenAI API: 122 operations, 2.1MB YML → 100% parsed correctly
  • Render API: 100+ operations, 268KB JSON → 100% parsed correctly

Problematic Spec:

  • Brevo API: 150+ operations, 902KB YML → Only 6 operations parsed
    • Source: https://api.brevo.com/v3/swagger_definition_v3.yml
    • Manual count confirms 150+ operationId: entries in YAML
    • MCP catalog shows only: getEmailCampaigns, getEmailCampaign, sendTransacEmail, getSmtpTemplates, getContacts, getContactInfo

🔍 Technical Details

File Analysis:

  • Format: OpenAPI 3.0.1 YAML
  • Size: 902KB (much smaller than working GitHub spec)
  • Structure: Standard OpenAPI format with proper paths, operationIds, schemas
  • Manual verification: findstr /c:"operationId:" brevo-api.yml shows 150+ entries

MCP Integration:

"openapi": {
  "command": "npx",
  "args": ["-y", "@reapi/mcp-openapi@latest", "--dir", "./specs"],
  "env": {"DEBUG": "true"}
}

🔄 Steps to Reproduce

  1. Download Brevo API spec: curl -o brevo-api.yml "https://api.brevo.com/v3/swagger_definition_v3.yml"
  2. Place in specs directory
  3. Run mcp_openapi_refresh-api-catalog
  4. Check mcp_openapi_get-api-catalog - only 6 operations visible
  5. Search for missing operations like createSmsCampaign - not found

💭 Expected vs Actual Behavior

Expected: All 150+ operations should be parsed and available through MCP tools

Actual: Only first 6 operations are parsed, remaining operations are ignored

🌐 Impact

This affects comprehensive API integration workflows where developers expect complete API coverage from OpenAPI specifications. The parsing inconsistency makes it difficult to rely on the MCP server for complete API documentation.

📋 Additional Context

  • Other major APIs (GitHub 8.7MB, OpenAI 2.1MB) parse perfectly
  • Issue appears YAML-structure specific, not size-related
  • Bug affects business workflows requiring complete Brevo API access
  • Manual file verification confirms all operations exist in source YAML

🛠️ Potential Investigation Areas

  1. YAML parsing timeout/limits for specific structural patterns
  2. Complex schema dereferencing issues in Brevo spec
  3. Memory allocation during parsing process
  4. Path/operation enumeration logic

Thank you for this excellent MCP server! This bug report aims to help improve the parsing reliability for complex OpenAPI specifications.

Environment:

  • @reapi/mcp-openapi@latest via NPX
  • Windows 10
  • Cursor IDE with MCP integration

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions