← シフト屋さん Public API / MCP ガイド

Claude から接続する

Claude にシフト屋さんを接続すると、話しかけるだけでシフト表を作成・調整できます。 「9月の第1週、早番・遅番・夜勤で4人。夜勤明けは休みにして、夜勤は公平に」のように頼めます。

使っているものを選んでください。

Claude.ai(Web 版)

ご利用に必要なもの

  • Claude のアカウント(無料プランでも利用できます。ただし無料プランで追加できるカスタムコネクタは1つまで)
  • シフト屋さんのアカウント(新規登録も可能)

API キーの準備は要りません。接続時に自動で用意されます。

  1. Customize → Connectors を開く

    Claude の左サイドバーの「Customize」を開き、 設定画面の左メニュー Customize → Connectors を選びます。

    Team / Enterprise プランでは、管理者が Organization settings → Connectors で先に追加します。メンバーはその後 Customize → Connectors の「Connect」から接続します。

    Claude の左サイドバー。New / Chats and tasks / Projects / Artifacts / Scheduled の下に Customize がある。
    左サイドバーの Customize から入ります。
  2. カスタムコネクタを追加

    Connectors 画面右上の「Add」から 「Add custom connector」を選び、次の2つを入力して Add を押します。

    名前任意(例: Shiftyasan)。コネクタ一覧に表示されます
    URLhttps://api.shiftyasan.com/mcp

    「Advanced settings」の OAuth Client ID / Secret は空のままにしてください。 どちらも optional で、シフト屋さん側がクライアント登録を自動で行います。

    Add custom connector ダイアログ。名前に Shiftyasan、URL に https://api.shiftyasan.com/mcp、Advanced settings の OAuth Client ID と Secret は空欄。右下に Add ボタン。
    OAuth Client ID / Secret は空のまま Add を押します。
  3. シフト屋さんにログイン

    ブラウザでログイン画面が開きます。メールアドレスとパスワード、 または Google アカウントでログインしてください。

    シフト屋さんのログイン画面。Google でログインのボタンが上、その下に「または」でメールアドレスとパスワードの入力欄。
    api.shiftyasan.com のログイン画面(英語表示の例)。Google が主経路です。日本語のブラウザでは日本語で表示されます。
  4. 接続を許可する

    許可の画面に、ログイン中のメールアドレスと 接続の許可情報の送り先が表示されます。 どちらも意図したものか確認して「許可する」を押してください。

    ⚠️ 身に覚えのない送り先が出ている場合は、許可せずに閉じてください。

    接続の許可画面。ログイン中のメールアドレス、接続を求めているアプリ名 Claude、許可情報の送り先 claude.ai が表示されている。
    許可画面(英語表示の例)。ログイン中のアカウントと、許可情報の送り先を必ず確認してください。
  5. 使ってみる

    接続が完了したら、チャットでそのまま頼めます。

    いま使っているシフト表から始める

    現在のシフト表をスクリーンショットや写真で添付して、こう頼むのが一番早いです。 シフトの種類・人数・誰がどのシフトに入れるかを、こちらで打ち込み直す必要がありません。

    このシフト表から設定を読み取って、来月のシフトを作成して。
    夜勤明けは必ず休みにして、夜勤の回数はできるだけ公平にして。

    作成の前に、読み取った内容を一度確認してください。 「読み取った設定を一覧で見せて」と頼むと、シフトの種類・必要人数・ 誰がどのシフトに入れるかを表で出してくれます。ここが違っていると、 できあがるシフトも違います。

    個人情報についてのご注意
    • 画像を読むのは Claude 側です。シフト屋さんに画像は送られません。 取り扱いは、お使いの AI サービスの規約によります。
    • 氏名が無くてもシフトは作れます。「名前はイニシャルに置き換えて」と 添えれば、A・B・C のままで同じ結果になります(氏名はシフト作成に必須の項目ではありません)。
    • 電話番号・住所・給与・マイナンバーなど、シフト作成に不要な情報が写っている場合は、 その部分を隠してから添付してください。

    ゼロから頼む

    手元にシフト表が無いときは、条件を書くだけでも作れます。

    9月1日から7日まで、早番・遅番・夜勤の3種類で
    4人のシフトを組んで。夜勤明けは必ず休みにして、
    夜勤の回数はできるだけ公平にして。

    足せる条件

    次のようなことも、同じように言葉で足せます。

    • 希望休(「田中さんは9/3休み希望」)
    • 1か月の勤務日数の上限・下限、週の勤務日数
    • 1人あたりの夜勤の回数の上限
    • 同じシフトに入れたくない組み合わせ
    • 新人は必ず先輩と一緒のシフトにする
    • 定休日(誰も出勤しない日)

Claude Desktop

まず上の Claude.ai(Web 版)の手順を試してください。 Customize → Connectors で追加したカスタムコネクタは、同じアカウントの Claude Desktop でもそのまま使えます(Claude のヘルプ)。 API キーも Node.js も要りません。

以下は、その方法が使えない場合の代替です。mcp-remote という中継を挟みます。 この方式だけは、お使いの PC に Node.js 20 以上が必要です。

API キーも必要なので、先に ダッシュボードで発行してください。 設定ファイル(claude_desktop_config.json)に次を追記します。

{
  "mcpServers": {
    "shiftyasan": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.shiftyasan.com/mcp",
               "--header", "Authorization: Bearer sk_live_..."]
    }
  }
}

追記したら Claude Desktop を再起動してください。

Claude Code

コマンド1つで追加できます。API キーが必要なので、先に ダッシュボードで発行してください。

claude mcp add --transport http shiftyasan https://api.shiftyasan.com/mcp \
  --header "Authorization: Bearer sk_live_..."

うまくいかないとき

設定に「コネクタ」が見当たらない(Claude.ai)

場所は Settings ではなく Customize → Connectors です。 カスタムコネクタは無料プランでも使えます(追加できるのは1つまで)。 Team / Enterprise では管理者が Organization settings → Connectors で追加する必要があります。 手順や対応プランは Claude 側で変わることがあるので、見当たらない場合は Claude のヘルプで最新をご確認ください。

URL を入れるとエラーになる

末尾のスラッシュや余分な空白が入っていないか確認してください。正しくは https://api.shiftyasan.com/mcp です。

接続はできたのに、シフトを作ってくれない

「シフト屋さんを使って」と明示すると呼び出されやすくなります。 必要な情報(期間・シフトの種類・人数・誰がどのシフトに入れるか)が足りないと エージェントが質問を返すので、埋めていけば作成に進みます。

以前 npm パッケージで設定していた

@shiftyasan/mcp-server の設定はそのまま動きます。 切り替えは必須ではありません。ただしリモート接続なら Node.js が不要で、 更新もこちら側で行われます。

接続を解除するには

ダッシュボードの 「接続しているアプリ」から、いつでも個別に解除できます。 Claude Desktop / Claude Code で使っている API キーは、同じ画面の「発行済みのキー」から無効化します。

← Shiftyasan Public API / MCP guide

Connect from Claude

Once connected, you can build and adjust schedules by asking — for example "Schedule 4 people across early, late and night shifts for the first week of September. Give a day off after each night shift, and share night shifts fairly."

Pick the one you use.

Claude.ai (web)

What you need

  • A Claude account — the free plan works too (free accounts can add one custom connector)
  • A Shiftyasan account (sign-up available)

No API key needed — one is provisioned when you connect.

  1. Open Customize → Connectors

    Open Customize in Claude's left sidebar, then pick Customize → Connectors in the settings menu.

    On Team and Enterprise plans an owner adds it first under Organization settings → Connectors; members then press "Connect" under Customize → Connectors.

    The Claude sidebar showing New, Chats and tasks, Projects, Artifacts, Scheduled and Customize.
    Start from Customize in the sidebar.
  2. Add a custom connector

    Press Add at the top right of the Connectors screen, choose Add custom connector, fill in these two fields and press Add.

    NameAnything you like (for example Shiftyasan) — shown in the connectors list
    URLhttps://api.shiftyasan.com/mcp

    Leave OAuth Client ID and Secret under "Advanced settings" empty. Both are optional; Shiftyasan registers the client for you.

    The Add custom connector dialog: name Shiftyasan, URL https://api.shiftyasan.com/mcp, and the OAuth Client ID and Secret fields under Advanced settings left empty, with the Add button at the bottom right.
    Leave OAuth Client ID and Secret empty, then press Add.
  3. Sign in to Shiftyasan

    A sign-in page opens in your browser. Use your email and password, or Google.

    The Shiftyasan sign-in screen: Continue with Google on top, then an email and password form below a divider.
    The sign-in screen on api.shiftyasan.com. Google is the main route.
  4. Approve the connection

    The approval screen shows which account you are signing in as and where the authorization will be sent. Check both, then approve.

    ⚠️ If the destination is unfamiliar, close the page without approving.

    The approval screen showing the signed-in email, the requesting app Claude, and where the authorization will be sent: claude.ai.
    Check both the account you are signed in as and where the authorization goes.
  5. Try it

    Once connected, just ask in the chat.

    Start from the schedule you already use

    Attach a screenshot or a photo of your current schedule and ask for the next one. This is the fastest route: you do not have to retype the shift types, the headcounts, or who can work what.

    Read the settings from this schedule and build next month's schedule.
    Always give a day off after a night shift, and share night
    shifts as evenly as possible.

    Check what was read before it builds anything. Ask “show me the settings you read as a table” and you will get the shift types, the required headcounts and who can work which shift. If that is wrong, so is the schedule.

    About personal data
    • The image is read by Claude. It is not sent to Shiftyasan. Its handling is governed by the terms of the AI service you are using.
    • Names are not needed to build a schedule. Add “replace the names with initials” and you get the same result with A, B and C (a name is not a required field).
    • If the sheet also shows phone numbers, addresses, pay or national ID numbers — anything a schedule does not need — cover those parts before attaching it.

    Start from nothing

    No schedule to hand? Describing the conditions is enough.

    Schedule 4 people from September 1st to 7th across early,
    late and night shifts. Always give a day off after a night
    shift, and share night shifts as evenly as possible.

    Conditions you can add

    All of these can be added in plain words too.

    • Requested days off (“Tanaka wants 3 September off”)
    • Minimum and maximum working days per month, and per week
    • A cap on night shifts per person
    • People who should not be on the same shift
    • Newcomers always rostered alongside a senior
    • Business holidays (days nobody works)

Claude Desktop

Try the Claude.ai (web) steps above first. A custom connector added under Customize → Connectors is available in Claude Desktop on the same account (Claude help centre). That route needs neither an API key nor Node.js.

The rest of this section is the fallback for when that is not available: bridge with mcp-remote. This route is the one that needs Node.js 20+ on your machine.

It also needs an API key — issue one in the dashboard first, then add this to claude_desktop_config.json.

{
  "mcpServers": {
    "shiftyasan": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.shiftyasan.com/mcp",
               "--header", "Authorization: Bearer sk_live_..."]
    }
  }
}

Restart Claude Desktop afterwards.

Claude Code

One command. This path needs an API key, so issue one in the dashboard first.

claude mcp add --transport http shiftyasan https://api.shiftyasan.com/mcp \
  --header "Authorization: Bearer sk_live_..."

Troubleshooting

I cannot find Connectors in Settings (Claude.ai)

Custom connectors are a paid-plan feature and do not appear on free plans. You can still connect from Claude Desktop or Claude Code using an API key.

The URL is rejected

Check for a trailing slash or stray whitespace. It is exactly https://api.shiftyasan.com/mcp.

It connects, but never builds a schedule

Saying "use Shiftyasan" makes the tool call more likely. If required details are missing (dates, shift types, headcount, who can work which shift) the agent will ask — answer and it will proceed.

I set this up with the npm package before

Your @shiftyasan/mcp-server setup keeps working. Switching is optional. The remote connection needs no Node.js, and updates happen on our side.

Revoking a connection

Revoke any connected app from the dashboard under "Connected apps". API keys used by Claude Desktop / Claude Code are disabled from "Your API keys" on the same page.