MDIC (Comércio Exterior) MCP for AI. Query official Brazilian trade statistics instantly.
Works with every AI agent you already use
…and any MCP-compatible client








Connect to your AI in seconds.
MDIC (Comércio Exterior) connects your AI client directly to Brazil's Ministry of Development, Industry, Trade and Services (MDIC) open data portal.
It lets you list all available trade datasets, search for specific packages by keyword, inspect dataset metadata, and query the full datastore using SQL-like parameters for export/import statistics.
What your AI can do
Get package
Gets detailed metadata for a single, specified data package (dataset).
Get resource
Retrieves metadata and links for a specific file resource within an MDIC package.
List packages
Lists every single available dataset (package) in the entire MDIC portal.
Retrieves a full inventory of every trade data package hosted on the MDIC portal.
Filters and finds relevant data packages using keywords like 'exportação' or 'importação'.
Retrieves detailed information, tags, and resource lists for one known dataset ID.
Provides metadata and download paths for individual data files within a selected package.
Executes SQL-like searches directly against the datastore to pull specific, limited rows of trade statistics.
Ask an AI about this
Waiting for input…
MDIC (Comércio Exterior) MCP Server: 5 Tools for Data Retrieval
These five tools let your AI client discover, inspect, and run queries against the massive official Brazilian trade data repository.
Make your AI actually useful.
Add this MCP to Claude, Cursor, or Windsurf and your AI stops guessing. It gets real tools to look things up, take action, and handle the stuff you keep doing by hand.
Start using MDIC (Comércio Exterior) on VinkiusGet Package
Gets detailed metadata for a single, specified data package (dataset).
Get Resource
Retrieves metadata and links for a specific file resource within an MDIC package.
List Packages
Lists every single available dataset (package) in the entire MDIC portal.
Search Datastore
Runs a query directly against the data rows to pull filtered results from a resource.
Search Packages
Finds relevant dataset packages using a keyword search string.
Security and governance baked right in.
Pick your AI client below to get set up. Just create a Vinkius account, subscribe, and you're instantly up and running. We handle the entire backend infrastructure, delivering out-of-the-box support for HTTPS Streamable, SSE, and OAuth2—zero messy routing required.
Choose How to Get Started
Build a custom MCP for your own tools, or connect a ready-made integration from our catalog.
Build Your Own
Turn any API into an MCP. Import a spec, define Agent Skills, or deploy with MCPFusion.
- Import from OpenAPI, Swagger, or YAML specs
- Create Agent Skills with progressive disclosure
- Deploy to edge with MCPFusion framework
- Built in DLP, auth, and compliance on every call
- Real time usage dashboard and cost metering
- Publish to catalog or keep private
Make Your AI Do More
Start with MDIC (Comércio Exterior), then connect any of our 5,100+ other servers whenever your AI needs more. One click, no limits.
- Use this MCP plus 5,100+ others, all in one place
- Add new capabilities to your AI anytime you want
- Every connection is secured and compliant automatically
- Track usage and costs across all your servers
- Works with Claude, ChatGPT, Cursor, and more
- New servers added to the catalog every week
Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by MDIC (Comércio Exterior). All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
VINKIUS INFRASTRUCTURE
Cloud Hosted
Managed infra
V8 Isolated
Sandboxed per request
Zero-Trust Proxy
No stored credentials
DLP Enforced
Policy on every call
GDPR Compliant
EU data residency
Token Compression
~60% cost reduction
Works with Claude, ChatGPT, Cursor, and more
The Model Context Protocol standardizes how applications expose capabilities to LLMs. Instead of operating in isolation, your AI gains direct access to external platforms, live data, and real-world actions through secure, standardized connections.
This connection provides 5 powerful capabilities that interface natively with Claude, ChatGPT, Cursor, and other compatible AI platforms. No middleware. No custom integration required.
Sifting through government trade portals is a nightmare.
Before this server, analyzing Brazilian foreign trade meant navigating sprawling web portals. You’d spend hours clicking between different packages, manually downloading massive CSV files for exports and imports separately, then opening Excel just to consolidate the dates and figures you needed. It was copy-paste hell.
Now, your agent handles it all. You tell it what data point you need—say, 'Export value from Shanghai in Q3'—and it uses `search_packages` to find the right dataset, then runs a precise query with `search_datastore`. The result is structured text, not 50 megabytes of mess.
MDIC (Comércio Exterior) MCP Server: Query Official Brazilian Trade Data
The painful manual steps that disappear are the web browsing, the file download process, and the subsequent data cleaning. No more guessing which CSV column means what; the server handles all the resource mapping.
What's different now is control. You get direct, programmatic access to the raw data structure, allowing you to build automated reports in code rather than spending days wrestling with spreadsheets.
What your AI can actually do with this
WHO IT'S FOR: This server connects your AI client straight into Brazil’s Ministry of Development, Industry, Trade and Services (MDIC) open data portal. You use it when you need official Brazilian foreign trade statistics—you wanna pull the numbers directly from the source without downloading a mountain of files.
How It Works: Your agent handles the entire process: finding the right dataset, checking its scope, and running complex queries against the actual data rows. You never have to deal with manual CSV downloads again.
Finding Datasets (Discovery): First, you need to know what's available. Use
list_packagesif you want a complete inventory of every single trade dataset package hosted on the MDIC portal. If that list is too long and you know what keywords you're after—like 'exportação' or 'importação'—you can usesearch_packages. That narrows down the results instantly, pointing your agent right to relevant packages.Inspecting Data (Metadata): Once you've identified a package ID, don't just assume it has what you need. You run
get_packageto pull detailed metadata for that specific dataset. This gives you tags and confirms the full scope of the data before you commit to running a query. If you then want to check the individual files within that confirmed package,get_resourceprovides all the necessary metadata and download paths for those resources.Querying the Data (Extraction): This is where the money's at. You don’t just pull whole tables; you pull specific metrics. Using
search_datastore, your agent executes queries that function like SQL directly against the underlying data rows. You can filter and limit the results to pull only the exact trade statistics—like specific export volumes or import values—that fit your criteria, making sure you get clean, usable numbers straight into your workflow.
019e38bf-d9d9-72dc-8843-6b17bde488f3 Here's how it actually works
The bottom line is you don't need to know the API structure; you just talk to your AI client and it runs the right sequence of tools.
Subscribe to the server and connect your preferred AI client (Claude, Cursor, etc.).
(Optional) Provide an API key if you hit rate limits. Otherwise, nothing else is needed.
Ask your agent: 'Find all datasets about exportations,' or 'Query the top 5 rows from the comex-stat datastore.'
Who is this actually for?
This server is for data professionals who regularly work with large, official government datasets. If you're an economist or a BI lead tired of manually downloading massive CSVs from web portals and spending hours cleaning up inconsistent files, this is for you. You need to analyze trends in Brazilian trade, not just look at static dashboards.
Uses search_datastore to run precise queries against specific date ranges or product codes within the raw data.
Employs natural language prompts to analyze official trade volumes, using the full dataset discovery capability of list_packages.
Integrates structured government statistics into automated reports by calling out specific resource IDs via get_resource.
What Changes When You Connect
Find the right data faster. Instead of clicking through dozens of links, use search_packages to filter datasets by terms like 'exportação' or 'comex-stat'.
Skip manual downloads entirely. You don't grab a CSV; you ask your agent to run a query using search_datastore, and the structured data comes back instantly.
Full transparency on resources. Use get_resource when you need confirmation of specific file IDs or download links before integrating them into a script.
Discover every dataset available. If you don't know what data exists, start with list_packages to get the full inventory of all trade packages.
Analyze trends, not just records. The server handles complex joins and filtering via search_datastore, letting your agent focus on summarizing results.
See it in action
Tracking a specific product's export history
A user needs to see how the value of Product Code X changed over three years. They ask their agent, and the agent runs search_packages for 'comex-stat', then uses that ID with search_datastore to filter by the specific product code and date range, delivering only the needed rows.
Identifying all available trade data
A new analyst joins the team and needs a complete list of everything MDIC offers. They simply trigger list_packages, which immediately provides every dataset name, eliminating manual portal browsing.
Verifying file availability
An engineer knows they need the 'Monthly Exports' data but can't find the exact download link in the documentation. They run get_package first to confirm the dataset, then use that ID with get_resource to get the precise metadata and working URL.
Comparing multiple market sectors
A researcher wants to compare trade data across three different geographic regions. They ask their agent to run targeted queries using search_datastore, passing in the necessary filters for all three areas simultaneously, getting a single comparative result set.
The honest tradeoffs
Searching by memory
Trying to remember if you need to search the dataset list or search the data itself. You might try to pass keywords directly into search_datastore and fail.
First, use search_packages to find the correct dataset name (package). Then, use that package ID with search_datastore to run your query on the actual numbers.
Using metadata for data
Assuming that just knowing a resource exists (get_resource) is enough. You get the file link but still can't analyze the content without running a query.
After finding a resource, always confirm you need to run actual numbers against it. Use search_datastore to execute the filtering and retrieval action.
Over-listing resources
When only needing one dataset, running list_packages just to see everything. This is slow and creates unnecessary noise.
If you know what you're looking for (e.g., 'comex'), use search_packages instead of listing every single package available.
When It Fits, When It Doesn't
Use this server if your workflow requires highly structured, filtered data retrieval from official government sources. You need to know what the numbers are (e.g., 'Value FOB for product X in month Y').
Don't use it if you just want general context or a summary of trade policy—your AI client should handle that narrative part. If your goal is simply to list all datasets, start with list_packages. But if the end result must be a filtered table of numbers, you will always need to follow discovery (search_packages) -> inspection (get_package) -> execution (search_datastore). This structure guarantees maximum control over the data path.
Questions you might have
How do I find out what datasets are available using search_packages? +
Run search_packages and pass the general topic, like 'exportação'. This tool filters through all MDIC packages to give you a shortlist of relevant dataset names.
Do I need get_package before searching_datastore? +
No. While get_package gives detailed metadata, search_datastore is the action tool. You typically use discovery tools first to find the package ID, and then pass that ID directly into search_datastore.
What does get_resource do? +
get_resource pulls metadata for a specific data file within a dataset. Use it if you need to confirm the exact download link or format for a resource ID you found earlier.
Can I query any date range using search_datastore? +
Yes, search_datastore accepts SQL-like parameters. You specify your criteria (e.g., 'Year > 2020 AND Month = 1') to limit the rows returned.
When using `list_packages` or other tools repeatedly, how do I handle API rate limits? +
You must provide an API key for high-volume usage. The server supports keys to bypass standard rate limits imposed by the MDIC portal. If you don't include a key, your AI client will receive a 429 error response when hitting predefined request thresholds.
If I need to filter data from multiple criteria (e.g., Year AND Product Code) using `search_datastore`, how should I structure the query? +
You use standard SQL-like syntax for filtering within the tool's parameters. You combine conditions using logical operators like 'AND' or 'OR'. For example, specifying WHERE year = 2023 AND product_code = 'XYZ'.
What specific metadata does `get_package` return about a dataset? +
It returns core information including the package title, description, list of contained resources (data files), and associated tags. This allows your AI client to understand the scope and purpose of the entire dataset before querying any single resource.
What happens if I use `search_packages` with an invalid or misspelled query string? +
The tool returns a structured error message detailing the validation failure. It won't crash; instead, it tells your agent exactly which part of the search input was malformed and why, allowing for immediate correction.
Can I search for specific trade terms like 'soybean' or 'iron ore'? +
Yes! Use the search_packages tool with your query string. It will return all datasets matching those terms within the MDIC portal.
How do I access the actual data rows inside a CSV resource? +
Use the search_datastore tool by providing the resource_id. You can also apply filters and limits to retrieve exactly the data points you need.
Is it possible to see the file format and download URL for a dataset? +
Yes. The get_package tool returns a list of resources, and get_resource provides specific metadata including the format (CSV, XLSX, etc.) and the direct download URL.
We've already built the connector for MDIC (Comércio Exterior). Just plug in your AI agents and start using Vinkius.
No hosting. No infrastructure. No complex setup.
All 5 tools are live and waiting.
You're up and running in seconds.
Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.
Built, hosted, and secured by Vinkius. You just connect and go.