We use cookies and similar technologies, including Google Analytics and the Meta Pixel, to improve your experience, measure site traffic and understand signup campaigns. By clicking "Accept", you agree to this use.

Learn more about our privacy practices
Corvo
Português

AI agents (MCP)

Connect Claude Code, Claude Desktop, Cursor, VS Code, Codex and Windsurf to Corvo with OAuth.

The Corvo MCP server lets AI agents (Claude Code, Cursor and other MCP clients) issue and query NFS-e on behalf of a user, without you writing an integration. The agent connects with OAuth: it opens the browser, you sign in to Corvo, pick the workspace and approve. No API key is copied.

Connect an agent

Use the server URL below. It also appears in the dashboard under AI agents, with ready-to-copy commands.

Claude Code

claude mcp add --transport http corvo https://api.corvo.tech/mcp

Cursor (.cursor/mcp.json)

{
  "mcpServers": {
    "corvo": {
      "url": "https://api.corvo.tech/mcp"
    }
  }
}

VS Code (.vscode/mcp.json)

{
  "servers": {
    "corvo": {
      "type": "http",
      "url": "https://api.corvo.tech/mcp"
    }
  }
}

Codex (~/.codex/config.toml)

[mcp_servers.corvo]
url = "https://api.corvo.tech/mcp"

Windsurf (mcp_config.json)

{
  "mcpServers": {
    "corvo": {
      "serverUrl": "https://api.corvo.tech/mcp"
    }
  }
}

Claude Desktop

  • Open Settings → Connectors.
  • Click Add custom connector, enter a name (Corvo) and paste the server URL.
  • Click Connect and approve access in the browser.
  • URL: https://api.corvo.tech/mcp

Test prompt

List my companies on Corvo and issue a test NFS-e of R$ 100.
  • Add the server to the agent with the URL https://api.corvo.tech/mcp.
  • The agent opens the browser on the Corvo approval screen. If you are not signed in, sign in first; you then return to the approval.
  • Pick the workspace and click Allow (or Deny).
  • Go back to the agent. It now has the Corvo tools.

Permissions

ScopeWhat it allowsRoles that can grant it
nfse:readQuery, list and download the PDF of invoicesadmin, developer, billing
nfse:writeIssue invoicesadmin, developer
nfse:certificates (optional, unchecked by default)Send the company's digital certificateadmin
billing:purchase (optional, unchecked by default)Create credit charges (Pix or card). The payment is always made by you.admin, billing

The two optional scopes appear as separate checkboxes on the approval screen and start unchecked. If you allow it, the agent can send the certificate. Corvo stores it encrypted and never returns the password. Older connections keep working; to use the new tools, connect the agent again and tick the box. On self-hosted installs (no billing), credit purchase is not offered.

A member can only approve scopes that their own role in the workspace allows. A workspace where your role does not cover the request appears disabled on the approval screen.

Tools

ToolScopeMain inputOutput
nfse_issuenfse:writecompany_tax_id (CNPJ) or company_id, amount (or services [{description, quantity, unit_price}]), customer? {tax_id, name?, email?} or customer {name, foreign {tax_id | no_tax_id_reason, country, postal_code, city, region, street, number, district}} for a customer abroad (tax_id required when the customer is in Brazil), description?, discount?, deduction? (ISS base deduction declared by the issuer), purchase_order? (purchase order number, up to 60 characters), notes? (free text printed on the invoice), competence_date? (default: today), emission_type? (IMMEDIATE/SCHEDULE/RECURRING), recurrence_frequency? (WEEKLY/BIWEEKLY/MONTHLY, required with RECURRING), recurrence_ends_on?, send_email?, service_code?, external_id?, idempotency_key?{ invoice_id, access_key, status }; with SCHEDULE or RECURRING, { schedule_id, kind, frequency, status, next_run_on, ends_on }
schedule_listnfse:readstatus?, company_id?, limit?, offset?{ schedules [...], total, limit, offset }
schedule_getnfse:readschedule_idthe schedule
schedule_runsnfse:readschedule_id, limit?, offset?{ runs [{ occurrence_on, ran_on, attempt, outcome, invoice_id?, error_code?, error_message? }], total }
schedule_updatenfse:writeschedule_id and what changes: amount?, description?, purchase_order?, notes? (an empty text removes it), customer?, send_email?, ends_on? (or null), frequency?, first_date?the schedule
schedule_pausenfse:writeschedule_idthe schedule
schedule_resumenfse:writeschedule_idthe schedule
schedule_cancelnfse:writeschedule_idthe schedule
import_createnfse:writecontent (CSV) or content_base64 (.xlsx), file_name?, company_id?; up to 1 MB and 2,000 rows{ id, status, duplicate_of }; reading is asynchronous
import_listnfse:readlimit? (1 to 20){ imports [...] } with counters, newest first
import_getnfse:readimport_idthe import: status, rows_expected, counters (valid_amount, awaiting_credits...)
import_rowsnfse:readimport_id, status?, cursor?, limit? (up to 200){ rows [{ line, data, status, error_code, error_message, invoice_id }], next_cursor, has_more }
import_fix_rownfse:writeimport_id, line, itemthe row, checked again (valid, or invalid with the reason)
import_emitnfse:writeimport_idthe import, emitting; call again after topping up credits to send only the awaiting_credits rows
import_discardnfse:writeimport_id{ import_id, discarded: true }
company_listnfse:readtax_id? (CNPJ), limit?, cursor?{ companies [{ id, legal_name, tax_id, status, tax_regime, setup_gaps, ready_to_issue }], next_cursor }
nfse_issue_batchnfse:writeinvoices (1 to 50 items, each with the same fields as nfse_issue, including company_tax_id or company_id and idempotency_key){ total, accepted, rejected, results [{ index, status, replayed?, invoice_id?, access_key?, invoice_status?, error? }] }; invalid items are rejected in place and the valid ones are saved together
company_getnfse:readtax_id (CNPJ){ company } or { company: null }
company_createnfse:writelegal_name, tax_id, tax_regime, municipality_code, simples_rate (required for Simples Nacional), simples_iss_rate? and optional fiscal data{ id, legal_name, tax_id, status }; certificates remain API-only
nfse_calculatenfse:readcompany_tax_id or company_id, amount, optional discount, deduction and fiscal dataCalculation result; no issue, credit reservation or DPS
billing_usagenfse:readNo parametersQuotaStatus with canEmit, allowance and usage
invoices_overviewnfse:readperiod? (7d default or 30d){ period, from, to, counts { authorized, rejected, processing }, dailyActivity, recentInvoices }
credits_balancenfse:readinclude_history?, limit? (1 to 100), cursor?{ balance, plan_remaining, avulso_balance, hard_limit } plus history and next_cursor when requested
nfse_getnfse:readinvoice_id (internal UUID) or external_id (your own reference, any type){ invoice, events } with the status timeline; with an external_id that more than one invoice has: { ambiguous: true, matches }
company_fiscal_statusnfse:readcompany_id or tax_id{ company, fiscal_profile, service_tax_profiles, certificates (status and expiry only), dps_sequence }
cnpj_lookupnfse:readcnpj{ profile } from the public registry: names, address, municipalityCode, simples, mei, active
nfse_cancelnfse:writeinvoice_id, reason (issue_error, service_not_provided or other), description? (15–255 characters, required for an authorized NFS-e or one being issued){ invoice_id, status, cancelled_at } (cancelled, cancelling, or processing with the request recorded)
nfse_substitutenfse:writeinvoice_id, description (15–255 characters), service_description?, purchase_order?, notes? (an empty text removes it){ invoice_id, status, substitutes_invoice_id } (the substitute, in queued). Customer, competence date and amount do not change
customer_listnfse:readsearch? (part of the name or start of the document), limit? (1 to 100, default 20), offset?{ customers: [{ tax_id, name, email, last_used_at }], total, limit, offset }
customer_updatenfse:writetax_id and what changes: name?, email?, address? (street, number, complement?, district, zip, city_code, city, state), ind_ie_dest?, state_registration? (null removes each){ tax_id, name, email, address, ind_ie_dest, state_registration, last_used_at }
customer_deletenfse:writetax_id{ tax_id, deleted: true }
nfse_querynfse:readaccess_key{ access_key, status, nfse_number, authorized_at, last_error }
nfse_listnfse:readstatus?, external_id? (exact), limit?, cursor?{ invoices, next_cursor }
nfse_repeatnfse:writeinvoice_id or access_key of the note to copy; optional amount, description, competence_date{ invoice_id, access_key, status, copied_from_invoice_id }. Same customer, service and amount; uses a credit
nfse_email_resendnfse:writeinvoice_id, email? (another destination){ invoice_id, email_id, status } (authorized invoice only)
nfse_reviewnfse:writeinvoice_id, action (retry or discard){ invoice_id, action, outcome, status, invoice }. Only for notes in manual_review. retry re-checks the portal with the same DPS and never issues a second note; discard rejects only if the portal confirms it was never registered (the number is skipped)
company_updatenfse:writecompany_id and what changes: trade_name?, municipality_code?, default_service_code? (null removes it), address?. Never CNPJ, regime, certificate or deletion{ id, trade_name, municipality_code, default_service_code, address }
accountant_package_sendnfse:writecompany_id or tax_id, month? (YYYY-MM, default previous month), confirmWithout confirm: true only a preview { month, recipient, note_count }; with it, sends and returns { sent, status }
service_favorite_listnfse:readcompany_id, kind? (service or product){ favorites }
service_favorite_createnfse:writecompany_id, label, description, service_code, amount_cents?, municipality_code?; with kind: "product": description, ncm, unit_price, code?, gtin?, cest?, cfop?, unit?, csosn?, origin?The saved favorite (up to 50 services and 500 products per company; the same product description updates it)
service_favorite_deletenfse:writecompany_id, favorite_id{ favorite_id, deleted: true }
nfse_download_pdfnfse:readaccess_key (authorized invoice), inline? (true returns base64){ access_key, download_url, expires_at, file_name, mime_type } (signed link, valid for one hour, preferred); with inline: true, { access_key, pdf_base64 }
nfse_get_download_urlnfse:readaccess_key, format (pdf or xml; authorized invoice){ download_url, expires_at, file_name, mime_type } (signed URL, valid for one hour)
nfse_get_package_urlnfse:readtax_id (company CNPJ), month (YYYY-MM, by competence){ month, note_count, download_url, expires_at, mime_type } (ZIP with XML, PDF and resumo.csv; link valid for 7 days, opens without sign-in)
certificate_uploadnfse:certificatestax_id (company CNPJ), pfx_base64 (.pfx/.p12 file in base64, up to 50 KB), passwordPublic data only: CNPJ, holder, expiry and whether it replaced another certificate. The password is never returned
credits_purchasebilling:purchaseunits (number of credits, minimum 3), method (pix or card)Pix: payment_id, amount, expiry, copy-and-paste code, QR Code image and payment link. Card: checkout_url, amount and session_id
payment_statusbilling:purchasepayment_id or session_idpending, paid (with the new credit balance) or expired/cancelled

The simplest call is company_tax_id plus amount: the customer is optional (omit it for an invoice without tomador; if you send one, tax_id is required), the competence date defaults to today, the service code comes from the company or falls back to 100901 (LC 116 item 10.09) and the description from the service code. Use company_get for one CNPJ and billing_usage before issuing. The A1 certificate can be sent over MCP only if you tick the nfse:certificates permission; without it, upload through the dashboard or the API. Tool failures come back as a result with isError: true and the message as text, so the agent can read and fix them.

Preview and confirm for big actions

Seven tools do something big or irreversible, so they ask for a confirmation in two steps: import_emit, nfse_issue_batch, nfse_cancel (also for type nfe and nfce), nfse_substitute, nfe_inutilize, customer_delete and credits_purchase. Called without confirm: true they change nothing and answer { status: "preview", done: false, message, preview }: what would happen (the note, the amount, the quantity of rows, the companies, whether e-mails go out). The agent shows it to you and only calls again with confirm: true after you agree. A single nfse_issue stays direct.

Every tool also sends the MCP annotations in tools/list (title, readOnlyHint, destructiveHint, idempotentHint, openWorldHint): the reading tools are marked read only, the ones that issue, cancel, delete, send or pay are marked destructive, so the client can ask you before running them.

NF-e (products)

For every account (test mode, no tax value; live answers NFE_PRODUCTION_DISABLED until production is turned on), the tools nfse_issue, nfse_list, nfse_get, nfse_cancel, nfse_review, nfse_get_download_url and nfse_download_pdf take type: nfse (default, nothing changes), nfe or nfce (sale to the consumer, also test mode). In nfse_list, type: "all" lists NFS-e, NF-e and NFC-e together. With type: "nfce" the NFC-e body goes in the nfe object of nfse_issue (no natOp, the consumer CPF is optional); the NFC-e has no correction letter and can only be cancelled within 30 minutes. With type: "nfe" use invoice_id (not the access key). nfse_issue with nfe needs company_id, the nfe object (the same body as POST /v1/invoices, without companyId) and idempotency_key; nfse_cancel uses only description as the justification. nfse_calculate with type: "nfe" or "nfce" shows the Simples credit (CSOSN 101) and the approximate value of the taxes before issuing, and issuing fills them in on its own. The agent still informs CFOP, NCM and CSOSN of each item.

  • nfe_validate (nfse:write): dry-run, returns the problems field by field and never the XML. Takes type (nfe or nfce). Run it before issuing.
  • nfe_repeat (nfse:write): issues a new NF-e or NFC-e copying a previous one (invoice_id, type, idempotency_key, optional additional_info). The number, key and date are new; a note that is not a normal sale answers NFE_REPEAT_NOT_NORMAL. nfse_email_resend also takes type to send an NF-e or NFC-e e-mail again.
  • nfe_settings_get (nfse:read) and nfe_settings_update (nfse:write): IE, CRT, series and defaults of the company, and what is missing to issue; with check_sefaz: true it also asks the SEFAZ whether the IE is enabled (readiness).
  • nfe_correct (nfse:write): correction letter for an authorized NF-e (on a NFC-e it answers INVOICE_OPERATION_NOT_SUPPORTED).
  • nfe_number_gaps (nfse:read) and nfe_inutilize (nfse:write): skipped numbers and the inutilization of a range, with model 55 (NF-e, default) or 65 (NFC-e); it only previews until confirm: true. nfe_settings_update also sets nfce_default_series, the NFC-e series.
  • These show in the tool list for every account; cancelling, correcting and inutilizing need a role with nfe.documents.manage, issuing and validating nfe.documents.issue.

From sign-up to the first invoice, through the agent

Agent flow

(OAuth login)
cnpj_lookup(cnpj)                         → Receita data
company_create(...)                       → company
certificate_upload(cnpj, pfx, password)   → certificate OK
company_fiscal_status(cnpj)               → ready to issue
nfse_issue(...)                           → invoice
credits_balance()                         → balance
credits_purchase(units, "pix"|"card")     → QR Code / card link
payment_status(id)                        → paid → keep issuing
  • The certificate password stays in the agent's vault. Corvo stores it encrypted and never returns the password or the file.
  • The certificate is validated like on the website: one active per company and environment, and the new one replaces the previous (the answer tells you).
  • The payment is always made by you, by card or Pix. The agent only shows the QR Code or the link, then checks payment_status until it is confirmed.
  • Before charging, the agent should confirm the amount and the number of credits with you. When credits run out, nfse_issue suggests credits_purchase.

Audit: who did what

In Settings → Audit (admin role only), Corvo lists the actions that change something in the account, whether they come from the website, the API or an agent: companies, certificates, invoices, charges, access and sends to the accountant. Each row shows when, who (a person, an agent with the person who authorized it, an API key or System), the action and the item. Lookups and lists are not recorded. Passwords and certificates are never stored. Events are kept for 1 year.

See usage and revoke

  • In the dashboard, open AI agents → Connected apps: you see each agent, the workspace, the permissions, the last use and how many calls and invoices it made.
  • Click Revoke to cut access immediately. The agent has to be approved again to come back.
  • Workspace admins see and can revoke every member's connections; other members see only their own.
  • Reconnecting the same agent reuses the connection and revokes the previous session.