Browse the docs ▾

Connect an AI agent over MCP

Point an MCP client at Staffedly with an API key so an agent can read your schedule and propose changes that a person approves.

Updated 2026-11-30View as Markdown

Staffedly runs an MCP (Model Context Protocol) server. An AI agent that speaks MCP can use it to answer questions from your live data and to propose changes. A proposal never takes effect by itself: a person approves or declines it in Staffedly.

#What you need

  • A Pro, Agency, Enterprise or trial organization. Core does not include the MCP server.
  • An API key from Settings → API, with the permissions the agent should have. See API keys and permissions.
  • An MCP client that can send a custom Authorization header to a remote server.

Sign-in is by API key only. The server does not offer OAuth yet. Chat apps that can only connect to an MCP server through an OAuth sign-in cannot connect today. The server has been verified with the official MCP client library (@modelcontextprotocol/sdk); it has not yet been verified inside individual agent products.

#Connection details

SettingValue
Addresshttps://app.staffedly.com/api/mcp
TransportStreamable HTTP, stateless. POST only; GET and DELETE answer 405
Sign-inHeader Authorization: Bearer sfk_…
Protocol versions2025-06-18, 2025-03-26, 2024-11-05
BatchesUp to 20 JSON-RPC messages in one request
OffersTools only. Resources and prompts are empty lists

The same rules apply as for the REST API: the 120 requests a minute limit, key expiry and revocation, and the plan check.

#Connect with the official client library

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const transport = new StreamableHTTPClientTransport(new URL("https://app.staffedly.com/api/mcp"), {
  requestInit: { headers: { Authorization: `Bearer ${process.env.STAFFEDLY_API_KEY}` } },
});
const client = new Client({ name: "my-agent", version: "1.0.0" });
await client.connect(transport);

const { tools } = await client.listTools();
const answer = await client.callTool({ name: "open_gaps", arguments: {} });
console.log(answer.content[0].text);

#Clients set up with a JSON file

Some agent tools read their MCP servers from a JSON file. For a tool that supports a remote HTTP server with custom headers, the entry looks like this. The same snippet is shown in the app under Settings → API, Connect an AI agent.

{
  "mcpServers": {
    "staffedly": {
      "type": "http",
      "url": "https://app.staffedly.com/api/mcp",
      "headers": { "Authorization": "Bearer sfk_your_key" }
    }
  }
}

The exact file and field names depend on the tool; check its own documentation. Make a separate key for each agent, with only the areas it needs, so you can see what each one did and revoke one without touching the others.

#Try it with curl

curl -X POST "https://app.staffedly.com/api/mcp" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"open_gaps","arguments":{}}}'
{ "jsonrpc": "2.0", "id": 1, "result": { "content": [{ "type": "text", "text": "Summit Surgical Center · Nov 27, 06:00 EST · CRNA · normal · open · 0 offer(s)" }], "isError": false } }

#The tools

tools/list shows a key only the tools its permissions cover. People and sites are given by name, not by id. Dates are YYYY-MM-DD.

#Tools that read

ToolAnswersPermission the key needs
coverage_todayToday's coverage by site, with required against scheduledschedule:read
who_is_workingWho is working on a date, optionally at one siteschedule:read
who_is_offActive people not working on a dateschedule:read
open_gapsOpen shifts: site, time, role, severity, status, offers so farschedule:read
open_issuesOpen issues with their response clocksschedule:read
call_equityThe call equity ledger for each personschedule:read
swap_boardOpen swaps: who offered, which shift, claims so farschedule:read
rules_currentThe active scheduling rules and their settingsschedule:read
upcoming_leaveApproved and requested time off in the coming daysleave:read
documents_statusWhat is out for signature, and who is missing a required document. Never file contentsdocuments:read
recruiting_statusOpen jobs with the number of applicants in each stage, where shifts keep going unfilled, and how many new hires are onboarding. No applicant is namedrecruiting:read
onboarding_statusEveryone with an open onboarding checklist: steps done, what each person still owes, what is waiting on the office, and whether the link was sent and opened. Optionally one person by name. Never bank details, addresses or filesonboarding:read
hours_reportHours logged this month by persontime:read
anomaliesClock records that look wrong, such as a missing clock-outtime:read
provider_lookupA person by name: role, status, credentials (never license numbers), upcoming shiftsroster:read and credentials:read
payroll_previewWhat a pay run for a period would contain, from approved hours and the pay rules: hours, gross pay, each person's gross, hours with no pay rate, and how many entries are still waiting for approval. Changes nothingpay:read
pay_runsRecent pay runs: period, status, hours and grosspay:read
invoice_previewWhat an invoice to one site for a period would bill: hours, each line and the total. Changes nothingpay:read
invoice_statusUnpaid and overdue invoices with number, site, total, balance and due date, plus drafts not sent yet. Optionally one sitepay:read
video_callsUpcoming video calls, or past calls and uploaded call notes with whether notes are ready; optionally about one applicant, provider or site. Needs video calls on your planmeetings:read
last_call_notesWhat was said on the latest call (or uploaded call notes) about a person or site, or with a guest of that name: the AI summary, key points and follow-ups as written. Never the transcript, and never a rating of anyonemeetings:read
booking_pagesYour booking pages: length, who each is for, hosts and whether they have hours set, on or off, linkmeetings:read
forms_listForms and surveys with status and number of answersforms:read
form_answers_summaryOne form's answers summed up: counts for choices and yes/no, average and spread for ratings, how many were marked worth a look. Figures for the form, not a verdict on anyone; written answers are not repeatedforms:read
open_incidentsIncident reports whose issue is still open: when, the issue's title, severityforms:read
ask_handbookAn answer from your published handbook pages, with the pages it came from, or "not in the handbook"handbook:read
handbook_unconfirmedWho has not yet confirmed a must-read handbook pagehandbook:read
facility_contactsA site's contacts: name, title, email, phone, and whether they get the daily roster or the site's emailsrelationships:read
record_conversationThe recent email conversation on a site's or provider's record. Not applicantsrelationships:read
offer_statusJob offers and where each stands, for one applicant or alloffers:read
run_reportA summary report: fills (needs schedule:read), hours (time:read), credentials (credentials:read)One of those, by report

#Tools that propose a change

Each of these creates a proposal in Approvals. Nothing changes until a person approves it.

ToolProposesPermission the key needs
create_open_shiftPosting an open shift at a siteschedule:write
register_call_offRecording a call-out, which releases the person's shifts and starts the fillschedule:write
draft_offersSending ranked offers for an existing open shiftschedule:write
set_leaveRecording time off for a personleave:write
send_for_signatureSending a document template for signaturedocuments:write
start_onboardingStarting a new hire's onboarding: they join the roster as onboarding and are emailed their checklist. Name and email are requiredonboarding:write
open_jobOpening a job on the careers page. A pay range is requiredrecruiting:write
invite_past_applicantsEmailing past applicants for the same role an invitation to apply for an open jobrecruiting:write
create_providerAdding a personroster:write
add_credentialAdding a credential to a personcredentials:write
assign_providerPutting a person on a shift at a siteschedule:publish
release_assignmentReleasing a person's shift on a dateschedule:publish
schedule_video_callScheduling a video call; on approval each guest is emailed their join link and the recording noticemeetings:write
send_booking_linkEmailing one applicant, provider or site contact a private link to book a call from a booking pagemeetings:write
send_formEmailing an open form to people by nameforms:write
add_todoGiving a team member a to-do. The agent must say who it is for: a key cannot keep one itselftodos:write

#Proposals and approvals

A tool that changes something never acts on its own. This holds even when your Automation settings let the same action run automatically inside the app, and even when the key could make the change directly over the REST API. The key's permissions decide what an agent may propose; a person decides what happens.

On the Approvals screen each proposal says where it came from, for example: an AI agent using the API key "Scheduling assistant". Approving and declining are not tools. Only a signed-in person can decide.

Tool calls and proposals are written to the Audit log with the key that made them.

#What an agent cannot do

Not offered over MCP at all: publishing or generating a schedule, approving hours, changing rates, inviting teammates, creating sites, sending messages, reading message history, reading the team list, and reading the audit log. Also not offered: adding a note to a record, starting a call link, drafting an announcement or a group email, drafting or sending a job offer, and reading call transcripts. Notes and transcripts are available over the REST API with their own permissions (see API keys and permissions).

#Questions

#Can I connect ChatGPT or Claude.ai to Staffedly?

Not as a documented flow today. Those apps connect to remote MCP servers through an OAuth sign-in, which Staffedly does not offer yet. An agent you run yourself, with a client that sends an Authorization header, can connect now.

#What happens when the key lacks a permission?

The tool is left out of tools/list. Calling it anyway returns a tool error that names the missing permission, so the agent can tell the user.

#Does each tool call count against the rate limit?

Each HTTP request counts once, whether it carries one message or a batch of up to 20.

Something missing or wrong on this page? Email [email protected] or book a free call; our team sets up every new customer at no charge.