ThunderID MCP Server
ThunderID provides a Model Context Protocol (MCP) server that lets AI assistants and MCP clients manage applications, authentication flows, users, and themes directly.
Overview
The MCP server is available through the /mcp endpoint of your ThunderID instance (default: https://localhost:8090/mcp). MCP clients discover the available tools automatically through the protocol.
Authentication
The endpoint follows the MCP Authorization Specification. The MCP server publishes protected resource metadata at /.well-known/oauth-protected-resource, advertising ThunderID as the OAuth authorization server. Spec-compliant MCP clients discover this automatically and run an OAuth authorization code + PKCE flow: you sign in through the browser, and the client obtains and refreshes tokens on its own. There is no manual token handling.
Access requires the system scope, and permissions come from the signed-in user, so sign in with an administrator account.
Prerequisites
- ThunderID server running (default:
https://localhost:8090) - Access to the ThunderID Console with an administrator account
- Node.js and npm installed (to run MCP Inspector via
npx)
Setup
Pick your MCP client below. MCP Inspector works today; step-by-step guides for the other clients are on the way.
- MCP Inspector
- Claude Desktop
- Claude Code
- GitHub Copilot
Register an MCP Client
In the ThunderID Console, register an application for MCP Inspector.
- Go to Applications and click Add Application.
- Select MCP Client.
- Enter a name (for example,
MCP Inspector). - If prompted, select an organization unit.
- On the Client type step, select On behalf of a user. This configures the Authorization Code flow with PKCE as a public client.
- Under Redirect URIs, add
http://localhost:6274/oauth/callback. The wizard shows this exact URI as a copyable hint for MCP Inspector. - Click Finish.
- From the completion screen, copy the Client ID. You need it when connecting from MCP Inspector. No client secret is required because this is a public client.
Allow the MCP Inspector Origin
MCP Inspector runs in the browser at http://localhost:6274 and calls ThunderID cross-origin, so its origin must be allowed in the CORS configuration.
Create or update config/resources/server_configs/cors.yaml in your ThunderID distribution, or use PUT /server-config/cors after startup:
name: cors
value:
allowedOrigins:
- "http://localhost:6274"
If the file already exists, append the origin to the existing allowedOrigins list instead of replacing it. Restart ThunderID after editing the file so the change takes effect.
Trust the ThunderID Certificate
MCP Inspector's proxy runs on Node.js. Point Node.js at the ThunderID self-signed certificate so TLS connections to https://localhost:8090 are trusted, without adding anything to your system trust store:
export NODE_EXTRA_CA_CERTS=<THUNDERID_HOME>/config/certs/server.cert
<THUNDERID_HOME> is the directory of your ThunderID distribution. The certificate generated during setup includes subject alternative names for localhost and 127.0.0.1, so modern TLS clients accept it once it is trusted. Run the export in the same terminal session you launch MCP Inspector from.
Launch MCP Inspector
npx @modelcontextprotocol/inspector
The Inspector UI opens at http://localhost:6274.
Connect to the MCP Server
- Set Transport Type to Streamable HTTP.
- Set URL to
https://localhost:8090/mcp. - Expand the Authentication section and select OAuth.
- Enter the Client ID you copied earlier. Leave Client Secret empty.
- Set Scope to
system. - Click Connect.
- A browser tab opens with the ThunderID sign-in page. Sign in with your administrator account.
- Review and approve the requested permissions on the consent screen.
- You are redirected back to MCP Inspector, now connected. Tokens are obtained and refreshed automatically from here on.
Verify the Connection
- In MCP Inspector, open the Tools tab and click List Tools.
- Select a tool such as
list_applicationsand run it. - The response lists the applications registered in ThunderID, including the MCP Inspector application you just created.
If the connection fails, see the Troubleshooting section below.
A step-by-step guide for connecting Claude Desktop to the ThunderID MCP server is on the way. Any MCP client that supports the MCP Authorization Specification with OAuth can connect today using the same application registered in the MCP Inspector guide above.
A step-by-step guide for connecting Claude Code to the ThunderID MCP server is on the way. Any MCP client that supports the MCP Authorization Specification with OAuth can connect today using the same application registered in the MCP Inspector guide above.
A step-by-step guide for connecting GitHub Copilot to the ThunderID MCP server is on the way. Any MCP client that supports the MCP Authorization Specification with OAuth can connect today using the same application registered in the MCP Inspector guide above.
What You Can Do
Once connected, your AI assistant can work with ThunderID resources directly. MCP clients discover the available tools automatically, you just describe what you need in natural language.
| Toolset | Description |
|---|---|
applications | Create, configure, and manage OAuth applications with pre-built templates for SPA, Mobile, Server, and M2M |
flows | Design and modify authentication and registration flows |
themes | Browse and inspect login page themes, colors, and typography |
organization_units | List organization units |
user_types | List user types and self-registration settings |
react_sdk | Get tailored integration code for the ThunderID React SDK |
Example prompts:
- "Create a new single-page application for my React project"
- "Show me the current authentication flow"
- "Add a second factor step to the default login flow"
- "What colors and typography does the default theme use?"
- "Integrate authentication with ThunderID for this application"
Use Cases
Scaffold a React App with Login
Ask the assistant to create a new React application with authentication wired up end-to-end:
"Create a new React application with authentication using ThunderID"
The assistant scaffolds a React project using Vite, installs the ThunderID React SDK, and wires up the auth provider with the correct clientId and server URL from the application registered in ThunderID. By the end you have a running app with a working sign-in button backed by ThunderID.
To add authentication to an existing React application instead:
"Integrate authentication with ThunderID for this application"
The assistant installs the SDK, configures the auth provider, and adds sign-in and sign-out components without scaffolding a new project.
Add Signup to a React App
After integrating login, add a registration page:
"Integrate a signup page in the application and enable signup"
The assistant enables self-registration on your ThunderID application and generates a signup page wired to the registration flow. New users can register directly from your application and appear in the ThunderID Console under User Management.
Troubleshooting
Browser shows a CORS error or the connection hangs
The Inspector origin is missing from the CORS configuration.
- Re-check the
cors.yamlstep under Allow the MCP Inspector Origin. - Restart ThunderID after saving the change.
Certificate or TLS errors
NODE_EXTRA_CA_CERTS was not set in the terminal that launched Inspector, or it points to the wrong path.
- Export it again in the same terminal:
export NODE_EXTRA_CA_CERTS=<THUNDERID_HOME>/config/certs/server.cert. - Relaunch MCP Inspector from that terminal.
Redirect URI error during sign-in
The redirect URI on the application does not exactly match http://localhost:6274/oauth/callback.
- Edit the application in the Console.
- Correct the redirect URI under Redirect URIs and save.
403 or insufficient scope after connecting
The signed-in user lacks administrator permissions, or the scope was not set to system.
- Sign in with an administrator account.
- Confirm the Scope field in MCP Inspector is set to
system.
MCP server not responding
Verify ThunderID is running and the endpoint is reachable:
curl -k https://localhost:8090/mcp
A 401 Unauthorized response with a WWW-Authenticate header confirms the endpoint is up and secured. Any other error indicates the server is not running or the URL is incorrect.
Related Documentation
- API Reference - Application and Flow Management REST APIs
- React SDK - ThunderID React SDK documentation
- Securing MCP - governing MCP clients and protecting MCP servers with ThunderID
- MCP Authorization Specification - MCP auth protocol details