FiscalHub MCP by usefulapi
Read NF-e XML and NCM tax data, simulate totals, issue and cancel NF-e and NFC-e in FiscalHub.
사용해야 할까요
품질 및 안전성
발견 사항 (1)
- LOWfiscalhub_simulate_nfe_totals에서
도구 정의와 프로토콜 준수에 대한 자동 분석을 기반으로 합니다.
컨텍스트 비용
이는 서버의 도구가 모델의 컨텍스트에 로드될 때마다 소비되는 대략적인 토큰 수입니다. 수치가 높을수록 다른 작업에 사용할 수 있는 주의가 줄어듭니다.
설치
원클릭 설치
`claude_desktop_config.json` 파일에 다음을 추가하세요:
{
"mcpServers": {
"fiscalhub": {
"url": "https://fiscalhub.usefulapi.io/mcp"
}
}
}원격 엔드포인트
https://fiscalhub.usefulapi.io/mcpstreamable-http할 수 있는 일
도구 목록
도구 (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.
입력 스키마
{
"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.
입력 스키마
{
"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}.
입력 스키마
{
"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=.
입력 스키마
{
"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.
입력 스키마
{
"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.
입력 스키마
{
"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.
입력 스키마
{
"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.
입력 스키마
{
"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.
입력 스키마
{
"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"
}커뮤니티
증거