The MCP option in the contextual menu at the top of any page copies the docs server URL. The sandbox API server is configured by hand, as shown below.
What the sandbox API server is for
Building an integration means setting up realistic data in your sandbox before you can test anything: a company, a handful of employees with the right pay elements, a pay run in the right period. The sandbox API server lets an assistant do that for you from a plain-English request. It exposes these tools:list-endpoints,search-endpointsandget-endpointto discover operations and their schemas.execute-requestto call an endpoint and return the response.list-specsto switch between the service specifications listed in this reference.
Before you connect
1
Get a sandbox access token
Exchange your sandbox
client_id and client_secret for a token at https://auth.sandbox.flowpayroll.ai/oauth2/token, as described in Authentication. Tokens last one hour.2
Find your organisation id
Call
GET /v1/authentication/my-organisations with that token. The sandbox API server requires X-Org-Id on every call, even when your credentials can access only one organisation.3
Put both in environment variables
Connect your tool
- Claude Code
- Cursor
- VS Code
- Windsurf
From a terminal:Or add both to
.mcp.json in your project, where Claude Code expands the variables at start-up:Try it
Start a new chat and ask for something concrete. The assistant discovers the right endpoints, calls them against your sandbox, and reports back.- “List the employees in my sandbox organisation.”
- “Create an employee on a £32,000 salary with a Plan 2 student loan, starting on the 1st of next month.”
- “Add a new starter to the current pay period and show me their payslip.”
- “Which endpoint do I call to replay a failed webhook delivery, and what does it need?”
Things to know
- Tokens expire after an hour. When calls start returning
401, mint a new token, update the environment variable, and restart the MCP server in your client. Yourclient_secretis never given to the assistant. - The token sits in your client’s configuration. Use the environment-variable forms above, keep configuration files out of version control, and never put a live token anywhere near this setup.
- Clients that cannot send headers (for example ChatGPT connectors) can still list and explain endpoints, but every
execute-requestcall fails with401. - The assistant can do anything the API allows, including deleting data. Sandbox data is disposable, but review what it did before you copy a scenario into real code.
- The docs server needs nothing. Use it on its own if you only want help finding your way around the reference.