A Model Context Protocol (MCP) server that helps AI tools integrate CentralAuth into applications using the public developer documentation and OpenID discovery endpoint.
- Integration guidance for
Next.js,Express, generic OAuth 2.0 apps, React Native, and desktop apps - Callback URL, whitelist-domain, and PKCE guidance
- Public OpenID Connect discovery helper
- Starter
.envtemplates for app integrations - Starter framework code snippets
- Full ready-to-copy starter file bundles for
Next.jsandExpress - Project env writing support that can update
.env/.env.localfiles directly - Optional admin-mode organization creation and secret rotation
npx -y centralauth-mcp-serverWhen using write_project_env_file, the server can infer the app type from a target project path.
Examples:
Next.js→ prefers.env.localExpress/ generic Node apps → prefers.envReact Native/ Expo → uses.env
You can still override the app type explicitly if needed.
This server is designed to help AI assistants do more than just explain OAuth concepts. It can help with the whole CentralAuth setup flow:
-
Understand your app
- explain how CentralAuth fits into
Next.js,Express,React Native, or a generic OAuth app - explain callback URLs, whitelist domains, and PKCE
- explain how CentralAuth fits into
-
Generate setup artifacts
- create starter env blocks
- generate code snippets
- generate multi-file starter bundles for
Next.jsandExpress
-
Update real projects
- write CentralAuth env variables into a target project's
.envor.env.local - auto-detect the project type when possible
- write CentralAuth env variables into a target project's
-
Optional admin automation
- create a new CentralAuth organization from a prompt
- rotate an existing organization secret
- immediately produce updated env values for the target app
get_integration_checklistexplain_callback_setupvalidate_env_requirementsdraft_organization_from_promptgenerate_env_templategenerate_project_envwrite_project_env_filegenerate_integration_snippetgenerate_starter_filesget_openid_configuration
These require CENTRALAUTH_API_KEY in the MCP server environment. This has to be a tenant-level API key with permissions to create and manage organizations.
create_organization_from_promptrotate_organization_secret
Both admin tools can also update a target project's .env file automatically.
Note that the CENTRALAUTH_API_KEY must be set in the MCP server environment, not just the project environment variables.
Use the CentralAuth MCP server to explain how to integrate CentralAuth into my Next.js app.
Use the CentralAuth MCP server to generate starter files for an Express app at https://api.example.com.
Draft a CentralAuth organization for "Acme Billing Portal" and show me the env variables for a Next.js app at https://billing.example.com.
Write the CentralAuth env values for organization "Acme Private Portal" and detect the correct env file automatically.
Create a new CentralAuth organization from the prompt "Acme customer portal" under tenant `YOUR_TENANT_ID` and write the env values to this project's env file.
Rotate the secret for organization `YOUR_ORGANIZATION_ID` and update this project's env file.
{
"mcpServers": {
"centralauth": {
"command": "node",
"args": ["/absolute/path/to/CentralAuth-MCP-Server/dist/index.js"]
}
}
}{
"mcpServers": {
"centralauth": {
"command": "npx",
"args": ["-y", "centralauth-mcp-server"]
}
}
}