# Shiftyasan Shift Scheduling

Wires the Shiftyasan shift solver into your agent, which then builds rosters from demand, availability and fairness rules. Useful when a schedule has to be produced by AI, not by hand.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: shiftyasan
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/shiftyasan/mcp-server
- Updated: 2026-08-13
- HTML: https://affpapa.org/en/nevibecode/mcp/shiftyasan-shift-scheduling

## What it does

Three tools land in the agent. `validate_shift_input` checks a `SolveRequest` payload against the public API schema without touching the solver. `solve_shift` runs it: small and medium problems answer right away, while large ones (around 25 employees and up) get queued and come back as `202` with a `job_id`. `get_solve_job` polls that job until it reaches `completed` or `failed`.

The `plan_shift` prompt makes the agent interview you for the period and context instead of inventing inputs. Claude exposes it as `/mcp__shiftyasan__plan_shift`. It also tells the agent to print the finished roster one row per person with totals on the right, since that is how a shift manager scans a schedule.

Some schema fields get accepted and then dropped in translation: `avoided_shift` preferences, the upper bound in `working_days_per_week.max`, and the `require` rule in `employee_pairings`. Both tools print a warning naming what was dropped, so the agent will not claim those were honored. Running locally needs Node.js 20 or newer plus an `sk_live_...` key from the dashboard. The remote server at `https://api.shiftyasan.com/mcp` is the recommended route: the key is issued during connection and Node.js is not involved.

## Requirements
- Needs: Node.js (commands run via npx)
- Remote server: `https://api.shiftyasan.com/mcp`
- Environment variables: `SHIFTYASAN_API_KEY`, `SHIFTYASAN_BASE_URL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

1. **Platform CLI: remote server**
```bash
claude mcp add --transport http mcp-server https://api.shiftyasan.com/mcp
```

2. **Platform CLI**
```bash
claude mcp add --env SHIFTYASAN_API_KEY=<SHIFTYASAN_API_KEY> --env SHIFTYASAN_BASE_URL=<SHIFTYASAN_BASE_URL> --transport stdio shiftyasan-shift-scheduling -- npx -y @shiftyasan/mcp-server
```
Replace <…> with your own values

### Codex

1. **Platform CLI: remote server**
```bash
codex mcp add shiftyasan-shift-scheduling --url https://api.shiftyasan.com/mcp
```

2. **Platform CLI**
```bash
codex mcp add shiftyasan-shift-scheduling --env SHIFTYASAN_API_KEY=<SHIFTYASAN_API_KEY> --env SHIFTYASAN_BASE_URL=<SHIFTYASAN_BASE_URL> -- npx -y @shiftyasan/mcp-server
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "shiftyasan-shift-scheduling": {
            "url": "https://api.shiftyasan.com/mcp"
        }
    }
}
```
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "shiftyasan-shift-scheduling": {
            "command": "npx",
            "args": [
                "-y",
                "@shiftyasan/mcp-server"
            ],
            "env": {
                "SHIFTYASAN_API_KEY": "<SHIFTYASAN_API_KEY>",
                "SHIFTYASAN_BASE_URL": "<SHIFTYASAN_BASE_URL>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "shiftyasan-shift-scheduling": {
            "type": "http",
            "url": "https://api.shiftyasan.com/mcp"
        }
    }
}
```
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "shiftyasan-shift-scheduling": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@shiftyasan/mcp-server"
            ],
            "env": {
                "SHIFTYASAN_API_KEY": "<SHIFTYASAN_API_KEY>",
                "SHIFTYASAN_BASE_URL": "<SHIFTYASAN_BASE_URL>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

1. **Platform CLI: remote server**
```bash
gemini mcp add -t http shiftyasan-shift-scheduling https://api.shiftyasan.com/mcp
```

2. **Platform CLI**
```bash
gemini mcp add -e SHIFTYASAN_API_KEY=<SHIFTYASAN_API_KEY> -e SHIFTYASAN_BASE_URL=<SHIFTYASAN_BASE_URL> shiftyasan-shift-scheduling npx -y @shiftyasan/mcp-server
```
Replace <…> with your own values

## When to use it
- build a shift roster for a period from staffing demand
- check schedule input before spending a solver call
- wait out a large problem by polling its `job_id`
- factor in employee availability and fairness rules
- get a roster as rows with per-person totals

## Example prompts
- Build next week's shift schedule from the demand and availability data
- Validate my `SolveRequest` before running the solver
- Print the finished roster one row per person with totals on the right

## Similar
- [socialclaw-social-media-scheduling-posting-and-analytics-for-ai-](https://affpapa.org/en/nevibecode/plugins/socialclaw-social-media-scheduling-posting-and-analytics-for-ai.md) — plugin · ★ 101
- [scheduling-and-queue](https://affpapa.org/en/nevibecode/skills/scheduling-and-queue.md) — skill · 619 installs
- [upload-post](https://affpapa.org/en/nevibecode/skills/upload-post.md) — skill · 503 installs
- [calendly](https://affpapa.org/en/nevibecode/skills/calendly.md) — skill · 394 installs
- [socialclaw](https://affpapa.org/en/nevibecode/skills/ndesv21-socialclaw.md) — skill · ★ 101
- [catalyst-job-scheduling](https://affpapa.org/en/nevibecode/skills/catalyst-job-scheduling.md) — skill · 506 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
