Skip to content
Agentmart
Submit a tool

MCP Ksef Pl

Polish e-invoicing MCP: KSeF API v2, FA(3)/FA(2) XML, Peppol BIS 3.0, NIP/REGON validation.

Connector by cmendezs · GitHub account verified by the MCP Registry

IndexedApache-2.0Local (stdio)★ 3
Write a review

Install

Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.

npx agentmarket install connector/cmendezs-mcp-ksef-pl

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Polish e-invoicing MCP: KSeF API v2, FA(3)/FA(2) XML, Peppol BIS 3.0, NIP/REGON validation.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this server can do and what it asks for, from its tool list and install config. Checked Oct 25, 2026.

Tools
8 read · 1 write · 0 delete · 3 not yet classified
Secrets
1 (API keys, tokens or passwords)
Install scripts
Not scanned yet
Runs as
Python package

Tools by what they do 12

Read from the source code; the running server may list different tools.

Read 8 · Look things up without changing anything.

  • get_ksef_invoice_status
  • parse_fa2_invoice
  • search_ksef_invoices
  • validate_fa2_invoice
  • validate_fa3_invoice
  • validate_peppol_invoice
  • validate_polish_nip
  • validate_polish_regon

Write 1 · Create, change, send or run things.

  • submit_invoice_to_ksef

Not yet classified 3 · We could not tell from the name and description.

  • generate_fa2_invoice
  • generate_fa3_invoice
  • generate_peppol_invoice

Secrets and settings it asks for

Secrets: values you paste in that let it act as you.

  • KSEF_SESSION_TOKEN

Other settings (environment variables or headers).

  • KSEF_ENVIRONMENT
  • KSEF_NIP
  • KSEF_TIMEOUT

Tools (12)

Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].

  • generate_fa2_invoice

    Generate a KSeF-compliant FA(2) XML invoice from structured invoice data. Returns the FA(2) XML string ready for submission to KSeF. The seller's nip must be a Polish NIP (10 digits).

  • generate_fa3_invoice

    Generate a KSeF-compliant FA(3) XML invoice from structured invoice data. FA(3) is required for all new invoice submissions via KSeF API v2. Use this tool, not generate_fa2_invoice, before calling submit_invoice_to_ksef. The seller's nip must be a Polish NIP (10 digits). The buyer's nip may be a Polish NIP, eu_vat_country/eu_vat_id for EU cross-border, or neither (emits <BrakID>). Use the optional `options` parameter to supply: - IPKSeF / LinkDoPlatnosci payment identifiers (PL-2.2) - Correction invoice reference (rodzaj_faktury=KOR + correction block) (PL-4.1) - Supporting document a…

  • generate_peppol_invoice

    Generate a Peppol BIS Billing 3.0 / EN 16931 UBL 2.1 XML invoice. Use this for cross-border B2B invoicing via the Peppol network. For domestic Polish invoicing, use generate_fa3_invoice instead.

  • get_ksef_invoice_status

    Retrieve the processing status of a submitted KSeF invoice (API v2). Parameters ---------- reference_number: The 'reference_number' field from submit_invoice_to_ksef ("{sessionRef}:{invoiceRef}"). Pass just the sessionRef to retrieve the overall session status instead.

  • parse_fa2_invoice

    Parse a KSeF FA(2) XML invoice into a structured dictionary. Returns a nested dict with 'header', 'seller', 'buyer', 'invoice', and 'lines' keys.

  • search_ksef_invoices

    Query invoices stored in KSeF for a date range. Parameters ---------- date_from: Start date in YYYY-MM-DD format. date_to: End date in YYYY-MM-DD format. subject_type: 'Subject1' (seller), 'Subject2' (buyer), 'Subject3' (third party), or 'SubjectAuthorized' (authorised representative). Case-insensitive; normalized to the KSeF v2 PascalCase enum before submission.

  • submit_invoice_to_ksef

    Submit a FA(3) XML invoice to the KSeF platform (API v2). KSeF API v2 requires FA(3) format for submission. Use generate_fa3_invoice to produce FA(3) XML before calling this tool. HUMAN-IN-THE-LOOP: Call without confirmation_token first to receive a confirmation summary and token. Show the summary to the user, then call again with confirmation_token set to execute the actual submission. Parameters ---------- xml_content: FA(3) invoice XML string to submit. session_token: KSeF v2 AccessToken (overrides KSEF_SESSION_TOKEN env var). Obtain vi…

  • validate_fa2_invoice

    Validate a KSeF FA(2) XML invoice. Runs XSD validation (when the official schema is present) and Polish business-rule checks. Returns a DocumentValidationResult with errors and warnings.

  • validate_fa3_invoice

    Validate a KSeF FA(3) XML invoice before submission to KSeF API v2 (PL-6.2). Runs XSD validation against specs/schemat_FA(3)_v1-0E.xsd (requires lxml) and FA(3)-specific business-rule checks including namespace, mandatory Adnotacje sub-elements, JST/GV flags, and the absence of the FA(2) <FaWiersze> wrapper. Call this after generate_fa3_invoice and before submit_invoice_to_ksef. Returns a DocumentValidationResult with errors and warnings.

  • validate_peppol_invoice

    Validate a Peppol BIS 3.0 / EN 16931 UBL 2.1 XML invoice. Checks the CEN EN16931 base rules only (structural + arithmetic/totals, ~50 BR-* rules) via mcp-einvoicing-core's bundled Schematron validator. Does NOT check the Peppol-specific overlay (profile/process ID registration, EndpointID scheme, narrowed code lists) — the result's metadata.scope is "en16931-base-only", and a warning is included. This is not a full Peppol BIS3 conformance check; a document that passes may still be rejected by a real Peppol Access Point (no confirmed OpenPeppol redistribution rights for the overlay rules). Ca…

  • validate_polish_nip

    Validate a Polish NIP (tax identification number). Applies the official 10-digit checksum algorithm. Accepts NIP with or without dashes/spaces. Returns {'valid': bool, 'nip': str, 'normalized': str}.

  • validate_polish_regon

    Validate a Polish REGON (business registry number — 9 or 14 digits). Returns {'valid': bool, 'regon': str, 'length': int}.

Signals

Stars
3
Forks
0
Open issues
1
Weekly downloads
88
Last commit
Sep 12, 2026 (1 month ago)
Last release
Sep 12, 2026 (1 month ago)
Last package publish
Sep 12, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026) and the package registry.

Details

Registry name
io.github.cmendezs/mcp-ksef-pl
Version
0.10.1
Auth
No auth
Packages
pypi mcp-ksef-pl
License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 25, 2026

More from cmendezs

Cite this page

MCP Ksef Pl. Agent Mart. https://agentmart.dev/connectors/cmendezs-mcp-ksef-pl (last updated 2026-10-25)