A MCP server for CNPJ search using buscadordecnpj.com API
This server has moderate issues across naming, descriptions, and schema completeness. Tool names follow verb_noun conventions reasonably well (cnpj_detailed_lookup, term_search, cnpj_advanced_search, search_csv), but some descriptions lack depth and parameter descriptions are inconsistent. The cnpj_advanced_search tool has no required parameters (empty array), which is unusual for an 'advanced search' that takes 14 optional fields. The search_csv tool lacks detailed parameter descriptions for most fields, they are present in the schema but with no explanatory text. Schema quality is mixed: cnpj_detailed_lookup and term_search are well-structured, but search_csv has bare parameter definitions without descriptions for filtering fields. No output schemas are documented anywhere in the visible code, making it impossible for LLMs to predict what results look like. Error handling is not visible in the provided code excerpt, though the server references an API client class. Security appears sound (API key injected via environment, not as parameter), but no audit logging, rate limiting, or permission gating is evident. Tool composition is reasonable, each tool addresses a distinct search concern, but the search_csv tool overlaps significantly with cnpj_advanced_search, creating ambiguity about when to use each.
Busca avançada com filtros estruturados (exatos e intervalos). Use para refinamentos finos. Requer API key; 2 créditos por requisição.
Busca detalhada de dados completos de uma empresa por CNPJ (requer API key)
Exporta resultados de busca em formato CSV (requer API key) - 2 créditos por página
Busca por termo em múltiplos campos (texto livre). Ideal para consultas genéricas como 'padarias em SP Tatuapé'. Requer API key; 2 créditos por requisição.
No output schemas documented. LLMs cannot predict return types, fields, or structure. This forces agents to assume shape and risks parsing failures.
search_csv tool has 14 parameters with minimal or no descriptions (razao_social, nome_fantasia, cnae_principal, uf, municipio, bairro, cep, ddd, situacao_cadastral, porte_empresa, capital_social_min, capital_social_max, data_abertura_inicio, data_abertura_fim are present in schema but lack explanatory text). LLMs cannot reason about their purpose.
cnpj_advanced_search declares no required parameters (empty 'required' array), yet it is advertised as an advanced search with 14 optional filters. This is unusually permissive and invites ambiguous calls. Clarify if at least one filter is required or if an unfiltered search is truly valid.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 53 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 30 | - | v1 |
search_csv and cnpj_advanced_search overlap significantly (both accept the same filters: razao_social, nome_fantasia, cnae_principal, etc.). The distinction is unclear, is search_csv only for CSV export, or is it an alternative search interface? LLMs will struggle to choose between them.
Parameter descriptions in term_search, cnpj_advanced_search, and search_csv lack constraint information. For example, 'limite' is documented as 'Limit per page (default/max 10000)' but no minimum is stated. 'pagina' accepts integers with no documented minimum (likely 1). LLMs may pass invalid values (page 0, negative limits) without guidance.
No visible error handling guidance. The code excerpt shows a CNPJClient class but no try-catch logic, error codes, recovery paths, or user-facing error messages. If API calls fail, agents will have no recovery strategy.
No pagination guidance in tool descriptions. term_search, cnpj_advanced_search, and search_csv all accept pagina/page and limite/limit parameters, but descriptions do not clarify: Is page numbering 1-indexed? What happens if you request page 1000 with no results? Is there a total_count or next_cursor? LLMs need this to plan multi-page iteration.
No enum constraints for status fields. situacao_cadastral is documented in cnpj_advanced_search as 'Código (1,2,3,4,8)', hard-coded in text, not in schema. This should be an enum constraint so LLMs auto-complete valid options.
faixa_faturamento_estimado in term_search accepts values like '0_360k, 360k_1kk, 1kk_4.8kk, 4.8kk_20kk, 20kk_mais', a complex enum hidden in description text. Should be a formal schema enum. Same for porte_empresa.