v1
latestOpenAPI 3.0.02026-07-17112116167.8 KBMCP PATs
Mint an MCP Personal Access Token for a workspace
Returns the secret ONCE in the response body. At least one scope must be provided. The PAT is bound to the URL's workspace; the body has no workspace field.
post/api/workspaces/{wid}/mcp/pats
Path parameters
widstring required
Workspace ID
Request body
Example request
{
"expires_at": "2026-09-09T08:30:00Z",
"name": "claude-desktop-laptop",
"scopes": [
"[\"mcp:read\"",
"\"mcp:exec\"]"
]
}Response
Created
Example response
{
"expires_at": "2026-09-09T08:30:00Z",
"id": "agpat_a1b2c3d4e5f6g7h8",
"prefix": "agpat_a1b2c3d4e5f6g7h8"
}