Openworkdays

io.github.SolvoHQ由 GitHub 账号 SolvoHQ 发布v0.1.0更新于 Oct 24, 2026

Zero-signup business-day date-math API: add days, count days between dates, is-business-day.

已验证Streamable HTTP可网页运行效率与工作流开发者工具

概览

AI 生成的概览

远程、免注册的 MCP 服务器,提供一个工作日日期计算工具:加减工作日、统计两个日期之间的工作日数、判断某天是否为工作日。

可以做什么
  • 从起始日期加减工作日,负值表示向前推算
  • 统计两个日期之间的工作日数量,包含首尾两天
  • 判断指定日期是否为工作日,并给出周末、假日或无的原因
  • 三种模式均可自定义周末定义和调用方提供的假日列表
适用场景
适合需要确定性工作日计算的场景,例如截止日期、SLA 或合同日期、迭代与交付排期,避免模型自行猜测日历运算。也适合无法完成注册或保存 API 密钥的自动化代理。
运行要求
需要访问远程 Streamable HTTP 端点;无需账号、API 密钥、OAuth 或环境变量。需要能访问该托管服务的网络。服务为无状态,仅暴露一个工具。
安装前请注意
仅做纯 UTC 的日期运算,不含时刻、时区或夏令时。没有内置国家法定假日库,假日需由调用方自行提供。限流为按实例的尽力而为机制,可能返回 429。请求内容(包括传入的假日日期)会发送到第三方托管服务。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Openworkdays,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.SolvoHQ%2Fopenworkdays/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "openworkdays": {
      "type": "http",
      "url": "https://openworkdays.vercel.app/api/mcp"
    }
  }
}

README

OpenWorkdays

A zero-signup business-day / working-day date-arithmetic API. No account, no API key — one GET request.

Add or subtract working days, count business days between two dates, or test whether a date is a business day — with your own holiday list. Pure UTC date math, returned as JSON. Built so autonomous AI agents get a deterministic date endpoint — an agent has no human to do a signup, and LLMs are measurably unreliable at date arithmetic.

Live: https://openworkdays.vercel.app

Quick start

sh
curl "https://openworkdays.vercel.app/api/businessdays?start=2026-05-15&days=5"

Sample response:

json
{  "mode": "add",  "start": "2026-05-15",  "days": 5,  "result": "2026-05-22",  "resultWeekday": "fri",  "startIsBusinessDay": true,  "weekend": ["sat", "sun"],  "holidaysApplied": 0,  "engine": "date-utc-v0.1",  "computedAt": "2026-05-17T00:00:00.000Z"}

Any error returns JSON with an error key and an appropriate HTTP status (400 bad params, 429 rate limited, 405 wrong method).

The three modes

The endpoint is always GET /api/businessdays. The mode is inferred from the params you pass.

add — add/subtract working days

Params: start=YYYY-MM-DD, days=N (integer, +/- ok, |N| <= 10000), optional weekend=, optional holidays=.

sh
curl "https://openworkdays.vercel.app/api/businessdays?start=2026-05-15&days=5"

N=0 returns start unchanged (even if start is itself non-working).

diff — count business days between two dates

Params: start=YYYY-MM-DD, end=YYYY-MM-DD, optional weekend=, optional holidays=. Inclusive of both endpoints. Result is negative if end < start.

sh
curl "https://openworkdays.vercel.app/api/businessdays?start=2026-05-15&end=2026-06-15&holidays=2026-05-25"

is — is this date a business day?

Params: date=YYYY-MM-DD, optional weekend=, optional holidays=.

sh
curl "https://openworkdays.vercel.app/api/businessdays?date=2026-05-16"

Returns isBusinessDay plus a reason of "weekend", "holiday", or null.

Shared params

  • weekend (default sat,sun) — comma list. Tokens are case-insensitive from {sun,mon,tue,wed,thu,fri,sat}, or numeric 0-6 where 0=Sunday … 6=Saturday (matches JS getUTCDay()). Cannot mark all 7 days as weekend.
  • holidays — comma list of YYYY-MM-DD dates treated as non-working (max 1000). Strictly validated.

Errors

Errors are JSON with an error key:

  • 400 — bad/missing params (missing start, invalid days (must be integer), invalid weekend token, invalid holiday date, invalid date, specify a mode (includes a usage object), …)
  • 429 — rate limited (Retry-After header + retryAfterSec)
  • 405 — wrong HTTP method (only GET/OPTIONS allowed)

JavaScript

js
const base = "https://openworkdays.vercel.app";const r = await fetch(  base + "/api/businessdays?start=2026-05-15&days=5");const out = await r.json(); // { mode:"add", result:"2026-05-22", resultWeekday:"fri", ... }

Use as an MCP tool (AI agents / Claude / Cursor / LLM clients)

OpenWorkdays is also a remote MCP server, so an agent can call it as a tool with no signup, no API key, no OAuth.

  • Endpoint: https://openworkdays.vercel.app/api/mcp
  • Transport: Streamable HTTP, stateless (POST JSON-RPC 2.0, single application/json response — no sessions, no SSE)
  • Exposes exactly one tool: businessdays — the mode (add / diff / is) is inferred from which args you pass, returning the same JSON as the REST endpoint (also as structuredContent)

Drop this into any MCP client config (Claude Desktop, Cursor, or any client that speaks the Streamable HTTP transport):

json
{ "mcpServers": { "openworkdays": { "url": "https://openworkdays.vercel.app/api/mcp" } } }

Quick smoke test:

sh
curl -s -X POST https://openworkdays.vercel.app/api/mcp \  -H 'Content-Type: application/json' \  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"businessdays","arguments":{"start":"2026-05-15","days":5}}}'

Over MCP, an upstream error comes back as a tool result with isError: true.

Why

Every public business-day API gates behind an account or API key: workingdays.org is test-only / subscription; API Ninjas and Holiday API need keys; timeanddate is a $299 product; the RapidAPI business-day APIs need a RapidAPI key; Microsoft's "Calculate Working Day" connector is Power-Platform-framework-gated and UK-bank-holidays only. OpenWorkdays is a single anonymous GET — no signup, no key. That is especially useful to autonomous agents, which have no human in the loop to complete a signup. And because LLMs are measurably unreliable at date arithmetic, an agent needs a deterministic endpoint rather than guessing.

Limitations

  • Date-only, pure UTC arithmetic — no time-of-day, no DST, no timezones (that is recurrence-rule territory, intentionally out of scope for v0.1).
  • Caller-supplied holidays only — there is no built-in country holiday database. This is deliberate: we do not fake-compete on the 7000-holiday-DB axis where funded incumbents win. You pass the holidays= list you care about.
  • Best-effort per-instance IP rate limit — a soft abuse brake, not a guarantee (serverless instances are ephemeral and not shared).
  • MIT licensed and self-hostable — see below.

Self-host — it's zero-dependency files

The entire API is two single zero-dependency Node serverless functions: api/businessdays.js (REST) and api/mcp.js (remote MCP). No npm install, no deps at all. Deploy the folder to Vercel (zero-config /api detection) or drop the handlers into any Node serverless runtime.

sh
git clone https://github.com/SolvoHQ/openworkdayscd openworkdaysnpx vercel --prod

License

MIT — see LICENSE.

来源:README.md,提交 1ae5e04

工具

1

businessdays

Business-day date math. Three modes inferred from params: add (start+days -> the date N business days away, negative days = before), diff (start+end -> count of business days between, inclusive of both endpoints), is (date -> is it a business day). Optional weekend (default sat,sun) and holidays (comma list of YYYY-MM-DD you supply). No signup, no API key. Pure UTC date-only math; no time-of-day/DST/timezone.

输入参数enddatedaysstartweekendholidays

版本历史

1
  1. v0.1.0最新Sep 16, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分