ksef-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ksef-mcpsprawdź informacje diagnostyczne serwera ksef"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ksef-mcp
Lokalny serwer MCP do KSeF (Krajowy System e-Faktur), zbudowany przez Dev10x.Guru.
Uruchamiany na własnej maszynie przez uvx — dane faktur nie przechodzą przez żadną
usługę pośredniczącą.
Stan projektu
Wczesny etap. Obecnie repozytorium zawiera wyłącznie szkielet pakietu i jedno narzędzie
diagnostyczne (server_info). Narzędzia do wyszukiwania i pobierania faktur nie są
jeszcze zaimplementowane — model domenowy jest w trakcie ustalania.
Related MCP server: mcp-facturacion-electronica-es
Wymagania
Python 3.13.14 — pin dokładny, nie dolna granica (
.python-versionorazrequires-pythonwpyproject.toml).uvpobierze ten interpreter sam, więc nie trzeba instalować go ręcznie.Zasada obowiązuje w całym projekcie: przypinamy konkretne wersje, nigdy zakresy — także zależności. Rozjazd interpretera pociąga rozjazd rozwiązanych wersji bibliotek, a
uvxi tak rozwiązuje wersję za nas.
Instalacja i uruchomienie
Serwer komunikuje się przez stdio i jest uruchamiany przez klienta MCP, nie ręcznie.
Konfiguracja w kliencie MCP (.mcp.json, claude_desktop_config.json):
{
"mcpServers": {
"ksef": {
"command": "uvx",
"args": ["ksef-mcp"]
}
}
}Aby uruchomić wersję z lokalnego katalogu roboczego zamiast z PyPI:
{
"mcpServers": {
"ksef": {
"command": "uvx",
"args": ["--from", "/ścieżka/do/ksef-mcp", "ksef-mcp"]
}
}
}Rozwój
make help wypisuje wszystkie dostępne komendy.
make install # uv sync --group dev
make test # uv run pytest z pokryciem
make lint # pre-commit na całym drzewie
make upgrade-requirements # uv lock --upgrade
make build-requirements # eksport do requirements/*.txtLinting i formatowanie idą wyłącznie przez pre-commit — to ta sama ścieżka, która blokuje commit, więc lokalny przebieg nie rozjeżdża się z hookiem.
Pokrycie testami jest egzekwowane na poziomie 100% (fail_under w pyproject.toml),
więc lokalny przebieg i CI stosują identyczny próg.
Bezpieczeństwo danych
Token KSeF nie powinien trafiać do pliku konfiguracyjnego klienta MCP — te pliki są zwykłym tekstem na dysku. Docelowo serwer będzie czytał poświadczenia z keyringu systemowego.
Licencja
AGPL-3.0-only. Pełny tekst w pliku LICENSE.
Available Tools
1 toolserver_infoA
Report the name and version of the running KSeF connector.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| name | Yes | |
| version | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are supplied, so the description carries the full disclosure burden; it does indicate the tool is a read-only reporting operation that returns name and version. It does not state whether any authentication or connector state is required, nor does it warn about failure modes. Adequate but thin for an unannotated tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler or repetition. Every word contributes to identifying the tool's output.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no parameters, no annotations, and an output schema that already documents the return shape, the description only needs to identify the operation. It does so clearly; extra detail such as auth or connector-state prerequisites would make it fully complete but is not strictly required here.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so there are no parameter semantics to document; the baseline for a parameterless tool applies. The input schema is a bare empty object, consistent with the description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description gives a specific verb ('Report') and a precisely scoped resource ('the name and version of the running KSeF connector'). There are no sibling tools to disambiguate against, and the statement leaves no ambiguity about what the call returns.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use guidance is given, and no alternatives are named (none exist among the siblings). For a zero-argument informational tool the intended use is strongly implied, but nothing is stated outright.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.1.0- First observed
server_info
TDQS
Scored across 1 tool
With only a single tool there is no possibility of overlap or misselection; server_info has one clear purpose.
The lone tool uses a clean snake_case noun-style name, so no convention conflicts exist within the set.
A KSeF (Polish e-invoicing) connector exposing only a version-reporting tool is far too thin; one trivial tool cannot represent the domain's scope.
There are no tools for the core invoicing lifecycle (submitting, fetching, or querying invoices/sessions), leaving the surface severely incomplete for what a KSeF connector implies.
Maintenance
Related MCP Connectors
MCP server for progressive tool usage at any scale (see https://klavis.ai)
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseAqualityBmaintenanceModel Context Protocol (MCP) server for Polish Electronic Invoicing (KSeF / FA(2)). Provides tools to validate, generate, and explore API specifications for KSeF interoperability.103Apache 2.0
- AlicenseAqualityAmaintenanceModel Context Protocol (MCP) server for Spanish Electronic Invoicing. Provides tools to generate, validate, and submit invoices across VERI\*FACTU, Facturae/FACe, SII, TicketBAI, and Crea y Crece B2B.202Apache 2.0
- FlicenseBqualityCmaintenanceSingle-tenant MCP server for Polish KSeF e-invoice workflows, supporting local stdio testing, draft management, and invoice submission with safety gates.23-
- AlicenseAqualityCmaintenanceMCP server that provides AI agents with Polish business data tools: identifier validation (NIP, PESEL, REGON, KRS, IBAN), VAT whitelist checks, EU VIES lookups, and NBP exchange rates.58 npmMIT