Dominican Republic Invoice

by junter1989k-ai

252 downloads
Not rated
GitHub Website

About

Issue Dominican Republic e-CF invoices via the official DGII rail - sign the seed for a token, submit your signed e-CF, poll the TrackId

Details

Author
junter1989k-ai
Downloads
252
Categories
AI

- Endpoint: https://inv-do.wishpool.app/mcp (MCP Streamable HTTP, stateless JSON mode)
- 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

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Dominican Republic Invoice
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Follow the repository README to install the server and add its MCP configuration to your client.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "dominican republic invoice": {
            "dominican-invoice": {
                "type": "http",
                "url": "https://inv-do.wishpool.app/mcp",
                "headers": {
                    "x-dgii-env": "test"
                }
            }
        }
    }
}

McpServers

{
    "dominican-invoice": {
        "type": "http",
        "url": "https://inv-do.wishpool.app/mcp",
        "headers": {
            "x-dgii-env": "test"
        }
    }
}

Dominican Republic Invoice MCP 🇩🇴

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 ProcesoAceptado (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

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.