Register an OAuth Client
Last modified by gabrielc on 2026/11/13 15:19
Content
Steps
Register an MCP client with the wiki's OpenID Connect Provider so that it can sign in while the provider is in static mode, which accepts only registered clients and their listed redirect URIs.
- Open "Users & Rights > OpenID Connect" in the wiki's administration, select "Static mode", click "Save", then click "Edit clients".

- Select XWiki.OIDC.Provider.ClientClass in "New object", click "Add" and fill in the new object:
- "Client ID": any non-empty name, for example mcp-client.
- "Client Secret": leave it empty for a client that runs on the user's machine, such as a terminal or desktop assistant.
- "Allowed redirect URIs": the callback URIs the client uses, separated by commas or spaces. For example, Claude Code started with
--callback-port 33418useshttp://localhost:33418/callback. - "Enabled": checked.

- Click "Save".
- Give the client's users the client ID, the callback port when the redirect URI uses one, and the MCP endpoint URL.
- Connect the client and check that the sign-in reaches the consent screen.

FAQ
Why does the client get an "invalid_client" error?
The client ID is not registered, or the redirect URI the client sent is not in "Allowed redirect URIs". The provider compares redirect URIs as exact strings, so a client that picks a random callback port must be given a fixed one.
What if "Allowed redirect URIs" is empty?
The provider then accepts any redirect URI for that client. List the client's URIs.
Do I register one client per user?
No, one per client application. Every user of that application uses the same client ID and still signs in as their own wiki user.
Which redirect URI does my client use?
Its own documentation says, see Assistant Documentation Links.