Servers Changes Log Check Watch Why How it works GitHub

io.github.cmendezs/mcp-ksef-pl

io.github.cmendezs/mcp-ksef-pl · pypi:mcp-ksef-pl

Dernier changement observé · 2026-11-12T09:15:08Z

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

Première observation
2026-10-11
Inchangé depuis
2026-11-12
Dernière observation
2026-12-01
Observations
13
Modifications enregistrées
1
Outils
56

Définitions d’outils lors de la dernière observation (56)

  • build_mls_message — Build a document-level MLS response and return it base64-encoded. For per-line responses, build the document directly with `mcp_einvoicing_core.peppol.mls.build_mls`.
  • check_allowance_reason_code — Check whether *code* is a recognized allowance reason code.
  • check_charge_reason_code — Check whether *code* is a recognized charge reason code.
  • check_country_code — Check whether *code* is a recognized ISO 3166-1 alpha-2 country code.
  • check_currency_code — Check whether *code* is a recognized ISO 4217 currency code.
  • check_document_name_code — Check whether *code* is a recognized UNCL1001 document name code.
  • check_document_type_id_in_codelist — Check whether a (scheme, value) pair is a recognized Peppol document type identifier. Requires EINVOICING_PEPPOL_CODELIST_DIR (see `list_participant_id_schemes`). Searches all entries regardless of state, so a historical (deprecated or removed) document type is still reported as found.
  • check_eas_code — Check whether *code* is a recognized Electronic Address Scheme code.
  • check_icd_code — Check whether *code* is a recognized ISO 6523 ICD code.
  • check_item_type_code — Check whether *code* is a recognized item type identification code.
  • check_mime_code — Check whether *code* is a recognized MIME type for embedded attachments.
  • check_participant_id_scheme_in_codelist — Check whether a 4-digit ISO 6523 ICD code (e.g. "0208") is a recognized Peppol scheme. Requires EINVOICING_PEPPOL_CODELIST_DIR (see `list_participant_id_schemes`).
  • check_payment_means_code — Check whether *code* is a recognized UNCL4461 payment means code.
  • check_process_id_in_codelist — Check whether a (scheme, value) pair is a recognized Peppol process identifier. Requires EINVOICING_PEPPOL_CODELIST_DIR (see `list_participant_id_schemes`).
  • check_reference_qualifier_code — Check whether *code* is a recognized UNCL1153 reference qualifier code.
  • check_vat_category_code — Check whether *code* is a recognized UNCL5305 VAT category code.
  • check_vatex_code — Check whether *code* is a recognized VATEX VAT exemption reason code.
  • 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 optio …
  • 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_en16931_codelist_version — Report the CEF EN 16931 code-list release version(s) currently configured locally.
  • get_ksef_invoice_status — Retrieve the processing status of a submitted KSeF invoice (API v2).
  • get_peppol_codelist_version — Report the OpenPeppol eDEC code list release version(s) currently configured locally.
  • list_allowance_reason_codes — List allowance reason codes from the CEF EN 16931 code list.
  • list_charge_reason_codes — List charge reason codes from the CEF EN 16931 code list.
  • list_country_codes — List ISO 3166-1 alpha-2 country codes from the CEF EN 16931 code list.
  • list_currency_codes — List ISO 4217 currency codes from the CEF EN 16931 code list.
  • list_document_name_codes — List UNCL1001 document name codes from the CEF EN 16931 code list.
  • list_document_type_ids — List Peppol document type identifiers from the OpenPeppol eDEC code list. Requires EINVOICING_PEPPOL_CODELIST_DIR (see `list_participant_id_schemes`).
  • list_eas_codes — List Electronic Address Scheme (EAS) codes from the CEF EN 16931 code list.
  • list_icd_codes — List ISO 6523 ICD codes from the CEF EN 16931 code list.
  • list_item_type_codes — List item type identification codes from the CEF EN 16931 code list.
  • list_mime_codes — List recognized MIME types for embedded attachments.
  • list_participant_id_schemes — List Peppol participant identifier (ICD) schemes from the OpenPeppol eDEC code list. Requires EINVOICING_PEPPOL_CODELIST_DIR to point at a local copy of the eDEC "Participant Identifier Schemes" GeneriCode export (not bundled with this package, no confirmed redistribution rights, see `mcp_einvoicing_core.peppol.codelists` module docstring).
  • list_payment_means_codes — List UNCL4461 payment means codes from the CEF EN 16931 code list.
  • list_process_ids — List Peppol process identifiers from the OpenPeppol eDEC code list. Requires EINVOICING_PEPPOL_CODELIST_DIR (see `list_participant_id_schemes`).
  • list_reference_qualifier_codes — List UNCL1153 reference qualifier codes from the CEF EN 16931 code list.
  • list_spis_use_case_ids — List Peppol SPIS use case identifiers from the OpenPeppol eDEC code list. Requires EINVOICING_PEPPOL_CODELIST_DIR (see `list_participant_id_schemes`).
  • list_vat_category_codes — List UNCL5305 VAT category codes from the CEF EN 16931 code list.
  • list_vatex_codes — List VATEX (VAT exemption reason) codes from the CEF EN 16931 code list.
  • 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.
  • peppol_directory_search — Search the Peppol Directory for registered participants. Public, unauthenticated search (no relation to SMP lookup). At least one of q/participant/name/country/doctype must be supplied.
  • peppol_get_service_endpoint — Fetch the AS4 endpoint for a Peppol participant's document type. Resolves the SMP hostname via DNS, then fetches service metadata for *document_type_id*. If the SMP returns a redirect, the result's `redirect_url` is set and `endpoint_url` is None; callers must not follow more than one redirect hop (SMP 1.4.0 §3.2).
  • peppol_lookup_participant — Check whether a business is registered on the Peppol network. Performs a DNS-over-HTTPS U-NAPTR lookup followed by an SMP service-group request to determine registration status and the list of supported document type identifiers.
  • peppol_send — Send a UBL/CII invoice to a Peppol participant via AS4. Looks up the recipient's AS4 endpoint (SMP), builds the ebMS3/AS4 envelope, and transmits it using the supplied signing credentials.
  • resolve_peppol_dns — Resolve the SMP hostname for a Peppol participant via DNS only. Performs the raw U-NAPTR (SML) lookup without fetching the SMP service group, useful for diagnosing whether a participant is registered in the SML independently of SMP reachability.
  • search_ksef_invoices — Query invoices stored in KSeF for a date range.
  • 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.
  • validate_eusr_report — Validate a Peppol End User Statistics Report (EUSR) document. Runs XSD structural validation, then Schematron business rules (requires the ``[xslt2]`` optional extra).
  • 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 Docume …
  • validate_mls_message — Validate a Peppol Message Level Status (MLS) document. Runs the bundled MLS Schematron rules (requires the ``[xslt2]`` optional extra). No bespoke MLS XSD exists — full UBL 2.1 XSD validation is out of scope.
  • 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. …
  • 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}.
  • validate_tsr_report — Validate a Peppol Transaction Statistics Report (TSR) document. Runs XSD structural validation, then Schematron business rules (requires the ``[xslt2]`` optional extra).

Consultez les observations signées, les ensembles d’outils antérieurs et leurs différences dans la fiche interactive ou via /api/v1/servers/d12a4fb8eb67fd87.

io.github.cmendezs

Transparency log · MCP tool definitions

Every MCP server's tools, on the record.

Your AI client trusts the tool descriptions an MCP server sends it — and a server can change them after you approved it. HISTOR keeps a public, signed record of what every remote MCP server in the official registry advertised, and tells you the day it changed.

Remote endpoints: it lists tools and never calls one. Registry packages: bounded canary calls run inside the isolated sandbox. It never says a server is safe — it tells you what was said, and when.

DRAG TO ORBIT
SIM
—

WebGL is unavailable here. The picture is the log itself: each label is a leaf, leaf hashes climb a Merkle tree, and a signed tree head seals the root.

—
Registry remote endpoints
last completed crawl
—
Targets with a pinned tool set
current
—
Changes
last 7 days
—
Labels in the log
all time
—
Last signed tree head
UTC

What HISTOR is for

Tool descriptions are instructions. They should not change behind your back.

The problem

A server can change what your model reads

When you connect an MCP server, its tool descriptions go straight to the model as instructions. A server can pass your review with harmless descriptions and change them next week — one added sentence is all a prompt injection needs, and most clients never ask you again.

What HISTOR does

It keeps the public record

Every six hours (every 30 minutes for a week once its tools have changed twice) HISTOR reads what each remote (streamable-HTTP) endpoint in the official MCP registry advertises, fingerprints it, signs what it saw and appends it to a log that can only grow. When a server's definitions change, the change gets a date and a diff.

What you get

A second pair of eyes you can check

Look up any server before you trust it. Paste what your client received and learn whether everyone else sees the same thing. Follow changes in a feed, or put a badge in your README. Every answer is signed, so you can verify it instead of believing it.

Who it is for

People who use MCP serversin Claude, Cursor or any client — check a server before you connect it, and again when it changes.
Agent builderswhose agents connect to servers on their own — call /check before trusting a tool set.
Registries and directoriesthat want more than stars and download counts — show when a listing's tools last changed.
Server authorswho want to show a stable, documented history — add the badge, and every change you ship is dated in public.

Four words used on this page

Tool definitions
The name, description and input schema of each tool a server offers — the text your model reads.
Pinned
HISTOR has recorded a fingerprint (digest) of the exact definitions it saw, so any later change is detectable.
Label
One signed statement about one observation: what was seen, what matched, whether it changed. Anyone can verify it offline.
Signed tree head
The log's signed summary after each crawl. Comparing two of them proves nothing was deleted or rewritten in between.

Read → digest → label → append → sign → compare

How the log works

Six steps, every one of them checkable by someone who does not trust HISTOR. The only thing you have to take on faith is that the observation happened when the label says it did — and the log makes it impossible to change that story afterwards.

01

Read

Remote endpoints in the official MCP registry: initialize, then tools/list, drained across every page; no tool is called, and private addresses are refused before the connection opens. npm and PyPI packages: installed and started in the sandbox described below, with no route out.

02

Digest

The tool set is reduced to name, description, input and output schema, sorted by UTF-16 code units and hashed over its RFC 8785 canonical form. Anyone holding the same tools gets the same digest — which is what makes a comparison possible.

03

Label

Four MTL/1 methods, one signed AWR/2 document each: what was observed, what the WARDEN pattern set matched, whether the definitions changed since the last label, and whether the name is on a threat list. No score, ever.

04

Append

Every label becomes a leaf of an RFC 9162 Merkle tree: leaf hash = SHA-256(0x00 ‖ JCS(label)). The label you download is the leaf input, so you can recompute its hash yourself.

05

Sign

After each crawl HISTOR signs a tree head: the size and the root. Keep yesterday's head; ask for a consistency proof to today's; if anything was removed or rewritten, the proof fails.

06

Compare

Each day a continuity label compares the new digest with the last one. Equal: "unchanged since". Different: a change, with the date and a per-tool diff. A client that checks what it received adds the view no crawler has.

Where an npm or PyPI package is run

Test conditions

A package observation is true for these conditions, and no others. Every package page names the exact image it ran in and any configuration it was given.

System

Linux x86_64, inside gVisor (runsc): the package talks to a kernel written for sandboxing, not to the host's. An unprivileged user, no capabilities, a read-only root.

Runtimes

npm packages in histor-node:22, PyPI packages in histor-python:3.12: the official node:22-bookworm-slim and python:3.12-slim images plus bash, git, Python 3 or Node 22 and a Java 21 runtime — never Docker — built when a sandbox host is installed. A package whose Requires-Python excludes 3.12 runs on histor-python:3.13 or 3.14; one that requires a newer Node runs again on histor-node:24. The exact image a package ran in is on its page.

Install

npm with --ignore-scripts, then the install scripts in a traced stage of their own. PyPI: wheels only — a package that ships only source is reported, never built.

Network

No route out. Every name the package looks up resolves to HISTOR's own traps, which record what was sent and forward nothing. A server that needs the internet to start shows that here.

Secrets

None are real. Decoy credentials sit in HOME and a decoy .env in the working directory. A variable the package says it needs gets a placeholder; where the placeholder was sent is recorded.

Limits

512 MB of memory, one CPU, 64 MB of /tmp. 360 s to install, 150 s to start and answer; up to 15 tools called once each with canary arguments, 8 s per call.

Configuration

Only names: required variables its registry entry declares or that it printed when it exited, and a start argument such as serve when its usage text offers one. Never a value from anyone else.

What a label does not say

The profile HISTOR implements forbids the words safe, secure, audited, certified, approved and trusted. Here is why, in the terms of what the log can and cannot show.

Not a safety rating

A pattern match is a reason to read a definition, not a finding. Three of the four methods can never return fail. There is no score to rank by, because no score HISTOR could compute would mean what a reader takes it to mean.

Not the code

Labels are about advertised text. A remote endpoint's source is never read and its tools are never invoked; a package runs only in the sandbox, against nothing real. A server can keep identical definitions and behave differently for real users; the log cannot see that, and says so inside every label.

A change is not an accusation

A version bump changes definitions too. A change is shown as a date and a diff, in amber, never red. What you do with it is yours: re-read, re-approve, or pin the old digest.

A package as run here, not on your machine

An npm or PyPI server is observed under the test conditions above: Linux, no internet, placeholder keys. One that needs Windows, a real account or the network may show fewer tools or none; its page says why it exited.

One operator, one key

Today one party runs the log. A second observer on another network is the next step, and any AIMarket hub can run one. Until then, what the key proves is who said it — not that it is true.

Behind a login, unseen

Endpoints that require authentication answer 401 to everyone without a key, including HISTOR. They are counted and listed as not observed, never dropped from the numbers.

Other logs, the same servers

Outside checks

HISTOR is not the only public record of MCP tool definitions. Where another log publishes its reads, the two are compared on the same servers and days, and the result is published both ways, with HISTOR's own misses.

ScraperWatch

A daily diff of a fixed panel of about 3,000 remote endpoints. HISTOR compares each of their published days with its own reads, and ScraperWatch shows the result on its page under "Outside check". The first comparison found a robots.txt parsing limit on their side and a handshake regression on HISTOR's; both were fixed the same day.

scraperwatch.com/mcp-changes
/datasets/peers/scraperwatch/latest

heldfast

An open daily record of the tool definitions of the servers in the official MCP registry. Of the 23,190 servers both logs recorded on 26 October 2026, 21,215 had every field in both; on those, 97.9% of servers and 99.1% of tools were identical byte for byte, and each difference has a stated cause: package versions, read times, failed reads, a first page only, an older protocol.

github.com/rufat325/heldfast
/datasets/interop-digests-2026-10-31

For clients, registries and server authors

Use it

Before your agent trusts a server, send the tools it received. The answer is signed by the log's did:key and names the tree head it was given under.

curl -sS https://histor.modelmarket.dev/api/v1/check \
  -H 'Content-Type: application/json' \
  -d '{"endpoint":"https://example.com/mcp","tools":[ …tools/list result… ],"contribute":true}'
# -> {"type":"histor.check/v1","match":"same"|"different"|"previously-observed"|"same-other-revision"|…,
#     "observed":{"unchangedSince":"…","changes":0}, "patternScan":{…}, "signature":{…}}

# Only looking a server up: a GET with its endpoint (writes nothing)
curl -sS "https://histor.modelmarket.dev/api/v1/check?endpoint=https://example.com/mcp"

# README badge for your server
[![MCP tool defs](https://histor.modelmarket.dev/badge/<id>.svg)](https://histor.modelmarket.dev/s/<id>)

# Atom feed of every observed change
https://histor.modelmarket.dev/feed.xml
WARDENchecks definitions at connect
HISTORremembers what was advertised
THEMISadmits at publish
Hublists histor.check@v1
AWRthe signed format

Questions

Is this a marketplace listing?

No. The server list is the log's index: every remote endpoint in the official MCP registry, with what HISTOR could observe about it. Nothing here is for sale and nothing is ranked by quality.

Does HISTOR tell me a server is safe?

No, and it never will. It tells you what a server advertised, whether that changed, and which published patterns matched the text. Whether to trust the server is your decision — HISTOR makes sure you decide on the same facts as everyone else.

Why are so many servers "not observed"?

Most remote MCP endpoints require a login (they answer 401 to anyone without a key), some use the legacy SSE transport or need per-user values in the URL, and some are simply down. They stay on the list with the reason, so the numbers never hide them.

How do I check a server I already use?

Open the Check tab, paste the server's endpoint and the tools/list result your client received, and press Check. You get back, signed, whether HISTOR observed the same definitions — or different ones, or an older set.

What does HISTOR record when a tool definition changes?

HISTOR records tool names, descriptions and input schemas from tools/list, plus any output schemas the server returns. Each change compares the newly observed list with the previous list from the same server. A full diff shows tools added or removed, word-level edits to descriptions, and old and new schema values at the JSON paths that changed. If either observation has only names, the diff is limited to names. HISTOR tracks annotations such as readOnlyHint separately when it captures them.

Browse observed changes · Example diff (JSON) · Original question on DEV

How do I get a badge for my server?

Find your endpoint on the Servers tab, open it, and copy the Markdown snippet under the facts. The badge shows the date your definitions were pinned or last changed, and links to the full history.

Why should I trust HISTOR itself?

You do not have to. Every label and every tree head is signed with one published key; the Log tab proves in your browser that the log only grew; and the command-line auditor does the same from any machine. What remains is that one operator runs it today — a second, independent observer is the next step.

What does it cost?

Looking things up, the badges, the feed and /check are free. HISTOR also offers histor.check@v1 to the AIMarket Hub, so agents can reach it through the market.

I run an MCP server. What does HISTOR send it, and how do I opt out?

Every 6 hours, and every 30 minutes for a week once its tools have changed twice in a week. First it reads /robots.txt (RFC 9309, product token histor, about once a day per site): a path that file does not allow HISTOR is not read, and its page here says so. Otherwise server/discover and tools/list (MCP 2026-07-28), or, for a server without that, initialize, notifications/initialized and tools/list — never a tool call, never a redirect followed on the MCP path, at most two connections per host, from a User-Agent that starts with histor/. To keep HISTOR out, disallow your MCP path for User-agent: histor (or for all crawlers); to let HISTOR alone in, add User-agent: histor with an Allow line for that path. An issue on the histor repository with your endpoint or host also works: it is then listed as not observed (operator-opt-out), with the reason, rather than silently dropped. Labels already in the log stay: the log only grows.