Dominican Republic Invoice MCP
Lets AI agents authenticate and submit Dominican Republic electronic invoices (e-CF) to the DGII national gateway using certificate-based authentication.
README
Dominican Republic Invoice MCP 🇩🇴
<!-- install-cta -->
Use it in 60 seconds
Paste this into your MCP client config (Claude Desktop, Cursor, Windsurf, or any MCP-capable agent):
{
"mcpServers": {
"dominican-invoice": {
"type": "http",
"url": "https://inv-do.wishpool.app/mcp"
}
}
}
Nothing to install. Credentials, when you need them, travel as HTTP headers on each request and are never stored — see the threat model.
Or run it yourself
Would you rather not send production credentials to a server you do not control? Deploy this identical code to your own account and point your agent at your own URL:
git clone https://github.com/junter1989k-ai/dominican-republic-invoice-mcp && cd dominican-republic-invoice-mcp && npx vercel --prod
MIT-licensed. Self-hosting removes us from the picture entirely, at no cost and with no loss of function.
Remote MCP server that lets any AI agent authenticate to and submit Dominican Republic electronic invoices (e-CF, comprobante fiscal electrónico / factura electrónica) through the DGII (Dirección General de Impuestos Internos) national gateway.
- Endpoint:
https://inv-do.wishpool.app/mcp(MCP Streamable HTTP, stateless JSON mode) - Stateless / BYO: no database, no accounts. DGII authentication is certificate-based — you sign the semilla and every e-CF with your own DGII-recognized digital certificate (Digifirma or another approved CA). This server only forwards already-signed bytes; it never signs, never generates the e-CF XML, and never stores anything.
Honest scope
This server is a thin, stateless translation layer over the four DGII e-CF web services. It does not:
- generate or build the e-CF XML (your billing software does that, with the e-NCF, RNC, Totales, ITBIS);
- sign anything (the XAdES signature and the DGII certificate stay merchant-side);
- store credentials, tokens, invoices, or customer data.
It does map the DGII flow to four weak-model-friendly tools and pass DGII's native responses straight through.
The 4-step DGII e-CF flow
| Step | Tool | DGII web service | You provide | You get back |
|---|---|---|---|---|
| 1 | get_seed |
GET /Autenticacion/api/Autenticacion/Semilla |
— | { seed_xml, valor, fecha } |
| 2 | get_token |
POST /Autenticacion/api/Autenticacion/ValidarSemilla (multipart xml) |
the signed semilla (base64) | { token, expira, expedido } |
| 3 | submit_invoice |
POST /Recepcion/api/FacturasElectronicas (multipart xml, Bearer) |
the signed e-CF (base64) + token |
{ trackId, mensaje, error } |
| 4 | query_status |
GET /ConsultaResultado/api/Consultas/Estado?TrackId= (Bearer) |
trackId + token |
{ estado, codigo, rnc, encf, mensajes[] } |
estado enum: En Proceso → Aceptado (fiscally valid) / Aceptado Condicional (accepted with observations) / Rechazado (fix and resubmit with a new e-NCF).
Where do the credentials come from?
There is no static API key. To use production you need a DGII-recognized digital certificate issued by an approved Certification Authority (e.g. Digifirma), registered as a taxpayer certificate with the DGII. You sign the semilla with it to obtain a ~1-hour session token, and sign each e-CF the same way. For free testing, the DGII TesteCF (certificación) environment is open, requires no registration, and has no fiscal effect.
Headers
| Header | Required | Meaning |
|---|---|---|
x-dgii-env |
optional | test (default, TesteCF certificación, no fiscal effect) or prod (eCF production, real fiscal effect) |
x-dgii-token |
optional | alternative to passing the get_token token as the token argument on submit_invoice/query_status |
x-agentpay-max-amount |
optional | hard cap on the grand total (MontoTotal, incl. ITBIS, in DOP) — owner-set; the agent cannot relax it |
x-agentpay-approval-above |
optional | above this the invoice is not submitted; returns an unsubmitted draft for human review |
x-agentpay-allowed-tools |
optional | comma-separated tool allow-list |
{
"mcpServers": {
"dominican-republic-invoice": {
"type": "http",
"url": "https://inv-do.wishpool.app/mcp",
"headers": { "x-dgii-env": "prod" }
}
}
}
Mandate
Electronic invoicing (facturación electrónica / e-CF) is mandatory in the Dominican Republic under Law 32-23, phased in by taxpayer size: large national taxpayers first, medium/small/micro phased through 2026. Every taxpayer must issue e-CF and report it to the DGII via these web services.
Develop & test
npm run dev # local server on http://localhost:3246 (simulates /mcp routing)
npm test # full e2e: protocol + validation + policy + LIVE DGII TesteCF probes
The e2e suite includes live probes against the open DGII TesteCF environment: GET Semilla asserts 200 + <valor>, and a fake POST ValidarSemilla asserts the native 400 "Archivo no válido." — no certificate required.
Sister servers
Invoices: Costa Rica Hacienda (inv-cr), Saudi ZATCA (inv-sa), Mexico CFDI 4.0 (inv-mx), Poland KSeF (inv-pl), Chile DTE (inv-cl), Brazil NF-e (inv-br), Peru CPE (inv-pe), India GST (inv-in). Local payments in 81 countries and logistics, one family, same stateless pattern — see mcp.wishpool.app · logi.wishpool.app.
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.