Set up Krajowy System e-Faktur (KSeF) in Metorial for AI agents
Share Krajowy System e-Faktur (KSeF) with your team in Claude, ChatGPT and Cursor through Metorial: 11 tools (9 read-only).
To give your team Krajowy System e-Faktur (KSeF) in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Krajowy System e-Faktur (KSeF) integration in a Metorial portal. Agents can search and download invoices from Poland's National e-Invoice System (KSeF), submit FA(3) XML invoices, inspect online submission sessions, and download official UPO receipts. The integration has 11 tools, 9 read-only and 2 destructive.
What you'll learn
- How an admin shares Krajowy System e-Faktur (KSeF) in a portal and how each person connects
- How to keep the 9 read-only tools and reject the other 2
Before you start
- A portal with at least one access group
- For the CLI steps: the Metorial CLI, signed in to your portal
Sign-in method
Available: KSeF Token.
Admin: share Krajowy System e-Faktur (KSeF) in a portal
In the dashboard
Open Shared Resources
Open Workforce, choose the portal, and select Shared Resources under Access.
Share a new integration
Select Share a Resource, then New Integration, and choose Krajowy System e-Faktur (KSeF).
Limit the tools
Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Krajowy System e-Faktur (KSeF).
Choose who gets it
Add the access groups that should see Krajowy System e-Faktur (KSeF). When a person asks for access from the portal, the request appears under Access Requests.
With the CLI
The CLI cannot create the per-user Krajowy System e-Faktur (KSeF) integration. Once it exists, check which groups have it:
Employee: connect Krajowy System e-Faktur (KSeF)
In the portal
Open Krajowy System e-Faktur (KSeF) in the catalog
Sign in to your portal and open Krajowy System e-Faktur (KSeF). The status reads Available.
Authenticate
Under Quick setup, select Authenticate.
Confirm
The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.
With the CLI
catalog search prints the catalog item ID.
Add it to your AI client
metorial install adds your Krajowy System e-Faktur (KSeF) connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.
For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.
Make it read-only
Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 9 read-only tools, such as list_sessions and search_invoices, and lose the 2 destructive tools, such as close_session or submit_invoice.
Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.
Check it worked
metorial tools lists the 11 tools, minus any you rejected.
To see every input a tool takes, run metorial schema <integration-id> <tool-key>.
Tools
Read-only tools (9)
list_session_invoices: List submitted invoices in a KSeF session with their references, hashes, KSeF numbers, and processing results.download_invoice_upo: Download the official receipt for an accepted invoice in a KSeF session.get_session_status: Check an invoice submission session for its current processing status, invoice counts, and available session UPO pages.download_session_upo: Download a generated XML receipt page for an invoice submission session.list_sessions: List online invoice submission sessions.get_connection_status: Verify KSeF access and return the configured environment, authenticated context, and current effective context limits.get_invoice_status: Check a submitted invoice by its session and invoice references.search_invoices: Search KSeF invoice metadata by party role, date range, identifiers, amounts, and document type.download_invoice: Download the original XML invoice identified by its KSeF number.
Destructive tools (2)
close_session: Close an online invoice submission session by its reference number, including a session left open after a failed automatic close.submit_invoice: Submit one complete FA(3) XML invoice for processing in KSeF.
Next steps
- Claude Code, Cursor, Codex and ChatGPT: connect each client to your portal and use Krajowy System e-Faktur (KSeF) there
- Tool permissions: tool filters and what employees see
- Krajowy System e-Faktur (KSeF) on metorial.com: the integration overview