# NFe.io MCP for AI Agents AI Agent Connect

> NFe.io MCP lets your AI agents handle Brazilian service invoices (NFS-e) and municipal tax codes. It automates issuing, canceling, and retrieving fiscal documents while validating IBGE city codes across different Brazilian cities. Perfect for automating local tax compliance.

## Overview
- **Category:** productivity
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_qnxTvOplXh9uce8AMFJ0y3HxvwIx1fg8AXlunLyq/ai-agent-connect
- **Tags:** nfeio, fiscal-automation, nfs-e, brazilian-taxes, invoice-api, ibge-codes

## Description

Connect your AI agents to NFe.io to handle the heavy lifting of Brazilian fiscal document automation. This Connector lets you manage the full lifecycle of Service Invoices (NFS-e), validate Brazilian municipal codes (IBGE), and monitor corporate metadata for companies in your billing environment. You can automate the issuance and cancellation of invoices for multiple cities across Brazil without manual data entry. It handles service code management and tax metadata to keep your fiscal reporting accurate. Whether you're a Brazilian SaaS developer automating recurring billing or a finance team pulling monthly summaries, this tool handles the tedious parts of tax compliance. You can get official PDF and XML download links programmatically to keep your records organized. This Connector is available on Vinkius, making it easy to plug into your existing AI setup and get your fiscal workflows moving.

## Tools

### cancel_service_invoice
Cancels a previously issued Service Invoice (NFS-e). This is useful for voiding incorrect service charges.

### create_company
Registers a new company issuer in your NFe.io account. Use this to set up new business entities for invoicing.

### cancel_merchandise_invoice
Cancels a previously issued Merchandise Invoice (NF-e). It helps you quickly void incorrect shipping documents.

### get_company_details
Pulls detailed fiscal information for a specific company issuer. It helps you check current configurations before issuing docs.

### get_merchandise_invoice
Retrieves the full details of a specific Merchandise Invoice (NF-e). Use this to check the status of a goods shipment.

### get_service_invoice
Retrieves the full details of a specific Service Invoice (NFS-e). This lets you see the status of a service charge.

### issue_merchandise_invoice
Generates a new Merchandise Invoice (NF-e) for goods. Use this to create shipping documents for products.

### issue_service_invoice
Generates a new Service Invoice (NFS-e) for services. This is the primary tool for billing service-based customers.

### list_companies
Shows all companies currently registered in your account. Use this to find the correct issuer ID for an invoice.

### list_webhooks
Displays all configured webhooks in your account. This helps you monitor real-time events for your invoices.

## Prompt Examples

**Prompt:** 
```
Find the IBGE code for Curitiba.
```

**Response:** 
```
Searching municipal codes... I found the IBGE code for Curitiba (PR): `3951200`. This code is active and compatible with the NFe.io service invoice engine.
```

**Prompt:** 
```
List my companies.
```

**Response:** 
```
I've retrieved your company list. You have 2 active entities:

| Company Name | ID |
| :--- | :--- |
| Tech Services Ltda | comp_1 |
| Consulting Group | comp_2 |

Which one would you like to use for invoice issuance?
```

**Prompt:** 
```
Get the PDF for invoice 999.
```

**Response:** 
```
Connecting to NFe.io gateway... I've retrieved the details for invoice 999. Here are your official documents:

* **[Download PDF](https://example.com/pdf)**
* **[Download XML](https://example.com/xml)**

Would you like me to send these to your email?
```

## Capabilities

### Issue Brazilian service invoices
Generate new NFS-e documents for your customers automatically.

### Cancel existing invoices
Void both merchandise and service invoices with a single command.

### Validate municipal IBGE codes
Check correct city codes for accurate tax reporting across Brazil.

### Retrieve official documents
Get direct download links for PDF and XML invoice files.

### Manage multiple company profiles
Handle several business entities and their fiscal settings in one place.

### Monitor invoice events
Track real-time status changes using configured webhooks.

## Use Cases

### SaaS Billing Automation
A founder asks the agent to issue a service invoice for a new customer in São Paulo. The agent finds the IBGE code and issues the NFS-e automatically.

### Audit Preparation
An accountant asks the agent to find all XML files for last month's invoices. The agent retrieves all download links in a single list.

### Company Onboarding
An ops person asks the agent to register a new company for a new branch. The agent uses `create_company` to set up the entity.

### Rapid Error Correction
A customer reports a wrong price. The user tells the agent to cancel invoice 12345 and issue a new one. The agent handles both calls.

## Benefits

- Automate city-specific tax rules by using `list_webhooks` and IBGE validation instead of manual lookups.
- Get your docs instantly. Use `get_service_invoice` to grab direct download links for PDF and XML files in one step.
- Manage multiple entities easily. Use `list_companies` and `create_company` to handle different business units in one place.
- Fix mistakes quickly. Use `cancel_service_invoice` or `cancel_merchandise_invoice` to void errors without portal logins.
- Keep your records accurate. Use `get_company_details` to ensure every invoice matches the correct fiscal configuration.

## How It Works

The bottom line is that you turn your AI into a Brazilian tax clerk that handles the paperwork for you.

1. Get your API key from the NFe.io dashboard and find your Company ID.
2. Add your credentials to the Connector configuration in your AI client.
3. Ask your agent to issue invoices, check city codes, or pull documents.

## Frequently Asked Questions

**Does NFe.io MCP support all Brazilian cities?**
Yes, it validates IBGE codes for cities across Brazil to ensure your service invoices are compliant with local municipal rules.

**Can I use NFe.io to issue service invoices?**
Yes, it is designed to issue Service Invoices (NFS-e) directly through your AI client for customers in different Brazilian cities.

**Can the AI agent download the XML files for me?**
Yes, the Connector retrieves the direct download links for both PDF and XML documents so you can save them to your records instantly.

**Is NFe.io good for Brazilian SaaS businesses?**
It is ideal for SaaS companies that need to automate recurring service invoices for customers across various Brazilian states.

**How do I manage different companies in NFe.io?**
You can list all registered companies in your account and pull specific details for each one to ensure correct fiscal configurations.

**Can I cancel an invoice if I made a mistake?**
Yes, you can ask your agent to cancel either a service or a merchandise invoice if you need to void an incorrect document.

**Can my AI automatically issue an NFS-e for a specific customer?**
Yes! Use the `issue_service_invoice` tool with the Company ID and a JSON payload containing the customer data and service values. Your agent will trigger the issuance process with the relevant municipality.

**How do I find the correct IBGE code for a Brazilian city?**
You can use the `list_cities` tool to search for municipalities by name or state. The agent will return the official IBGE codes required for fiscal document validation.

**Can I retrieve the download link for an invoice PDF?**
Yes! Use the `get_service_invoice` tool with the unique Invoice ID. Your agent will return the metadata, including official links to download the PDF and XML versions of the document.