Okta
Sign in to Neurouter with Okta over OpenID Connect and map Okta groups to Neurouter roles and groups for MCP tool access control.
Neurouter works with Okta as a standard OpenID Connect provider.
1. Create an app integration in Okta
Create an OIDC – Web Application integration in the Okta Admin Console:
- Sign-in redirect URI:
https://mcp.example.com/api/auth/callback, that is, yourPUBLIC_URLfollowed by/api/auth/callback. - Grant type: Authorization Code.
- Assign the people or groups who may sign in.
- Note the Client ID and Client secret.
- To use groups, configure a groups claim named
groupsin the ID token, filtered to the groups Neurouter should see. See Okta's guide to customizing tokens with a groups claim.
2. Configure Neurouter
Use your Okta org URL as the issuer, or the issuer of the custom authorization server you added the claim to (for example https://<your-org>.okta.com/oauth2/default):
OIDC_ISSUER=https://<your-org>.okta.com
OIDC_CLIENT_ID=<client-id>
OIDC_CLIENT_SECRET=<client-secret>
OIDC_DISPLAY_NAME="Sign in with Okta"
OIDC_SCOPES="openid email profile"
OIDC_GROUPS_CLAIM=groups
OIDC_ADMIN_GROUPS=neurouter-admins
OIDC_AUDITOR_GROUPS=security-auditors
If your authorization server only returns the groups claim when a groups scope is requested, add it: OIDC_SCOPES="openid email profile groups".
How Neurouter uses the claims
- Claims come from the ID token, merged with userinfo where the token doesn't contain them.
- Group names in
OIDC_GROUPS_CLAIMare matched againstOIDC_ADMIN_GROUPSandOIDC_AUDITOR_GROUPSat every sign-in, and against group mappings in the console.OIDC_GROUP_AUTO_CREATE=truecreates a Neurouter group for each value. - Restrict sign-in to your domains with
OIDC_ALLOWED_EMAIL_DOMAINS.
Then grant servers and tools to those groups under Administration → Access control.