
Mcp
io.github.invoicepdfsv0.1.1更新于 Oct 9, 2026
Render invoices and credit notes as PDFs, and check them against EN 16931 e-invoicing rules.
概览
让助手通过 InvoicePDFs API 将发票和贷记单渲染为 PDF,并按 EN 16931 电子发票规则进行检查。
- 功能
- 把 InvoicePDFs API 封装为约三十个工具,包括 document_render、document_create、compliance_check、customer_list,以及用于文档生命周期的 document_transition。两个通用工具 find_operation 和 call_operation 可以搜索并执行该 API 的 161 个操作,因此整个 API 都可访问。渲染是异步的,会等待最终结果而不是返回排队状态。
- 适用场景
- 适合需要让助手生成发票或贷记单 PDF、按 EN 16931 电子发票规则校验文档,或在聊天客户端中管理 InvoicePDFs 客户和文档的场景。适用于已有 InvoicePDFs 账户、并希望在 Claude Desktop、Cursor 等 stdio MCP 客户端中使用该流程的用户。
- 运行要求
- 以 stdio 方式在本机运行,通常通过 npx @invoicepdfs/mcp 启动,因此需要 Node.js 以及访问 InvoicePDFs API 的网络。需要在 INVOICEPDFS_API_KEY 环境变量中提供 InvoicePDFs API 密钥;INVOICEPDFS_BASE_URL 可覆盖 API 主机,例如指向本地服务器。仅支持桌面端。
安装
README
InvoicePDFs MCP server
Gives an AI agent the InvoicePDFs API as tools: render a document, check it for e-invoicing compliance, manage customers, and reach the rest of the API on demand.
It is an ordinary HTTPS client of the public API. No database, no extra service
to deploy, nothing added to render.yaml. It runs on your machine.
Use it
Add to your MCP client's configuration — Claude Desktop, Cursor, or anything else that speaks MCP over stdio:
Create a key at https://invoicepdfs.com. INVOICEPDFS_BASE_URL overrides the
host if you are pointing at a local server.
An API key is not scoped. Any key you give this server can do anything your account can, including deleting data. That is a property of the key, not of this server — there is no narrower credential to hand it. Your MCP client will still ask before each tool call.
What it offers
Thirty tools. Twenty-seven name a common operation outright —
document_render, document_create, compliance_check, customer_list and so
on — document_transition covers the seven-state document lifecycle through one
to argument, and two reach everything else:
find_operation— search all 161 operations by what they do and get the full input schema of each match.call_operation— run one of them.
The whole API is reachable; only the common path is listed up front. Every client caps the tool list (Cursor around 40, Junie 100, Copilot 128), so a server advertising 161 tools would either break or crowd out every other server you have connected.
document_render renders asynchronously and waits for the result, so it returns
a finished render rather than a queued one. Rendering is CPU-bound and served by
a single worker, so prefer one render at a time over starting many in parallel.
How it is built
The tool surface is built from openapi.json at startup. src/operations.ts
reads the spec and derives each operation's name, input schema and description;
src/client.ts is one executor that can run any of them. Adding an endpoint to
the API adds a working tool with no code change here.
It is built at runtime rather than generated into a committed file on purpose. The first version of this emitted 16,000 lines of TypeScript that had to be regenerated and committed whenever the API changed — a second copy of the spec, with its own way of going stale. Parsing the spec costs about 10ms, once, in a process that starts once.
Only three things are written by hand:
Tool descriptions come from the API's handler docstrings, through the spec. They are not written here, because prose about an operation kept in two places drifts.
Develop
This repository is generated. The source lives in the InvoicePDFs API
monorepo under mcp/, and every commit here is a sync from there — so a change
made in this repository is overwritten by the next one. Open an issue instead
and it gets made where it survives.
The reason for the split is that the two things want different homes. The code
belongs next to the API it describes: tool descriptions are the API handlers'
own docstrings, and npm test fails when the manifest names an operation the
spec no longer has, which is a guard that only works if it runs in the pull
request that renames the handler. The package belongs in a public repository,
because npm build provenance requires one, and because a registry listing with
no readable source behind it is worth less.
So the drift guard runs upstream on every API change, and this repository publishes.
来源:README.md,提交 597f55d
工具
0版本历史
1- v0.1.1最新Oct 9, 2026

