Load the MCP consent screen
const url = 'https://example.com/api/mcp/consent?client_id=example&redirect_uri=example&response_type=code&code_challenge=example&code_challenge_method=S256';const options = {method: 'GET', headers: {'Remote-User': '<Remote-User>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/mcp/consent?client_id=example&redirect_uri=example&response_type=code&code_challenge=example&code_challenge_method=S256' \ --header 'Remote-User: <Remote-User>'Available only when GOTIFACTS_MCP_ENABLED=true. Backs the consent screen
the portal renders at /mcp/oauth/authorize. The query string carries the
OAuth authorization request; it is validated like the authorize endpoint
(known client, registered redirect URI, PKCE with S256) but failures are
reported as 400 JSON, never as redirects. The caller must be allowed to
grant MCP consent (GOTIFACTS_MCP_ALLOWED_USERS, falling back to the admin
users), otherwise 403.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”Responses
Section titled “ Responses ”What the consent screen needs.
Data for the MCP consent screen.
object
The registered client’s display name.
The signed-in user approving the request.
Group pre-filled in the first grant (GOTIFACTS_MCP_GROUP).
The capabilities the screen offers per grant, in display order.
CSRF token to send back with the decision.
Example
{ "capabilities": [ "publish" ]}Invalid request (bad path, malformed body, or missing content).
object
Examplegenerated
{ "error": "example"}Missing or invalid credentials.
object
Examplegenerated
{ "error": "example"}Authenticated, but not permitted for this target/capability.
object
Examplegenerated
{ "error": "example"}