FiscalHub MCP by usefulapi
Read NF-e XML and NCM tax data, simulate totals, issue and cancel NF-e and NFC-e in FiscalHub.
Sollte ich dies verwenden
Qualität und Sicherheit
Befunde (1)
- LOWin fiscalhub_simulate_nfe_totals
Basierend auf einer automatisierten Analyse der Tool-Definitionen und der Einhaltung des Protokolls.
Kontextkosten
Dies ist die ungefähre Anzahl der Tokens, die jedes Mal verbraucht werden, wenn die Tools des Servers in den Kontext eines Modells geladen werden. Höhere Werte verringern die Aufmerksamkeit, die für andere Aufgaben verfügbar ist.
Installieren
Installation mit einem Klick
Fügen Sie dies Ihrer Datei `claude_desktop_config.json` hinzu:
{
"mcpServers": {
"fiscalhub": {
"url": "https://fiscalhub.usefulapi.io/mcp"
}
}
}Remote-Endpunkte
https://fiscalhub.usefulapi.io/mcpstreamable-httpWas es kann
Tool-Inventar
Tools (9)
🟢fiscalhub_get_nfe_xml(chave)
Get the authorized NF-e XML (nfe-proc: NF-e plus protocol) for an access key, fetched from the SEFAZ. Use it to recover an XML that was not stored locally. FiscalHub: GET /api/v1/nfe/{chave}/xml.
Eingabe-Schema
{
"type": "object",
"properties": {
"chave": {
"type": "string",
"pattern": "^\\d{44}$",
"description": "Access key (chave de acesso) of the document: 44 digits."
}
},
"required": [
"chave"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢fiscalhub_list_received_nfe(empresaId, ultNsu, chNFe)
List NF-es and events issued against a company's CNPJ, fetched from the SEFAZ (Distribuicao DFe), in NSU order. Pass the returned ultNsu next time to get only new documents. Each document has its schema (resNFe, nfeProc or procEventoNFe). FiscalHub: GET /api/v1/nfe/distribuicao.
Eingabe-Schema
{
"type": "object",
"properties": {
"empresaId": {
"type": "string",
"minLength": 1,
"description": "FiscalHub company id (empresaId) that issues or receives the document."
},
"ultNsu": {
"description": "Last NSU you received. Use 0 (default) to start from the beginning.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"chNFe": {
"description": "Optional: fetch one NF-e by its access key.",
"type": "string",
"pattern": "^\\d{44}$"
}
},
"required": [
"empresaId"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢fiscalhub_get_ncm(codigo)
Get the tax data of one exact NCM product code: description, IPI rate, CEST and unit of measure. FiscalHub: GET /api/v1/ncm/{codigo}.
Eingabe-Schema
{
"type": "object",
"properties": {
"codigo": {
"type": "string",
"pattern": "^\\d{8}$",
"description": "NCM product code: 8 digits."
}
},
"required": [
"codigo"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢fiscalhub_search_ncm(q)
Search NCM product codes by a partial code or a description term. Use it to find the NCM for a product before issuing a document. FiscalHub: GET /api/v1/ncm/buscar?q=.
Eingabe-Schema
{
"type": "object",
"properties": {
"q": {
"type": "string",
"minLength": 1,
"description": "Partial NCM code or a word from the product description."
}
},
"required": [
"q"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢fiscalhub_simulate_nfe_totals(empresaId, ufDestino, naturezaOperacao, valorFrete, valorSeguro, ...)
Simulate the tax totals of an NF-e (ICMS, IPI, PIS, COFINS, DIFAL, IBS, CBS and the invoice total) before issuing it. Nothing is issued or stored. FiscalHub: POST /api/v1/tributario/simular-nfe.
Eingabe-Schema
{
"type": "object",
"properties": {
"empresaId": {
"type": "string",
"minLength": 1,
"description": "FiscalHub company id (empresaId) that issues or receives the document."
},
"ufDestino": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "Destination state, for example \"RJ\"."
},
"naturezaOperacao": {
"type": "string",
"minLength": 1,
"description": "Nature of the operation, for example \"Venda\"."
},
"valorFrete": {
"description": "Freight value (default 0).",
"type": "number",
"minimum": 0
},
"valorSeguro": {
"description": "Insurance value (default 0).",
"type": "number",
"minimum": 0
},
"desconto": {
"description": "Discount value (default 0).",
"type": "number",
"minimum": 0
},
"itens": {
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"ncm": {
"type": "string",
"pattern": "^\\d{8}$",
"description": "NCM product code: 8 digits."
},
"cfop": {
"type": "string",
"pattern": "^\\d{4}$",
"description": "CFOP operation code: 4 digits, for example 5102."
},
"valorUnitario": {
"type": "number",
"minimum": 0
},
"quantidade": {
"type": "number",
"exclusiveMinimum": 0
},
"cst": {
"type": "string",
"minLength": 2,
"description": "Tax situation code, for example \"00\"."
}
},
"required": [
"ncm",
"cfop",
"valorUnitario",
"quantidade",
"cst"
]
}
}
},
"required": [
"empresaId",
"ufDestino",
"naturezaOperacao",
"itens"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴fiscalhub_emit_nfe(empresaId, naturezaOperacao, tipoOperacao, itens, pagamentos)
DESTRUCTIVE: issues an NF-e (model 55) and sends it to the SEFAZ for authorization. A production company issues a legal document that the customer must cancel if it is wrong. Whether it is homologation or production depends on the company's setting in FiscalHub. FiscalHub: POST /api/v1/nfe/emitir.
Eingabe-Schema
{
"type": "object",
"properties": {
"empresaId": {
"type": "string",
"minLength": 1,
"description": "FiscalHub company id (empresaId) that issues or receives the document."
},
"naturezaOperacao": {
"type": "string",
"minLength": 1,
"description": "Nature of the operation, for example \"Venda de mercadoria\"."
},
"tipoOperacao": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
],
"description": "0 = incoming (entrada), 1 = outgoing (saida)."
},
"itens": {
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"numeroItem": {
"description": "Item number, from 1 (default: the item's position in the list).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"codigoProduto": {
"type": "string",
"minLength": 1,
"description": "Your product code, for example PROD-001."
},
"descricao": {
"type": "string",
"minLength": 1,
"description": "Product description."
},
"ncm": {
"type": "string",
"pattern": "^\\d{8}$",
"description": "NCM product code: 8 digits."
},
"cfop": {
"type": "string",
"pattern": "^\\d{4}$",
"description": "CFOP operation code: 4 digits, for example 5102."
},
"unidadeComercial": {
"type": "string",
"minLength": 1,
"description": "Unit of measure, for example UN."
},
"quantidade": {
"type": "number",
"exclusiveMinimum": 0
},
"valorUnitario": {
"type": "number",
"minimum": 0
},
"valorTotal": {
"description": "Item total (default: quantidade x valorUnitario, rounded to 2 decimals).",
"type": "number",
"minimum": 0
},
"impostos": {
"description": "Taxes for this item. For the tax reform (IBS/CBS) use the ibsCbs object from the FiscalHub docs.",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"codigoProduto",
"descricao",
"ncm",
"cfop",
"unidadeComercial",
"quantidade",
"valorUnitario"
]
}
},
"pagamentos": {
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"formaPagamento": {
"type": "string",
"minLength": 2,
"description": "Payment method code, for example \"01\"."
},
"valor": {
"type": "number",
"minimum": 0
}
},
"required": [
"formaPagamento",
"valor"
]
}
}
},
"required": [
"empresaId",
"naturezaOperacao",
"tipoOperacao",
"itens",
"pagamentos"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴fiscalhub_cancel_nfe(chave, justificativa, cpfCnpj, sequenciaEvento)
DESTRUCTIVE: cancels an authorized NF-e by its access key, with a required justification. The tax authority records the cancellation and it cannot be undone. FiscalHub: POST /api/v1/nfe/{chave}/cancelar.
Eingabe-Schema
{
"type": "object",
"properties": {
"chave": {
"type": "string",
"pattern": "^\\d{44}$",
"description": "Access key (chave de acesso) of the document: 44 digits."
},
"justificativa": {
"type": "string",
"minLength": 15,
"maxLength": 255,
"description": "Reason for the cancellation, 15 to 255 characters (the tax authority requires it)."
},
"cpfCnpj": {
"type": "string",
"pattern": "^(\\d{11}|\\d{14})$",
"description": "CPF or CNPJ of the issuer, digits only."
},
"sequenciaEvento": {
"default": 1,
"description": "Event sequence number, from 1 (default 1).",
"type": "integer",
"minimum": 1,
"maximum": 20
}
},
"required": [
"chave",
"justificativa",
"cpfCnpj"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴fiscalhub_emit_nfce(empresaId, naturezaOperacao, tipoOperacao, itens, pagamentos)
DESTRUCTIVE: issues a consumer NFC-e (model 65) and sends it to the SEFAZ for authorization. It has the same fields as an NF-e; the API applies model 65. The company's environment (homologation or production) is set in FiscalHub. FiscalHub: POST /api/v1/nfce/emitir.
Eingabe-Schema
{
"type": "object",
"properties": {
"empresaId": {
"type": "string",
"minLength": 1,
"description": "FiscalHub company id (empresaId) that issues or receives the document."
},
"naturezaOperacao": {
"type": "string",
"minLength": 1,
"description": "Nature of the operation, for example \"Venda de mercadoria\"."
},
"tipoOperacao": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
],
"description": "0 = incoming (entrada), 1 = outgoing (saida)."
},
"itens": {
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"numeroItem": {
"description": "Item number, from 1 (default: the item's position in the list).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"codigoProduto": {
"type": "string",
"minLength": 1,
"description": "Your product code, for example PROD-001."
},
"descricao": {
"type": "string",
"minLength": 1,
"description": "Product description."
},
"ncm": {
"type": "string",
"pattern": "^\\d{8}$",
"description": "NCM product code: 8 digits."
},
"cfop": {
"type": "string",
"pattern": "^\\d{4}$",
"description": "CFOP operation code: 4 digits, for example 5102."
},
"unidadeComercial": {
"type": "string",
"minLength": 1,
"description": "Unit of measure, for example UN."
},
"quantidade": {
"type": "number",
"exclusiveMinimum": 0
},
"valorUnitario": {
"type": "number",
"minimum": 0
},
"valorTotal": {
"description": "Item total (default: quantidade x valorUnitario, rounded to 2 decimals).",
"type": "number",
"minimum": 0
},
"impostos": {
"description": "Taxes for this item. For the tax reform (IBS/CBS) use the ibsCbs object from the FiscalHub docs.",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"codigoProduto",
"descricao",
"ncm",
"cfop",
"unidadeComercial",
"quantidade",
"valorUnitario"
]
}
},
"pagamentos": {
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"formaPagamento": {
"type": "string",
"minLength": 2,
"description": "Payment method code, for example \"01\"."
},
"valor": {
"type": "number",
"minimum": 0
}
},
"required": [
"formaPagamento",
"valor"
]
}
}
},
"required": [
"empresaId",
"naturezaOperacao",
"tipoOperacao",
"itens",
"pagamentos"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴fiscalhub_cancel_nfce(chave, justificativa, cpfCnpj, sequenciaEvento)
DESTRUCTIVE: cancels an authorized NFC-e by its access key, with a required justification. The tax authority records the cancellation and it cannot be undone. FiscalHub: POST /api/v1/nfce/{chave}/cancelar.
Eingabe-Schema
{
"type": "object",
"properties": {
"chave": {
"type": "string",
"pattern": "^\\d{44}$",
"description": "Access key (chave de acesso) of the document: 44 digits."
},
"justificativa": {
"type": "string",
"minLength": 15,
"maxLength": 255,
"description": "Reason for the cancellation, 15 to 255 characters (the tax authority requires it)."
},
"cpfCnpj": {
"type": "string",
"pattern": "^(\\d{11}|\\d{14})$",
"description": "CPF or CNPJ of the issuer, digits only."
},
"sequenciaEvento": {
"default": 1,
"description": "Event sequence number, from 1 (default 1).",
"type": "integer",
"minimum": 1,
"maximum": 20
}
},
"required": [
"chave",
"justificativa",
"cpfCnpj"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}Community
Nachweis