Mcp Afip

io.github.codespar由 GitHub 账号 codespar 发布v0.2.0-alpha.3更新于 Oct 24, 2026

AFIP — Argentine tax authority, electronic invoicing (Factura Electrónica)

已验证STDIO仅桌面金融商业与电商

概览

AI 生成的概览

面向阿根廷税务机关 AFIP 的本地 MCP 服务器,让助手开具和管理带 CAE 授权的电子发票(Factura Electrónica)。

可以做什么
创建、批量创建、查询和作废电子发票、贷项通知单和借项通知单,并检查 CAE 授权状态及各销售点与类型的最后发票号。查询参考数据:发票类型、税种、概念类型、证件类型、IVA 税率、货币及汇率。检查 AFIP 网络服务可用性,并列出该 CUIT 授权的销售点。按 CUIT 在 padrón 中查询纳税人并获取登记证明。
适用场景
适用于助手需要处理阿根廷电子发票或纳税人数据的场景:开具发票、通知单或作废,或查询税务参考数据和纳税人信息。在接触生产环境前应先在 homologation 测试环境验证。
运行要求
通过 npm 包 @codespar/mcp-afip 在本地运行(需 Node.js),以 alpha 标签安装。需要 AFIP 签发的证书和私钥,以文件路径形式通过 AFIP_CERT_PATH 和 AFIP_KEY_PATH 提供,并通过 AFIP_CUIT 提供纳税人 CUIT。AFIP_ENV 选择生产或 homologation(默认 homologation);可选的 MCP_HTTP 和 MCP_PORT 启用 HTTP 传输。需要访问 AFIP 的 SOAP 服务网络。
安装前请注意
服务器需要 AFIP 证书和私钥文件路径(AFIP_KEY_PATH 为机密)以及纳税人 CUIT,请妥善保护这些凭据。相关工具会创建、批量创建、作废和撤销具有法律效力的税务发票与通知单,属于重要的写入操作。README 标明这是 alpha 版本,端点路径尚未完全经过实际验证,应固定精确版本并先在 homologation 环境测试。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Afip,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@codespar/mcp-afip

MCP server for AFIP, the Argentine tax authority (Administracion Federal de Ingresos Publicos), for electronic invoicing (Factura Electronica) with CAE authorization

[npm] [License: MIT]

Alpha release — published under the alpha npm dist-tag. Endpoint paths follow public docs and BACEN/provider conventions but have not been fully live-validated. Pin exact versions during 0.x.x-alpha. Install with npm install @codespar/mcp-afip@alpha.

Quick Start

bash
# Set your credentialsexport AFIP_CERT_PATH="/path/to/cert.crt"export AFIP_KEY_PATH="/path/to/key.key"export AFIP_CUIT="20123456789"
# Run via stdionpx -y @codespar/mcp-afip@alpha
# Run via HTTPMCP_HTTP=true MCP_PORT=3000 npx -y @codespar/mcp-afip@alpha

Environment Variables

VariableRequiredDescription
AFIP_CERT_PATHYesPath to AFIP certificate (.crt)
AFIP_KEY_PATHYesPath to AFIP private key (.key)
AFIP_CUITYesCUIT number of the taxpayer
AFIP_ENVNo"production" or "homologation" (default: homologation)
MCP_HTTPNoSet to "true" to enable HTTP transport
MCP_PORTNoHTTP port (default: 3000)

Tools (20)

ToolPurpose
create_invoiceCreate an electronic invoice (Factura Electrónica) via AFIP
get_invoiceGet invoice details by type, point of sale, and number
get_last_invoice_numberGet last authorized invoice number for a point of sale and type
get_cae_statusCheck CAE authorization status for an invoice
list_invoice_typesList available invoice types (Factura A, B, C, etc.)
list_tax_typesList available tax types (IVA, percepciones, retenciones, etc.)
get_server_statusCheck AFIP web-service availability (WSFE status)
get_authorized_points_of_saleList authorized puntos de venta for the CUIT
create_invoice_batchCreate a batch of invoices in a single CAE request (FECAESolicitar, up to 250)
create_credit_noteIssue a credit note (Nota de Crédito A/B/C: types 3, 8, 13) referencing an original invoice
create_debit_noteIssue a debit note (Nota de Débito A/B/C: types 2, 7, 12) referencing an original invoice
cancel_invoiceCancel/void an authorized invoice (FECancel — limited to certain types/conditions)
get_invoice_total_x_requestMax number of records allowed per FECAESolicitar request (FECompTotXRequest)
list_concept_typesList available concept types (FEParamGetTiposConcepto: 1=Products, 2=Services, 3=Both)
list_doc_typesList document/identifier types (FEParamGetTiposDoc: 80=CUIT, 86=CUIL, 96=DNI, 99=Consumer Final)
list_iva_typesList IVA tax aliquots (FEParamGetTiposIva: 21%, 10.5%, 27%, 0%, etc.)
list_currency_typesList supported currencies (FEParamGetTiposMonedas)
get_currency_rateGet FX rate (cotización) for a currency vs ARS (FEParamGetCotizacion)
lookup_taxpayerPadrón lookup by CUIT (WS_SR_PADRON A4/A5/A13 — fiscal status, name, address)
get_registration_certificateGet constancia de inscripción (registration certificate) for a CUIT

Auth

Uses certificate-based WSAA authentication (SOAP). The MCP server wraps AFIP's SOAP services (WSFE) internally using a REST approach. You need a valid certificate issued by AFIP. For testing, use the homologation environment.

API Reference


Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

Authentication

Set these environment variables before launching the server:

  • AFIP_CERT_PATH (required) — Path to AFIP certificate (.crt)
  • AFIP_KEY_PATH (required, secret) — Path to AFIP private key (.key)
  • AFIP_CUIT (required) — CUIT number

Issue credentials at the provider's developer portal: https://www.afip.gob.ar/ws.

License

MIT

来源:packages/argentina/afip/README.md,提交 d0a519a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.0-alpha.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分