Register an OAuth Client

Last modified by gabrielc on 2026/11/13 15:19

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.

  1. Open "Users & Rights > OpenID Connect" in the wiki's administration, select "Static mode", click "Save", then click "Edit clients".

    The Clients part of the OpenID Connect administration section, with Static mode selected and its Edit clients link highlighted

  2. 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 33418 uses http://localhost:33418/callback.
    • "Enabled": checked.

    The object editor of the provider's Clients page, with the fields of a client object highlighted: Client ID, Client Secret, Allowed redirect URIs, Back-channel logout URI and Enabled

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

    The consent screen the wiki shows the connecting agent, listing what the client is requesting access to, with the Accept button highlighted

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.

Related

Get Connected