How to Use the IBGE Economia — CNAE Activities MCP in OpenAI Agents SDK
Query Brazil's entire CNAE economic taxonomy directly inside your OpenAI Agents SDK workflows using this MCP Server.
Works with every AI agent you already use
…and any MCP-compatible client
Connect IBGE Economia — CNAE Activities MCP to OpenAI Agents SDK
Create your Vinkius account to connect IBGE Economia — CNAE Activities to OpenAI Agents SDK and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Map compliance codes with OpenAI Agents SDK
Using `list_secoes_cnae` and `list_divisoes_cnae` lets your agents navigate Brazil's fiscal tax structure without hardcoding taxonomy rules. By exposing these tools directly to your agent system, your agents can dynamically trace business activities from broad sectors down to specific divisions. This keeps your registration pipelines accurate without manual database lookups. The OpenAI Agents SDK automatically handles tool discovery when you pass this MCP Server to the constructor. Your agents can query `list_classes_cnae` on the fly, allowing them to classify corporate activities based on raw user descriptions.
Validate business activities using guardrails
Running `get_subclasse_cnae` pulls exact definitions of any of the 1,332 subclasses to prevent classification errors. Production systems cannot tolerate classification errors that lead to tax penalties. Use the SDK to set up strict validation guardrails, meaning your agent checks the returned code against your business rules before committing it to your database. When an agent needs to drill down further, it can invoke `list_subclasses_por_classe` to see every valid subclass under a parent class. This keeps your automated classification workflow rigid, predictable, and audit-proof.
Set up specialized agents for tax mapping
Using `list_secoes_cnae` allows you to map complex, multi-sector corporate structures by coordinating specialized agents. You can set up a multi-agent system where one agent identifies the primary sector, then hands off the task to a specialized compliance agent. This second agent uses `get_subclasse_cnae` to pinpoint the exact registration code. Every tool invocation and handoff is tracked in your OpenAI dashboard. If an agent struggles to classify a hybrid business model, you can review the exact sequence of tool calls to refine your prompts or fallback logic.
Set up IBGE Economia — CNAE Activities MCP in OpenAI Agents SDK
Prerequisites
- Python 3.10+ installed
-
openai-agentspackage (pip install openai-agents) - Active Vinkius subscription with a valid endpoint token
- 1
Install the SDK
Run
pip install openai-agentsto install the OpenAI Agents SDK. The MCP integration is built-in — no extra dependencies needed. - 2
Connect via SSE transport
Use
MCPServerSsewith your Vinkius endpoint URL. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. The SDK auto-discovers all IBGE Economia — CNAE Activities tools at runtime. - 3
Create your Agent
Pass the MCP to
Agent(mcp_servers=[server]). The agent receives IBGE Economia — CNAE Activities tools as native definitions — JSON schemas resolve automatically. - 4
Run the agent
Call
Runner.run(agent, prompt)to execute. The agent invokes the appropriate IBGE Economia — CNAE Activities tools and returns structured results. Copy the full example on the right to get started.
import asyncio
from agents import Agent, Runner
from agents.mcp import MCPServerSse
async def main():
async with MCPServerSse(
url="https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
) as server:
agent = Agent(
name="IBGE Economia — CNAE Activities Agent",
instructions="You have access to IBGE Economia — CNAE Activities tools.",
mcp_servers=[server],
)
result = await Runner.run(agent, "List recent transactions")
print(result.final_output)
asyncio.run(main()) Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by IBGE. 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.
Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about IBGE Economia — CNAE Activities MCP in OpenAI Agents SDK
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the IBGE Economia — CNAE Activities MCP today
We host it, we monitor it, we maintain it. You just paste one token.