Poland Invoice MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Poland Invoice MCPCreate invoice for buyer NIP 1234567890, item Laptop net 1000 PLN"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Poland Invoice MCP 🇵🇱 — How can my AI agent issue a KSeF structured e-invoice (faktura ustrukturyzowana) in Poland?
Remote MCP server that lets any AI agent issue Poland structured e-invoices (faktura ustrukturyzowana, schema FA(3)) through KSeF 2.0 — Krajowy System e-Faktur, the Ministry of Finance national government e-invoice API. It builds the FA(3) XML, runs the encrypted KSeF online-session flow, and returns the assigned KSeF number. Stateless, bring-your-own credentials, never stores anything.
Live endpoint: https://inv-pl.wishpool.app/mcp · Registry: app.wishpool/poland-invoice-mcp
Quick start
{
"mcpServers": {
"poland-invoice": {
"type": "http",
"url": "https://inv-pl.wishpool.app/mcp",
"headers": {
"x-ksef-token": "your-ksef-authorization-token",
"x-ksef-nip": "1234567890",
"x-ksef-mode": "production"
}
}
}
}Self-mint your x-ksef-token in the Ministry of Finance taxpayer portal (ksef.podatki.gov.pl → Tokeny / Uwierzytelnianie) and pass your 10-digit seller NIP in x-ksef-nip. Omit x-ksef-mode to stay in the MoF TEST environment (no fiscal effect). Your KSeF certificate stays with the Ministry of Finance — this server never sees it.
Related MCP server: Polish Business Intelligence MCP
Tools
Tool | What it does |
| Build an FA(3) structured invoice and submit it to KSeF — |
| Fetch an invoice by its KSeF number: status |
Owner policy guardrails ride optional headers (x-agentpay-max-amount, x-agentpay-approval-above, x-agentpay-allowed-tools) — set by the human owner in client config; the agent cannot relax them. The cap applies to the invoice gross total (PLN).
Why there is no cancel tool
KSeF has no cancel/void operation. Once a structured invoice is accepted into the national system it cannot be deleted; a mistake is fixed by issuing a separate correction invoice (faktura korygująca, RodzajFaktury=KOR), which is its own document with its own KSeF number. So this server ships exactly two tools — create_invoice and query_invoice — rather than pretending a cancel exists. (Correction-invoice support can be added later as a distinct create path.)
How it works (KSeF 2.0 flow)
Auth handshake:
POST /auth/challenge→ encrypttoken|timestampMswith RSA-OAEP (SHA-256) using the MoFKsefTokenEncryptionpublic certificate →POST /auth/ksef-token→ pollGET /auth/{ref}→POST /auth/token/redeemfor the access token (JWT).Encrypted session: generate an AES-256 key + IV, encrypt the key with the MoF
SymmetricKeyEncryptioncertificate (RSA-OAEP),POST /sessions/online.Submit: AES-256-CBC-encrypt the FA(3) XML,
POST /sessions/online/{ref}/invoices(with plaintext + ciphertext SHA-256 hashes), thenPOST /sessions/online/{ref}/closeand read the KSeF number.
Public encryption certificates are fetched live from GET /security/public-key-certificates (X.509, CN=Ministerstwo Finansów), so key rotation is handled automatically and nothing is embedded.
Develop
node test/serve.js # local server on :3231
node test/e2e.js # protocol + validation + VAT-math asserts + LIVE probes against api-test.ksef.mf.gov.plThe e2e suite makes two real calls to the government KSeF test API: the credential-free /auth/challenge round-trip, and a full RSA-OAEP auth handshake with a placeholder token that surfaces KSeF's real structured auth-failure — the deepest verification possible without a portal-minted token.
Safety
Pure stateless translation layer straight to the government KSeF API. The KSeF certification and taxpayer certificate stay with the Ministry of Finance; credentials travel per-request in headers, nothing is stored. Privacy policy.
Sister servers
Invoices: Mexico CFDI 4.0 inv-mx · Chile DTE inv-cl · Brazil NF-e inv-br · Peru CPE inv-pe · India GST inv-in · Local payments in 81 countries, one family: mcp.wishpool.app · Taiwan e-invoice 電子發票 included.
MIT licensed.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/junter1989k-ai/poland-invoice-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server