/{app_slug}/v1/agent-access/configAuthPush this app's agent access settings
Call it on boot: your code is the source of truth for the resources (your MCP server URLs), the consent page URL and the scope catalogue. The whole object is replaced. Enabling needs a consent URL, a resource and a scope. Requires `auth.agent_access.configure` on the app. Audited as `agent_access.config.updated`.
Path parameters
app_slug*stringThe app slug.
Request body
enabled*booleanTurn agent access on or off.
resources*arrayYour MCP server URLs (https, at most 5).
Example: ["https://mcp.example.com/mcp"]
consent_urlstring · uriYour consent page (https).
scopes*arrayThe scope catalogue (at most 50).
Response · 200 The settings now stored.
enabled*booleanAgent access is on. While off, discovery is 404 and every protocol endpoint refuses.
resources*arrayResource indicators (RFC 8707) tokens may be minted for: your MCP server URLs. Every token carries exactly one of them in `aud`.
Example: ["https://mcp.example.com/mcp"]
consent_url*string · uriYour consent page. /authorize redirects the browser here with `?request=<handle>`; the page signs the user in, shows the request and calls approve or deny.
Example: "https://app.example.com/oauth/consent"
scopes*arrayThe scopes agents can ask for.
Example
Request
PUT https://api.auth.productcraft.co/{app_slug}/v1/agent-access/config
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"enabled": false,
"resources": [
"https://mcp.example.com/mcp"
],
"consent_url": "string",
"scopes": [
{
"name": "disputes:read",
"description": "Read disputes, transactions and evidence"
}
]
}Response
{
"enabled": false,
"resources": [
"https://mcp.example.com/mcp"
],
"consent_url": "https://app.example.com/oauth/consent",
"scopes": [
{
"name": "disputes:read",
"description": "Read disputes, transactions and evidence"
}
]
}