KSeF MCP

23 tools. 7 can modify or destroy data without limits.

1 destructive tool with no built-in limits. Policy required.

Last updated:

7 can modify or destroy data
16 read-only
23 tools total

Community server · catalogue entry verified 02/07/2026

How to control KSeF MCP ↓

What KSeF MCP exposes to your agents

Read (16) Write / Execute (6) Destructive / Financial (1)
Critical Risk

The most dangerous KSeF MCP tools

7 of KSeF MCP's 23 tools can modify, destroy, or commit something on every call — and an agent calls them with no built-in limits.

How to control KSeF MCP

PolicyLayer is an MCP gateway — it sits between your AI agents and KSeF MCP, and nothing reaches the server without passing your rules. These are the rules we recommend:

Deny destructive operations
{
  "ksef_submit_invoice": {
    "deny_if": [
      {
        "conditions": [],
        "on_deny": "Blocked by default. Requires approval."
      }
    ]
  }
}

Destructive tools should never be available to autonomous agents without human approval.

Rate limit write operations
{
  "ksef_add_source_document": {
    "limits": [
      {
        "counter": "ksef_add_source_document_per_hour",
        "window": "hour",
        "max": 30,
        "scope": "grant"
      }
    ]
  }
}

Prevents bulk unintended modifications from agents caught in loops.

Cap read operations
{
  "ksef_advise_exchange_rate_basis": {
    "limits": [
      {
        "counter": "ksef_advise_exchange_rate_basis_per_minute",
        "window": "minute",
        "max": 60,
        "scope": "grant"
      }
    ]
  }
}

Controls API costs and prevents retry loops from exhausting upstream rate limits.

  1. Create a free account and register KSeF MCP — nothing to install.
  2. Add these rules — paste them, or build them visually. Tune the limits to your setup.
  3. Point your MCP client (Claude, Cursor, anything) at your gateway URL.
ENFORCE POLICY ON KSEF →

Instant setup, no code required.

All 23 KSeF MCP tools

READ 16 tools
Read ksef_advise_exchange_rate_basis Suggest the advisory NBP average rate for a VAT exchange-rate basis date. Read ksef_advise_vat_treatment Suggest advisory VAT treatment candidates and missing facts; never mutates drafts. Read ksef_check_attachment_permission Check whether the current KSeF context may issue invoices with FA(3) attachments. Read ksef_download_upo Retrieve invoice or session UPO for a known KSeF session. Read ksef_extract_invoice_source Use a local LLM to propose source-backed invoice fields without mutating drafts. Read ksef_get_capabilities Report supported, advisory, unsupported, and manual-smoke workflow capabilities. Read ksef_get_invoice Fetch a KSeF invoice by reference number. Read ksef_list_invoices Query KSeF invoice metadata for a date range and role. Read ksef_lookup_counterparty Look up advisory counterparty data from MF, VIES, KRS, or GUS sources. Read ksef_lookup_exchange_rate Fetch official NBP exchange-rate data; advisory and requires basis confirmation. Read ksef_render_invoice_pdf Render a local KSeF-like PDF from prepared FA(3) XML without sending to KSeF. Read ksef_search_source_documents Search local source documents; returned matches are advisory provenance only. Read ksef_session_status Report configured KSeF environment and auth state without exposing secrets. Read ksef_validate_fa3_xml Validate FA(3) XML against the vendored official XSD. Read ksef_validate_invoice_draft Validate invoice draft completeness before XML preparation. Read ksef_validate_nip Validate a Polish NIP checksum.

Related servers

Other MCP servers with similar tools — same risk classification, starter policies for each.

Questions about KSeF MCP

Can an AI agent delete data through the KSeF MCP server? +

Yes. The KSeF MCP server exposes 1 destructive tools including ksef_submit_invoice. These permanently remove resources with no undo. PolicyLayer blocks destructive tools by default so they never reach the upstream server.

How do I prevent bulk modifications through KSeF MCP? +

The KSeF MCP server has 5 write tools including ksef_add_source_document, ksef_attach_field_provenance, ksef_prepare_invoice. Set a rate limit in your policy -- for example, 10 calls per hour prevents an agent from making more than 10 modifications per hour. PolicyLayer enforces this at the gateway, before calls reach KSeF MCP.

How many tools does the KSeF MCP server expose? +

23 tools across 3 categories: Execute, Read, Write. 16 are read-only. 7 can modify, create, or delete data.

How do I enforce a policy on KSeF MCP? +

Register the KSeF MCP server in PolicyLayer, apply the suggested rules above (adjust the limits to your use case), and point your AI client at the PolicyLayer proxy URL instead of the server directly. Your agents keep the same tools; PolicyLayer evaluates every call against policy before it executes. Nothing to install, live in minutes.

Enforce policy on every KSeF MCP tool call.

Deterministic rules across all 23 KSeF MCP tools. Per-identity grants. Full audit log. Live in minutes. Nothing to install.

Instant setup, no code required.

23 KSeF MCP tools catalogued and risk-classified — across an index of 43,000+ MCP servers.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.