JavaScript
MIT License
This project implements an MCP (Model Context Protocol) server for the Comexstat API, allowing AI models like Claude to interact directly with Brazil's foreign trade data.
The MCP Comexstat server provides tools to query Brazilian export and import statistics, including:
The MCP server provides the following tools:
getLastUpdate()
- Gets the date the data was last updatedgetAvailableYears()
- Lists the years available for querygetAvailableFilters()
- Lists available filtersgetFilterValues(filter, language?)
- Gets values for a specific filtergetAvailableFields()
- Lists the fields available for detailinggetAvailableMetrics()
- Lists available metricsqueryData(options)
- Performs detailed queries with the following parameters:flow
: "export" | "import"period
: { from: "YYYY-MM", to: "YYYY-MM" }monthDetail
: booleanfilters
: Array of filters (optional)details
: Array of fields for detailingmetrics
: Array of metricslanguage
: string (optional, default: "pt")queryMunicipalitiesData(options)
- Query data focusing on municipalitiesqueryHistoricalData(options)
- Query historical data (1989-1996)getStates()
- List Brazilian statesgetStateDetails(ufId)
- Details of a specific stategetCities()
- List of citiesgetCityDetails(cityId)
- Details of a specific citygetCountries(search?)
- List countriesgetCountryDetails(countryId)
- Details of a specific countrygetEconomicBlocks(options?)
- List economic blocksgetHarmonizedSystem(options?)
- Harmonized System (HS)getNBM(options?)
- Brazilian Nomenclature of GoodsgetNBMDetails(coNbm)
- Details of a specific NBM codeTo use the MCP server with Claude Desktop:
claude_desktop_config.json
file:MIT
You must be authenticated.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
mcp-comexstat