
Mcp Ksef Pl
If you're building systems that need to work with Polish electronic invoicing, this connects your AI agent directly to the KSeF (Krajowy System e-Faktur) platform and Peppol network. It handles FA(2) and FA(3) XML generation, validation against Ministry of Finance schemas, NIP and REGON tax identifier verification with checksum algorithms, and the full KSeF submission cycle including status polling and invoice search. It also generates Peppol BIS 3.0 compliant UBL invoices for cross-border transactions. Authentication requires obtaining a KSeF session token externally since the server can't automate the qualified signature flow, but once configured it gives Claude the ability to generate, validate, submit, and query invoices through the official government API.
- GitHub stars
- 3
- tools
- 30
- transport
- STDIO
- env vars
- 4
- last updated
- Sep 12, 2026
Tools
30 toolsPublic tool metadata for what this MCP can expose to an agent.
generate_fa3_invoiceGenerates a KSeF-compliant FA(3) XML invoice (required for KSeF API v2 submissions)
Generates a KSeF-compliant FA(3) XML invoice (required for KSeF API v2 submissions)
No parameter schema in public metadata yet.
generate_fa2_invoiceGenerates a KSeF-compliant FA(2) XML invoice (legacy format, read-only use)
Generates a KSeF-compliant FA(2) XML invoice (legacy format, read-only use)
No parameter schema in public metadata yet.
validate_fa3_invoiceValidates FA(3) XML: XSD validation and FA(3)-specific business rules
Validates FA(3) XML: XSD validation and FA(3)-specific business rules
No parameter schema in public metadata yet.
validate_fa2_invoiceValidates FA(2) XML: XSD validation (if the schema is available) and business rules
Validates FA(2) XML: XSD validation (if the schema is available) and business rules
No parameter schema in public metadata yet.
parse_fa2_invoiceParses FA(2) XML into a structured dictionary
Parses FA(2) XML into a structured dictionary
No parameter schema in public metadata yet.
submit_invoice_to_ksefSubmits an FA(3) invoice to the KSeF platform and returns a reference number
Submits an FA(3) invoice to the KSeF platform and returns a reference number
No parameter schema in public metadata yet.
get_ksef_invoice_statusRetrieves the processing status of an invoice by its reference number
Retrieves the processing status of an invoice by its reference number
No parameter schema in public metadata yet.
search_ksef_invoicesSearches invoices in KSeF by date range and direction (seller/buyer)
Searches invoices in KSeF by date range and direction (seller/buyer)
No parameter schema in public metadata yet.
validate_polish_nipValidates a NIP (10-digit tax identification number) using a checksum algorithm
Validates a NIP (10-digit tax identification number) using a checksum algorithm
No parameter schema in public metadata yet.
validate_polish_regonValidates a REGON (9- or 14-digit registry number) using a checksum algorithm
Validates a REGON (9- or 14-digit registry number) using a checksum algorithm
No parameter schema in public metadata yet.
generate_peppol_invoiceGenerates a UBL 2.1 invoice compliant with Peppol BIS Billing 3.0 / EN 16931
Generates a UBL 2.1 invoice compliant with Peppol BIS Billing 3.0 / EN 16931
No parameter schema in public metadata yet.
validate_peppol_invoiceValidates a UBL 2.1 Peppol invoice against the CEN EN 16931 base Schematron rules (en16931-base-only scope — does not check the Peppol-specific overlay)
Validates a UBL 2.1 Peppol invoice against the CEN EN 16931 base Schematron rules (en16931-base-only scope — does not check the Peppol-specific overlay)
No parameter schema in public metadata yet.
peppol_lookup_participantCheck whether a business is registered on the Peppol network; returns registration status and supported document types
Check whether a business is registered on the Peppol network; returns registration status and supported document types
No parameter schema in public metadata yet.
peppol_get_service_endpointFetch the AS4 endpoint for a participant's document type
Fetch the AS4 endpoint for a participant's document type
No parameter schema in public metadata yet.
resolve_peppol_dnsDNS-only (SML) diagnostic, independent of SMP reachability
DNS-only (SML) diagnostic, independent of SMP reachability
No parameter schema in public metadata yet.
peppol_sendTransmit a UBL/CII invoice via AS4
Transmit a UBL/CII invoice via AS4
No parameter schema in public metadata yet.
peppol_directory_searchSearch the public Peppol Directory by participant, name, country, or document type
Search the public Peppol Directory by participant, name, country, or document type
No parameter schema in public metadata yet.
list_participant_id_schemesOpenPeppol eDEC codelist lookup (requires EINVOICING_PEPPOL_CODELIST_DIR)
OpenPeppol eDEC codelist lookup (requires EINVOICING_PEPPOL_CODELIST_DIR)
No parameter schema in public metadata yet.
list_document_type_idsOpenPeppol eDEC codelist lookup (requires EINVOICING_PEPPOL_CODELIST_DIR)
OpenPeppol eDEC codelist lookup (requires EINVOICING_PEPPOL_CODELIST_DIR)
No parameter schema in public metadata yet.
list_process_idsOpenPeppol eDEC codelist lookup (requires EINVOICING_PEPPOL_CODELIST_DIR)
OpenPeppol eDEC codelist lookup (requires EINVOICING_PEPPOL_CODELIST_DIR)
No parameter schema in public metadata yet.
list_spis_use_case_idsOpenPeppol eDEC codelist lookup (requires EINVOICING_PEPPOL_CODELIST_DIR)
OpenPeppol eDEC codelist lookup (requires EINVOICING_PEPPOL_CODELIST_DIR)
No parameter schema in public metadata yet.
check_document_type_id_in_codelistOpenPeppol eDEC codelist check
OpenPeppol eDEC codelist check
No parameter schema in public metadata yet.
check_process_id_in_codelistOpenPeppol eDEC codelist check
OpenPeppol eDEC codelist check
No parameter schema in public metadata yet.
check_participant_id_scheme_in_codelistOpenPeppol eDEC codelist check
OpenPeppol eDEC codelist check
No parameter schema in public metadata yet.
get_peppol_codelist_versionReports the OpenPeppol eDEC codelist version
Reports the OpenPeppol eDEC codelist version
No parameter schema in public metadata yet.
validate_eusr_reportValidate an End User Statistics Report (XSD, then Schematron). Requires the [xslt2] extra.
Validate an End User Statistics Report (XSD, then Schematron). Requires the [xslt2] extra.
No parameter schema in public metadata yet.
validate_tsr_reportValidate a Transaction Statistics Report (XSD, then Schematron). Requires the [xslt2] extra.
Validate a Transaction Statistics Report (XSD, then Schematron). Requires the [xslt2] extra.
No parameter schema in public metadata yet.
validate_mls_messageValidate a Message Level Status document (UBL ApplicationResponse-2 subset). Requires the [xslt2] extra.
Validate a Message Level Status document (UBL ApplicationResponse-2 subset). Requires the [xslt2] extra.
No parameter schema in public metadata yet.
build_mls_messageBuild a document-level MLS response. Requires the [xslt2] extra.
Build a document-level MLS response. Requires the [xslt2] extra.
No parameter schema in public metadata yet.
get_en16931_codelist_versionEN 16931 semantic code list version reporting. Requires EINVOICING_EN16931_CODELIST_DIR.
EN 16931 semantic code list version reporting. Requires EINVOICING_EN16931_CODELIST_DIR.
No parameter schema in public metadata yet.
Sponsors
Configuration
KSEF_SESSION_TOKENKSeF v2 AccessToken obtained via the challenge/redeem auth flow. Required for submit_invoice_to_ksef.
KSEF_NIPNIP (Polish tax identifier, 10 digits) of the entity submitting invoices.
KSEF_ENVIRONMENTTarget KSeF environment: 'production' or 'test' (default: test).
KSEF_TIMEOUTHTTP request timeout in seconds (default: 30).
Readme
mcp-ksef-pl 🇵🇱
A Python MCP server providing tools for Polish electronic invoicing compliant with KSeF (FA(2)) and Peppol BIS Billing 3.0 / EN 16931. It enables AI agents (Claude, IDEs) to generate, validate, and submit invoices to the Krajowy System e-Faktur (KSeF), as well as validate Polish tax identifiers (NIP and REGON).
Introduction
This package is built on mcp-einvoicing-core, the shared base library for European e-invoicing MCP servers. It provides an OAuth2 HTTP client, token cache, data models, logging utilities, and an exception hierarchy.
Details
- Repository
- github.com/cmendezs/mcp-ksef-pl
- Category
- Data & Analytics
- Package
mcp-ksef-pl- Transport
- STDIO
- Registry
- MCP registry, active