4,500+ servers built on MCP Fusion
Vinkius
Focus NFe logo
Vinkius
OpenAI Agents SDK logo

How to Use the Focus NFe MCP in OpenAI Agents SDK

Ship production-ready Brazilian tax workflows with OpenAI Agents SDK and Focus NFe.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

Focus NFe MCP on Cursor AI Code Editor MCP Client Focus NFe MCP on Claude Desktop App MCP Integration Focus NFe MCP on OpenAI Agents SDK MCP Compatible Focus NFe MCP on Visual Studio Code MCP Extension Client Focus NFe MCP on GitHub Copilot AI Agent MCP Integration Focus NFe MCP on Google Gemini AI MCP Integration Focus NFe MCP on Lovable AI Development MCP Client Focus NFe MCP on Mistral AI Agents MCP Compatible Focus NFe MCP on Amazon AWS Bedrock MCP Support
MCP Servers - Free for Subscribers
OpenAI Agents SDK

Connect Focus NFe MCP to OpenAI Agents SDK

Create your Vinkius account to connect Focus NFe 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.

GDPR Free for Subscribers

Automate NF-e and NFS-e emission with OpenAI Agents SDK

The `emit_nfe` and `emit_nfse` tools allow your Python agents to handle complex Brazilian tax compliance directly. By exposing these tools to your agent, you can issue product and service invoices programmatically without writing custom API wrappers. Your agent handles the payload structure, maps municipal tax codes, and triggers the emission in real-time. If a tax authority rejects a payload, the agent catches the error immediately. It can correct minor formatting issues or missing fields and retry the call. You get clean invoices sent to SEFAZ without manual engineering intervention.

Verify document status and fetch XML payloads

The `consult_document` tool lets your agent monitor the lifecycle of every invoice. This tool checks the state of any document, letting your workflow pause until SEFAZ authorizes the transaction. Once authorized, your agent calls `download_xml` to retrieve the final XML file. This file can be saved directly to your database or forwarded to the customer's accountant. You get a reliable way to keep your internal ERP system in sync with the tax authorities.

Handle invoice cancellations with built-in safety

The `cancel_document` tool lets your agent void an issued invoice when a transaction falls through. You provide the justification, and the agent communicates directly with the municipal or state server to process the cancellation within the legal timeframe. Using this MCP Server within the OpenAI framework ensures your agent only triggers cancellations under strict conditions. Guardrails validate the agent's decision before executing the tool, preventing accidental tax voids that could disrupt your accounting.

Setup guide

Set up Focus NFe MCP in OpenAI Agents SDK

Prerequisites

  • Python 3.10+ installed
  • openai-agents package (pip install openai-agents)
  • Active Vinkius subscription with a valid endpoint token
  1. 1

    Install the SDK

    Run pip install openai-agents to install the OpenAI Agents SDK. The MCP integration is built-in — no extra dependencies needed.

  2. 2

    Connect via SSE transport

    Use MCPServerSse with your Vinkius endpoint URL. Replace [YOUR_TOKEN_HERE] with your token from cloud.vinkius.com. The SDK auto-discovers all Focus NFe tools at runtime.

  3. 3

    Create your Agent

    Pass the MCP to Agent(mcp_servers=[server]). The agent receives Focus NFe tools as native definitions — JSON schemas resolve automatically.

  4. 4

    Run the agent

    Call Runner.run(agent, prompt) to execute. The agent invokes the appropriate Focus NFe tools and returns structured results. Copy the full example on the right to get started.

agent.py
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="Focus NFe Agent",
            instructions="You have access to Focus NFe 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 Focus NFe. 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 Focus NFe MCP in OpenAI Agents SDK

Install the SDK using pip, then initialize the server connection using MCPServerStreamableHttp. Pass the MCP Server endpoint to your Agent constructor. The agent will auto-discover tools like `emit_nfe` and `consult_document` with zero extra configuration.
Yes, your agent uses `emit_nfse` to target specific municipal prefeituras. Since municipal schemas vary across Brazil, the agent reads the documentation via the MCP Server to format the payload correctly for each city.
The agent receives a clear error response from `emit_nfe` or `emit_nfse`. You can program your agent to retry the emission later or route the document through a contingency queue.
No, the Vinkius platform handles authentication at the transport layer. Your Python agent needs a single Vinkius endpoint token to securely access all five tools, including `download_xml` and `cancel_document`.
We route all XML payloads and invoice metadata through a secure, ephemeral V8 isolate sandbox. We don't store your tax data, corporate CNPJs, or financial figures on Vinkius servers after the tool execution completes.

Start using the Focus NFe MCP today

We host it, we monitor it, we maintain it. You just paste one token.

Built & Managed by Vinkius 30s setup 5 tools

We've already built the connector for Focus NFe. 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.

Claude Claude
ChatGPT ChatGPT
Cursor Cursor
Gemini Gemini
Windsurf Windsurf
VS Code VS Code
JetBrains JetBrains
Vercel Vercel
+ other MCP clients

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.

Zero hosting required Full MCP catalog included Enterprise-grade security Auto-updated by Vinkius

Built, hosted, and secured by Vinkius. You just connect and go.