Shiftyasan Shift Scheduling

com.shiftyasan由 shiftyasan.com 发布官方发布者v0.3.0更新于 Nov 22, 2026

Generate optimized work shift schedules from staffing demand, availability and fairness rules.

已验证Streamable HTTP可网页运行效率与工作流数据与分析

概览

AI 生成的概览

Shiftyasan 通过约束优化引擎,根据人力需求、可用性和公平规则生成优化的员工排班表。

可以做什么
  • 按公开 API 架构校验排班请求,免费且无需 API 密钥,返回字段级错误与提示
  • 调用求解器生成排班表,大型问题会排队并返回任务 ID
  • 轮询异步求解任务,直到完成或失败
  • 获取缺员清单、无可行解诊断,以及被丢弃约束的警告
适用场景
当需要让助手为团队创建、修正或重新平衡排班表(如零售、餐饮、医疗排班),并以可读表格呈现结果、缺员和违规情况时使用。
运行要求
可使用推荐的远程端点(无需 Node.js,登录后自动签发密钥),或本地 npm 包(需 Node.js 20 或更高版本)。需要 Shiftyasan 账户,并通过 SHIFTYASAN_API_KEY 提供 API 密钥;可选 SHIFTYASAN_BASE_URL 覆盖 API 基础地址。需能访问 Shiftyasan API 的网络。
安装前请注意
SHIFTYASAN_API_KEY 是授予求解配额的 bearer 凭证,应像密码一样保管。solve_shift 会消耗计量单位(公开测试期有免费额度,之后计划推出付费方案),校验和任务轮询免费。排班周期上限为 31 天,且部分请求的约束会被求解器丢弃,结果未必满足所有偏好。

安装

在 SourceWeft 中

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

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

交给智能体安装

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

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

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

其他 MCP 客户端

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

{
  "mcpServers": {
    "shiftyasan-shift-scheduling": {
      "type": "http",
      "url": "https://api.shiftyasan.com/mcp"
    }
  }
}

README

@shiftyasan/mcp-server

[npm version] [License: MIT]

Model Context Protocol (MCP) server for the Shiftyasan public solver API. Lets AI agents (Claude Desktop, Cursor, Continue, etc.) call the shift-scheduling solver from any MCP-aware host.

Status: open beta — validate_shift_input, solve_shift, and get_solve_job (async polling for large problems). Usage queries (get_usage) coming next.


Most people no longer need this package

Shiftyasan now runs a remote MCP server, which is the recommended way to connect:

https://api.shiftyasan.com/mcp
Remote (recommended)This npm package
Node.jsnot needed20 or newer required
API keyissued automatically when you connectyou create and paste it yourself
Updatesserver-side, nothing to doyou update the package
Claude.ai (web) / ChatGPTworkscannot run a local process

Connecting from Claude.ai or ChatGPT opens a Shiftyasan sign-in page in your browser; approve it once and you are done. Revoke a connection any time from the dashboard under "Connected apps".

This package is still supported and existing setups keep working. Reach for it when you want the server to run locally — for example on a host that cannot reach the internet directly, or when you prefer to hold your own API key.

See the quickstart for the remote setup.


What is Shiftyasan?

Shiftyasan is a SaaS that auto-generates work shifts for businesses (retail, hospitality, healthcare, etc.) using a constraint-optimization engine. The same solver is exposed as a public HTTP API at https://api.shiftyasan.com/v1/public/*. This MCP server is a thin client wrapper that turns the API into discoverable tools for AI agents.

Developer documentation — quickstart, the full list of supported constraints, and pricing — lives at https://platform.shiftyasan.com (Japanese and English).

Tools

ToolDescriptionCharged?
validate_shift_inputValidate a SolveRequest payload against the public-API schema (no solver).No
solve_shiftRun the solver. Small/medium problems return synchronously; large problems (roughly 25+ employees) are queued and return 202 with a job_id.Yes
get_solve_jobPoll an asynchronous job until completed / failed.No

The full SolveRequest / SolveResponse schema lives in the OpenAPI spec at GET <base URL>/v1/public/openapi.json (base URL = SHIFTYASAN_BASE_URL, default https://api.shiftyasan.com).

Prompts

PromptWhat it does
plan_shiftWalks the agent through building a schedule: what to ask the user for, when to validate, and how to present the finished roster.

Both arguments (period, context) are optional, so it can be invoked bare. In Claude Code it shows up as /mcp__shiftyasan__plan_shift; other hosts surface prompts in their own UI.

Use it when you want the agent to interview you for the inputs rather than guessing them, or when a previous attempt produced a roster you could not check at a glance. The prompt tells the agent to render one row per person with the per-person totals on the right, which is what a shift manager reads first.

The server also sends workflow guidance in its initialize response (call validate_shift_input before solve_shift, poll get_solve_job on 202, how to read shortage markers and the infeasibility diagnosis). Hosts may add this to the model's system prompt; Claude Code does, Claude Desktop currently does not, which is why the same ordering rules also live in the tool descriptions.

Constraints the schema accepts but the solver does not apply yet

A few fields are accepted by the API and then dropped during translation, because the solver has no equivalent. validate_shift_input and solve_shift print an explicit warning listing exactly what was dropped, so an agent never reports them as honored.

FieldStatusWorkaround
employees[].preferences[].type: "avoided_shift"Not appliedRemove the shift from that employee's assignable_shift_ids (hard), or state a preferred_shift for the shift they should get instead
employees[].working_days_per_week.maxOnly min is usedUse working_days_per_month for an upper bound over the period
constraints.employee_pairings[].rule: "require"Not applied (only exclude works)Use fixed_assignments to place them on the same shift

Everything else in the schema is applied by the solver.

Install

Running locally requires Node.js 20 or newer. If you would rather not manage that, use the remote server instead.

Use directly via npx (no global install needed):

npx -y @shiftyasan/mcp-server

Also listed in the MCP Registry as com.shiftyasan/mcp-server.

Or install globally:

npm install -g @shiftyasan/mcp-server
shiftyasan-mcp-server

Setup

1. Get an API key

Issue an sk_live_... key in the self-service dashboard: https://platform.shiftyasan.com/dashboard/ (your existing Shiftyasan account works; sign-up is also available). If anything goes wrong, email [email protected] (Japanese or English).

Treat the token like a password: it grants access to your solver quota.

Beta note: you may receive a base URL different from the default — set it via SHIFTYASAN_BASE_URL (see below).

2. Configure your MCP host

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%/Claude/claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "shiftyasan": {
      "command": "npx",
      "args": ["-y", "@shiftyasan/mcp-server"],
      "env": {
        "SHIFTYASAN_API_KEY": "sk_live_..."
      }
    }
  }
}

Restart Claude Desktop. The shiftyasan server appears in the tools menu and exposes validate_shift_input, solve_shift, and get_solve_job.

Claude Code
claude mcp add shiftyasan -e SHIFTYASAN_API_KEY=sk_live_... -- npx -y @shiftyasan/mcp-server

(Add -e SHIFTYASAN_BASE_URL=... if you were given a beta base URL.)

Cursor / Continue / other MCP hosts

Add to your MCP server config in the same shape (command + args + env). Refer to your host's docs for the exact config file path.

Using from ChatGPT

ChatGPT cannot spawn local stdio MCP servers like this package, so use the HTTP API directly through a Custom GPT with Actions (the OpenAPI spec is designed to be Actions-compatible — fully inlined schemas, no external refs):

  1. ChatGPT → My GPTs → Create a GPT → Configure → Actions → Import from URL, and enter <base URL>/v1/public/openapi.json (base URL = the one you received with your API key; default https://api.shiftyasan.com).

  2. If you were given a beta base URL, also edit the imported schema's servers[0].url to <base URL>/v1/public.

  3. Authentication → API Key → Auth Type Bearer → paste your sk_live_... token.

  4. Suggested GPT instructions:

    You can build optimized work shift schedules with the Shiftyasan actions. Always call the validate action first (free), then solve. Large problems return 202 with a job_id — poll the job endpoint every ~15 seconds until the status is "completed" or "failed".

Notes: creating custom GPTs requires a paid ChatGPT plan, and the API key is stored inside the GPT — do not share that GPT publicly.

ChatGPT's MCP connectors only support hosted MCP endpoints (Streamable HTTP), not local stdio processes. A hosted MCP endpoint is on our roadmap; until then, use Actions as above.

Environment variables

VariableRequiredDescription
SHIFTYASAN_API_KEYyesBearer API key. Format: sk_(live|test)_<64 hex chars>.
SHIFTYASAN_BASE_URLnoOverride base URL (default https://api.shiftyasan.com). Useful for staging or self-host.

Example session

In Claude Desktop, after configuring:

You: Schedule 3 employees over the first week of June across morning and evening shifts. Use Shiftyasan.

Claude will discover the tools, call validate_shift_input to confirm the payload it constructed is acceptable, then call solve_shift to get the assignment. Errors from the API (RFC 7807) are surfaced inline so Claude can self-correct (e.g., "staffing_demand length must equal schedule_days").

Pricing

The open beta is free. Each API key comes with a free usage quota (solve_shift consumes units per call; validate_shift_input is always free). Check your remaining quota with GET /v1/public/usage using your key. When you run out, email [email protected] to get more.

Paid plans are planned after the beta. The MCP server itself never charges; all metering happens against your SHIFTYASAN_API_KEY on the API side.

Local development

git clone https://github.com/shiftyasan/mcp-server.git
cd mcp-server
npm install
npm run build
npm test

To run against a local gateway:

SHIFTYASAN_API_KEY=sk_test_... \
SHIFTYASAN_BASE_URL=http://localhost:8080 \
  npm run dev

Test interactively with the MCP inspector:

npx @modelcontextprotocol/inspector node dist/index.js

Reporting issues

License

MIT — see LICENSE.

来源:README.md,提交 df87288

工具

0
SourceWeft 尚未读取此服务器的工具。

版本历史

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

评分

已满足适用检查项的 85%

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

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分