
Recurring
io.github.theluckystrike由 GitHub 账号 theluckystrike 发布v0.22.6更新于 Oct 24, 2026
Recurring invoices on a schedule: define once, generate the due PDFs, forecast revenue.
概览
一个本地 MCP 服务器,用于保存周期性发票计划,按到期生成发票和 PDF,并预测收入。
- 可以做什么
- 创建、列出、查看、修改、暂停、恢复、跳过或删除周期性发票计划,包含客户、明细项、周期、日期和付款期限,并查看未来若干天内到期的项目及各币种合计,包括已到期但从未开票的期间。按指定日期生成已到期的发票,以期间为键保证幂等,支持试运行预览,每次最多 60 张,并报告已创建和已跳过的数量。按日历月和币种预测预期收入,暂停的计划单独列出。查看某个计划的审计历史,包括各期间、发票号、金额、付款状态和 PDF 路径。以资源形式读取未来 30 天的发生项,并运行先试运行、再生成、再列出即将到期项目、最后报告需催款对象的月度开票提示。
- 适用场景
- 当你按固定周期向同一客户收费(长期服务费、订阅、固定月费),希望在一次对话中定义好计划并按需生成到期发票,而不是每次重新录入时使用。也适合查看即将到期的项目和预测每月收入。
- 运行要求
- 作为本地 stdio 进程在用户机器上运行(仅限桌面端),需要 Node.js 18 或更高版本。npm 包尚未发布,需通过 .mcpb 安装包或克隆源码构建来安装。实际使用中需要配套的发票服务器(mcp-invoice)并共享同一数据目录,两者的 XDG_DATA_HOME 必须一致。Pro 许可证密钥(MCP_LICENSE_KEY 或 license_activate)可解锁不限数量的计划和更长的时间范围。
安装
在 SourceWeft 中
- 打开 控制台中的 Recurring,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
mcp-recurring
Say "bill Acme 12 hours at 90 EUR on the 1st of every month" once, and stop remembering it. This MCP server stores recurring invoice schedules, client, line items, cadence, start and end dates, and then, when you ask, creates the invoices that have actually fallen due as real records in the invoice server, with its number series, its clients and its A4 PDF. Generation is idempotent: one invoice per schedule per period, keyed by the occurrence date, so running the billing run twice on the same day creates nothing the second time. It also answers "what falls due in the next 30 days" and "what will I invoice per month for the next year". Everything is stored in plain JSON files on your own machine; nothing is uploaded anywhere.
In the official MCP Registry (io.github.theluckystrike/recurring-invoice-scheduler-subscription-billing-due-reminders).
Define a repeating invoice once, generate the due PDFs from chat, no billing SaaS required.
60-second install
npm publish for @theluckystrike/mcp-recurring is pending. Until then, the .mcpb one-click bundle or a clone+build
is the working path, both are verified below.
One-click (.mcpb): download recurring.mcpb from the latest release and double-click it in Claude Desktop:
https://github.com/theluckystrike/mcp-servers/releases/latest
(claude_desktop_config.json):
Claude Code:
(.cursor/mcp.json):
The npx form above starts working the moment the package is published. Until then, use the .mcpb bundle above, or
build from source with exactly these three commands:
Then point your client's command at node with one arg: the absolute path to servers/recurring/dist/index.js.
To run in Pro mode set MCP_LICENSE_KEY in the same config block, or call license_activate once with your key.
Pairs with
- mcp-invoice, required in practice, not by code. This server writes into the invoice
server's data directory and shares its number counter, its client list and its business profile, so every
generated invoice appears in
invoice_list, counts inoverdue_reportand can be re-rendered withinvoice_pdf. Set your issuer details once withbusiness_setthere; this server has nobusiness_setof its own on purpose, so there is only one profile to keep right. - mcp-time-tracker, for the hours that are not on a retainer. Track them, invoice them ad hoc, and leave the fixed monthly part to a schedule here.
- mcp-expense-tracker, rebillable costs that change every month belong on an ad hoc invoice; a schedule is for the amount that does not change.
Tools
Resource: recurring://upcoming returns the next 30 days of occurrences as JSON.
Prompt: monthly_billing_run, dry run, generate, list what is coming, then report who needs a payment reminder.
What you can say
Worked example
The second run is the point: the period, not the calendar day, is the key, so a repeated billing run is a no-op rather than a duplicate invoice sitting in a client's inbox.
Free vs Pro
Pro is a one-time $19, or $39 for every server in the collection, lifetime.
Dates: what happens at a month end
Every date is a local ISO calendar date, YYYY-MM-DD. An occurrence is the k-th step from start_date, and
occurrence 0 is start_date itself, so a schedule starting today is due today.
weekly= +7 days per step.{days: n}= +n days per step.monthly= +1 month,quarterly= +3 months,yearly= +12 months.- Month ends. The month step keeps the day of month of
start_dateand clamps it to the length of the target month; it never carries the clamp forward. From2026-01-31the series is 01-31, 02-28, 03-31, 04-30, 05-31, February does not silently turn a month-end retainer into a 28th-of-the-month retainer. - Feb 29. The same rule makes a yearly schedule starting
2028-02-29fall on 02-28 in common years and back on 02-29 in the next leap year. anchor_day/end_of_month(Pro).anchor_dayreplaces the day of month before clamping, soanchor_day: 31means the last day of every month;end_of_month: truedoes the same explicitly. Both are ignored forweeklyand{days: n}, which have no month to anchor to. An anchored first occurrence that would land beforestart_dateis dropped, never billed early.end_dateis inclusive. An occurrence landing exactly onend_dateis generated; the next one is not.- Long-lived schedules. Looking up what is due does not replay the schedule from
start_date: it jumps to an estimate near the date you asked about and scans forward from there, so a daily schedule created in 2010 still reports what is due in 2026 instead of exhausting its per-run occurrence cap walking there one day at a time.
Money
Amounts are held as integer minor units by the invoice engine, the same ISO 4217 table, the same
round-per-line-then-sum contract, so a schedule's amount and the invoice it produces can never disagree. Each
line's gross is rounded first, tax is computed and rounded per line and grouped into one line per rate, and
the totals are integer sums of those already-rounded values. A schedule bills in its own currency, or your
business default currency if it has none; nothing here converts between currencies.
How it stores data
Schedules and the generation log live in
${XDG_DATA_HOME:-~/.local/share}/mcp-servers/recurring/ as schedules.json and history.json. The
go into the invoice server's directory, ${XDG_DATA_HOME:-~/.local/share}/mcp-servers/invoice/,
with their PDFs under its pdf/ subfolder, the same files invoice_list, overdue_report and
invoice_pdf read there.
Every mutation runs under an advisory lock file. Anything that writes an invoice takes two locks, always
in the same order, recurring/.lock first, then invoice/.lock, so two billing runs (or a billing run
and a hand-written invoice in the other server) cannot interleave, cannot allocate the same invoice number
and cannot deadlock. Invoice numbers are allocated inside the lock; the PDFs are rendered after it is
released, so a slow render never holds up the counter. Saves go to a temporary file and are renamed into
place.
If schedules.json or history.json is unreadable or not valid JSON it is never treated as "empty": the
file is moved aside byte-for-byte as <name>.json.corrupt-<timestamp>, a <name>.json.corrupt marker is
written, and every tool fails loudly until you restore a good copy and delete the marker. This matters more
here than anywhere else in the collection: a history.json silently read as empty would re-bill every period
the schedule has ever covered.
Limits and honest caveats
- Nothing runs in the background. This is a stdio MCP server: it exists while your client runs it. No
daemon, no cron, no email. Invoices are created when you (or the
monthly_billing_runprompt) callinvoice_generate_due.auto_generateis a marker for that prompt, not a scheduler. - Nothing is sent to the client. The server produces the invoice record and the PDF; delivering it and
chasing payment is still yours to do.
overdue_reportin the invoice server tells you who to chase. - Free tier allows 3 active schedules. Pausing one frees a slot; the paused schedule's history is kept.
- Deleting a schedule keeps its history rows, deliberately: a re-created schedule with the same id cannot double-bill a period. Invoices already generated are never touched by anything here.
schedule_updatechanges future periods only. A period already invoiced keeps the amount that was billed; correct it in the invoice server instead.- No proration and no mid-period cancellation credit: a period is billed in full or not at all.
- No currency conversion; a schedule bills in one currency.
Troubleshooting
npxhangs or fails to find the package: npm publish for this package is pending. Use the.mcpbbundle or the clone-and-build path above until it lands.- Using the clone path: build
servers/invoicebeforeservers/recurring, the engine is imported from it.npm run build -w packages/mcp-license -w servers/invoice -w servers/recurringdoes that in order. - "No business profile yet": run
business_setin the invoice server (mcp-invoice), not here. Generation is never blocked by it; the PDF just carries the placeholder issuer "Your business". - The invoices are not in my invoice server: both servers must see the same
XDG_DATA_HOME. They write to.../mcp-servers/invoice/under it; if one client sets that variable and the other does not, you have two stores. - A period was skipped:
invoice_generate_dueonly skips a period already present inhistory.json.schedule_history(Pro) or the file itself shows exactly which invoice covered it. - Node version: requires Node >= 18. Check with
node -v.
Privacy
All data stays local: schedules, the generation log, invoices and PDFs are plain files under your own home directory. The server makes no network calls at all, and license keys are verified offline.
Built by theluckystrike. MIT. Support: [email protected]
One business profile for the whole suite
Your identity is stored once, at ${XDG_DATA_HOME:-~/.local/share}/mcp-servers/profile/business.json,
and every server in the suite reads it: the invoice issuer, the docx letterhead, the recurring
issuer, expense-tracker's default VAT rate, time-tracker's and timezone's home zone, and the
resume and contract letterheads. Set it once with business_set (invoice or docx) - you never
repeat it anywhere else. An email address is only ever taken from that profile or from an explicit
argument; when none is stored, documents show [add: email] and the tool says so rather than
letting anyone improvise an address.
Use these docs as an MCP server
Any MCP client (Claude, Cursor, Windsurf, VS Code) can read this repository's documentation directly via GitMCP - no install:
- Docs MCP URL: https://gitmcp.io/theluckystrike/mcp-recurring
来源:servers/recurring/README.md,提交 1bd9d69
工具
0版本历史
2- v0.22.6最新Oct 14, 2026
- v0.22.1Sep 18, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分