- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13
 
Description
🐛 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
 
 - Source: 
 
🔍 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.ymlshows 150+ entries 
MCP Integration:
"openapi": {
  "command": "npx",
  "args": ["-y", "@reapi/mcp-openapi@latest", "--dir", "./specs"],
  "env": {"DEBUG": "true"}
}🔄 Steps to Reproduce
- Download Brevo API spec: 
curl -o brevo-api.yml "https://api.brevo.com/v3/swagger_definition_v3.yml" - Place in specs directory
 - Run 
mcp_openapi_refresh-api-catalog - Check 
mcp_openapi_get-api-catalog- only 6 operations visible - 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
- YAML parsing timeout/limits for specific structural patterns
 - Complex schema dereferencing issues in Brevo spec
 - Memory allocation during parsing process
 - 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