KSeF MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| KSEF_NIP | No | Your NIP (Polish tax ID) for KSeF. | |
| KSEF_TOKEN | No | KSeF API token for token-based authentication. | |
| KSEF_CERT_PATH | No | Path to PKCS#12 certificate file for certificate-based authentication. | |
| KSEF_CERT_PASSWORD | No | Password for the certificate file (if encrypted). |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| ksef_session_statusA | Report configured KSeF environment and auth state without exposing secrets. |
| ksef_test_connection_checkC | Authenticate to KSeF TEST and persist readiness before invoice XML generation. |
| ksef_get_capabilitiesA | Report supported, advisory, unsupported, and manual-smoke workflow capabilities. |
| ksef_list_invoicesB | Query KSeF invoice metadata for a date range and role. |
| ksef_get_invoiceB | Fetch a KSeF invoice by reference number. |
| ksef_download_upoC | Retrieve invoice or session UPO for a known KSeF session. |
| ksef_check_attachment_permissionA | Check whether the current KSeF context may issue invoices with FA(3) attachments. |
| ksef_validate_nipA | Validate a Polish NIP checksum. |
| ksef_validate_fa3_xmlB | Validate FA(3) XML against the vendored official XSD. |
| ksef_lookup_counterpartyB | Look up advisory counterparty data from MF, VIES, KRS, or GUS sources. |
| ksef_lookup_exchange_rateA | Fetch official NBP exchange-rate data; advisory and requires basis confirmation. |
| ksef_advise_vat_treatmentB | Suggest advisory VAT treatment candidates and missing facts; never mutates drafts. |
| ksef_add_source_documentB | Store a local source document and index it for advisory retrieval. |
| ksef_search_source_documentsB | Search local source documents; returned matches are advisory provenance only. |
| ksef_extract_invoice_sourceB | Use a local LLM to propose source-backed invoice fields without mutating drafts. |
| ksef_attach_field_provenanceB | Attach source-backed field provenance to a draft and require confirmation. |
| ksef_start_invoice_draftC | Create an invoice draft and return the missing-field checklist. |
| ksef_update_invoice_draftC | Update an invoice draft with user-provided facts or confirmations. |
| ksef_validate_invoice_draftB | Validate invoice draft completeness before XML preparation. |
| ksef_prepare_invoiceA | Build and validate invoice XML without sending; refuses until TEST readiness passes. |
| ksef_submit_invoiceA | Irreversibly issues a legally binding invoice to KSeF. Requires a confirmation_token from ksef_prepare_invoice. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| first-use-setup | Guide the local TEST-first setup and first safe invoice flow. |
| issue-invoice | Guide an invoice draft through source gathering, validation, prepare, and submit. |
| monthly-review | Review KSeF invoices for a month using read-only tools. |
| explain-vat-treatment | Explain possible VAT treatment using advisory sources and ask for confirmation. |
| extract-invoice-source | Use local source search to propose draft fields with provenance. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| fa3-schema | Vendored FA(3) XSD schema used for local validation. |
| ksef-glossary | Short definitions for KSeF invoice workflow terms. |
| invoice-field-checklist | Current deterministic required and conditional fields for draft preparation. |
| capabilities | Machine-readable supported, advisory, and unsupported workflow surface. |
| seller-profile | Sanitized local seller profile, if configured. |
| knowledge-sources | Local source documents indexed for advisory retrieval. |
| first-use-checklist | TEST-first local and manual gates before the first invoice. |
Latest Blog Posts
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/olegtyshcneko/ksef-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server