ApiServer oauth
Cleanup expired OAuth states
Admin endpoint to clean up expired OAuth states. Typically called by a scheduled job. Requires admin privileges.
Authorization
User API Key AuthorizationBearer <token>
User API key (mgw_usr_live_* or mgw_usr_test_*)
In: header
Query Parameters
retention_hours?integer
Default
1Range
1 <= value <= 24run_in_background?boolean
Run cleanup in background (faster response) or synchronously
Default
trueCookie Parameters
access_token?|
Response Body
application/json
application/json
curl -X DELETE "https://loading/api/v1/oauth/oauth-states/cleanup"{
"property1": 0,
"property2": 0
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Sdk Search Tools
Search tools via the SDK. Delegates to the shared ``search_tools`` function. If the token has scoped ``allowed_tools``, results are post-filtered to only include those tools.
Initiate server OAuth flow
Start the OAuth authorization flow to connect the current user's external account to an MCP server. Uses PKCE and database-stored state for security.
