The server speaks Streamable HTTP and accepts OAuth 2.1 with PKCE or a bearer token.
This page uses the production URL. To connect to stage, use the stage URL wherever the production one appears. Stage is a separate environment with its own organizations, roles, and tokens: you sign in to stage with your stage account, and a token or client ID from one environment does not work in the other.
Before you start
- You need to be an organization admin in the Twine organization you are connecting. Granting an AI assistant access to HR and payroll data is an admin decision, so other users cannot complete the sign-in.
- MCP access is switched off for every organization by default. Signing in with OAuth switches it on for you when you approve the connection. If you connect with a service-account token instead, switch it on yourself: in Twine, open Settings > Connected apps, turn on Enable MCP server access under MCP server access, and save.
- Each connection reaches one organization. To use the same assistant with two organizations, add the server twice under different names and connect each one separately.
Choose a connection method
Option 1: Sign in with OAuth
Claude, Claude Code, and ChatGPT publish their own client details, which Twine accepts, so they connect without any setup on Twine’s side. Other tools need a client ID from Twine support first; see Get a client ID for another tool.1. Add the server to your assistant
- Claude
- Claude Code
- ChatGPT
- Other clients
On Pro and Max plans, go to Customize > Connectors and choose + Add > Add custom connector. On Team and Enterprise plans, an organization owner adds it under Organization settings > Connectors > Add > Custom > Web.
- Enter a name, for example
Twine, and the server URLhttps://mcp.twine.se/mcp. - Under OAuth client, keep Use Claude’s published identity.
- Finish adding the connector, then click Connect on it to sign in.
2. Approve the connection
Your assistant opens a Twine page in the browser. Sign in if you aren’t already. For Claude, Claude Code, and ChatGPT, the page names the site that published the client’s details, such asclaude.ai. For a client that runs on your computer, such as Claude Code, it also warns you to approve only a connection you started yourself, because another program on your computer could use the same name. Then:
1
Pick the organization
The list shows the organizations where you are an admin. If you are an admin in only one, this step is skipped.
2
Pick a role
The assistant gets exactly the access of the role you pick, not your own. You can pick any role in the organization, so create a dedicated, narrower role for the assistant rather than handing it your admin role. See Create a role for the assistant.
3
Approve
Check the destination shown on the page, then click Approve. If MCP access was switched off for the organization, approving switches it on.
Get a client ID for another tool
Twine registers other AI tools by hand rather than letting them register themselves, because of the data on the other side of the connection. Every customer using the same tool shares one client ID, so if your tool is already registered, support can send you its ID straight away. Email [email protected] and tell us:- Which AI tool you want to connect, and where you use it (for example in a browser, a desktop app, or a terminal).
- The exact OAuth redirect URI the tool sends the browser back to, character for character, including any port and trailing slash.
- Whether the tool is a public client that uses PKCE with no client secret, or a confidential client that stores a secret.
None of these values are secret, and neither is the client ID we send back. Never send Twine support a token, a password, or a session cookie.
https://, plus http://localhost and http://127.0.0.1 for tools that run on your own machine. Wildcards are not accepted, so a tool that picks a random local port each time needs to be set to a fixed one.
Option 2: Use a service-account token
A service-account token belongs to a role rather than to a person, so whoever runs the agent never needs a Twine account. A Twine admin creates the token and sends it over a one-time link.1
Create a role
Follow Create a role for the assistant.
2
Create a share link
In Settings > Roles, open the role and click Share token. Give the token a name that says who uses it and for what, for example “Payroll audit agent”, choose how long it stays valid under Expires after, and click Generate share URL. Copy the link and send it to the person setting up the agent.
3
Reveal the token
The recipient opens the link and clicks Reveal secret. The token is shown once, so they should copy it straight into the client’s configuration or a secrets manager. The link stops working after that, and expires after 5 days if nobody opens it.
4
Switch on MCP access
If nobody in the organization has connected with OAuth yet, switch MCP access on under Settings > Connected apps. See Before you start.
- Claude
- Claude Code
- Other clients
When you add the custom connector, choose not to sign in, and under Request headers add
Authorization with the value Bearer <token>.Create a role for the assistant
Whichever method you use, the assistant’s access is set by a Twine role. The MCP service account preset creates one with the access the MCP tools need.- In Twine, open Settings > Roles and click Quick start.
- Choose the MCP service account preset and give the role a name.
- Choose No access, Read, or Read + Write for each family:
- Employees: personnel records, including managers, contact details, and salary history
- Time reports: reported hours and time off
- Integrations: system integrations, domain mappings, and their property mappings
- Optionally, with Integrations set to Read + Write, tick Also allow delete to let the assistant delete domain mappings and sync triggers. Deletion cannot be undone.
- Create the role.
Check the connection
Ask your assistant:
Call list_capabilities and tell me what you can do in Twine.
It replies with what the connected role allows for each kind of data. If something you expected is missing, the role is the place to change it.
You can also check a token from the command line. A working token returns the server’s details; a rejected one returns an error that names the reason:
What the assistant can do
Assistants discover the tools themselves; you don’t need to name them. This overview shows what is in reach.
A tool the role cannot use is left out of the assistant’s tool list or refused with an explanation, so the assistant never sees data the role doesn’t cover.
The server also tells the assistant how Twine stores data. Most fields are dated properties, a list of values over time where the first entry is the current one, and
list_employees accepts a dated property query to filter on them.
Troubleshooting
"MCP is not enabled for your organization"
"MCP is not enabled for your organization"
MCP access is switched off for the organization. Turn on Enable MCP server access under Settings > Connected apps, or sign in again with OAuth, which switches it on when you approve.Claude Code reports this as “needs authentication” and asks you to sign in again, even though your sign-in is fine. Switch MCP access on and reconnect.
"The supplied redirect_uri does not match"
"The supplied redirect_uri does not match"
The tool sent a redirect URI that differs from the one Twine registered. URIs are compared exactly, so
https://example.com/cb and https://example.com/cb/ are different, and so are two port numbers. Find out the exact URI your tool uses and send it to [email protected] so it can be added.The assistant was disconnected and has to sign in again
The assistant was disconnected and has to sign in again
Twine ends the connection if it hasn’t been used for 30 days. It also ends it if an old, already-replaced refresh token is presented again, which is how Twine responds to a token that may have been copied. In both cases, sign in again.
"MCP server is temporarily disabled by Twine operations"
"MCP server is temporarily disabled by Twine operations"
Twine has paused MCP access for maintenance or to contain an incident. Connections resume when Twine lifts the pause; nothing needs to change on your side.
The assistant can't see jobs, flow runs, or some data
The assistant can't see jobs, flow runs, or some data
The connected role doesn’t allow it. Ask the assistant to call
list_capabilities to see what the role permits, then widen the role or connect with a different one. Roles built by hand often lack read access to jobs, flow runs, and organizational units; the MCP service account preset includes them.A service-account token stopped working
A service-account token stopped working
It has expired or been revoked. Create a new share link from the role, as in Option 2.