# Focus Admin MCP

> Focus Admin is an MCP that lets you handle complex Brazilian fiscal operations through natural language conversation. It manages electronic invoicing, allowing agents to send correction letters, invalidate numbering ranges, download required XML and PDF documents, and list historical tax records for compliance checks.

## Overview
- **Category:** erp-operations
- **Price:** Free
- **Tags:** electronic-invoicing, fiscal-compliance, brazil-tax, xml-processing, invoicing

## Description

This MCP connects your AI agent directly to advanced fiscal management tools. Instead of logging into a dedicated portal or navigating complex menus, you talk to your agent and tell it exactly what needs fixing in your accounting books. You can issue correction letters (CC-e) for minor invoice errors or cancel previously sent corrections. Need to prove a number range is unusable? The system marks the numbering as invalid. It also handles document retrieval, letting you download both the raw XML files and the printable PDF versions of invoices, whether they're NF-e or NFS-e. Furthermore, you can list all documents issued or received within any date window, making annual compliance checks simple to prompt for. When you connect this MCP through Vinkius, your agent handles these complex fiscal tasks without needing manual API calls.

## Tools

### send_cc_e
Sends a Correction Letter (CC-e) when minor errors are found on an NF-e document.

### cancel_cc_e
Cancels any Correction Letters that were previously sent through the system.

### distribute_dfe
Checks for and retrieves available DF-e documents using a unique identifying number (NSU).

### download_nfe_danfe
Downloads the printable PDF version of an NF-e document.

### download_nfe_xml
Downloads the raw XML file for an electronic invoice, ideal for data processing.

### download_event_xml
Downloads the specific XML data related to a particular NF-e event, like manifestations.

### inutilize_numbering
Marks a range of electronic invoice numbers as unusable or invalid.

### list_nfse_emitted
Lists service receipts (NFS-e) that the company has issued to clients.

### list_nfse_received
Lists service receipts (NFS-e) that the company has received from vendors.

### list_nfe_by_period
Retrieves a comprehensive list of all NF-e documents issued or received within specified dates.

## Prompt Examples

**Prompt:** 
```
Send a CC-e for NF-e REF-001 correcting the buyer's phone number.
```

**Response:** 
```
CC-e sent successfully! Protocol: 123456789.
```

**Prompt:** 
```
Inutilize NF-e numbering from 1000 to 1050 for series 1, model 55, year 2026.
```

**Response:** 
```
Numbering range 1000-1050 successfully inutilized for series 1.
```

**Prompt:** 
```
List all NF-e issued by CNPJ 12.345.678/0001-00 from 2026-03-01 to 2026-03-31.
```

**Response:** 
```
Found 47 NF-e documents in the specified period.
```

## Capabilities

### Manage Invoice Errors
Issue or cancel correction letters (CC-e) for authorized electronic invoices.

### Control Document Numbering
Mark specific ranges of invoice numbers as damaged or lost, preventing their use in new documents.

### Retrieve Tax Documents
Download the required XML data and corresponding PDF copies for electronic invoices and other specific tax events.

### Check Document Status
Query systems to verify if available documents exist by their unique identifying number (NSU).

### Audit Historical Records
List all electronic invoices or service receipts that were issued or received within a specific time frame.

## Use Cases

### Correcting a Billing Error
The accountant finds that Client XYZ’s phone number was mistyped on Invoice 501. Instead of generating a physical amendment, they ask their agent to run `send_cc_e` for NF-e 501, correcting the specific field and getting immediate confirmation.

### Quarterly Tax Audit Prep
The compliance officer needs every single invoice (both issued and received) from Q2. They prompt their agent to use `list_nfe_by_period` for the date range, gathering all necessary documents into one structured report.

### Data Reconciliation
The team needs raw data—not just a PDF—for tax reconciliation. They ask the agent to run `download_nfe_xml` and receive the clean XML file, which they can then feed directly into their accounting software.

### Missing Document Verification
A vendor claims an invoice should exist but doesn't know the exact number. The user asks the agent to use `distribute_dfe` with only the NSU, instantly confirming if the document is available for download.

## Benefits

- Instead of logging into multiple fiscal portals, you manage all necessary corrections and status checks in one conversation. You can use the `send_cc_e` tool to fix minor invoice mistakes instantly.
- Audit historical tax records effortlessly. Using the `list_nfe_by_period` function, your agent gathers every NF-e or NFS-e document within a specific date range for quick compliance checks.
- Never manually download documents again. You can request either the printable PDF (`download_nfe_danfe`) or the raw XML data (`download_nfe_xml`), depending on whether you need to view it or process it.
- Keep your numbering clean and compliant by using `inutilize_numbering` when an invoice series is compromised, preventing future errors before they happen.
- The ability to check document availability via NSU with `distribute_dfe` means you confirm a document's existence instantly without guessing the file name or number.

## How It Works

The bottom line is that you use natural conversation to execute complex accounting and compliance operations.

1. Subscribe to this MCP and provide your Focus NFe API Token along with the necessary Base URL.
2. Your AI client establishes the connection, granting your agent access to all fiscal tools.
3. You simply instruct your agent—for example, 'List all NF-e documents for Q1 2026'—and it executes the required actions.

## Frequently Asked Questions

**How do I download XML documents using Focus Admin?**
You use the `download_nfe_xml` tool to get the raw electronic invoice file. This is useful because you can process the data programmatically instead of relying on a PDF view.

**Can I list all service receipts, not just invoices, with Focus Admin?**
Yes, you have tools for both. You can use `list_nfse_emitted` to see what your company sent out, or `list_nfse_received` to track what came in.

**What happens if I send a CC-e and need to undo it?**
The MCP includes the `cancel_cc_e` tool. You can use this specific function to revoke or cancel any Correction Letters you previously issued through the system.

**Is Focus Admin good for checking document status?**
Yes, it is. The `distribute_dfe` tool allows your agent to query available documents using their unique NSU number, giving you instant status confirmation.

**Does the MCP handle numbering issues?**
It does. If a range of invoice numbers gets lost or damaged, you can use `inutilize_numbering` to officially mark that entire sequence as unavailable for future use.