npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

centralauth-mcp-server

v0.3.0

Published

MCP server for AI-assisted CentralAuth integration guidance.

Downloads

46

Readme

CentralAuth MCP Server

A Model Context Protocol (MCP) server that helps AI tools integrate CentralAuth into applications using the public developer documentation and OpenID discovery endpoint.

Features

  • 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 .env templates for app integrations
  • Starter framework code snippets
  • Full ready-to-copy starter file bundles for Next.js and Express
  • Project env writing support that can update .env / .env.local files directly
  • Optional admin-mode organization creation and secret rotation

Requirements

  • Node.js 18+
  • No CentralAuth API key is required

Setup

npm install
npm run build

Run

npm run dev
# or
npm start

Project auto-detection

When using write_project_env_file, the server can infer the app type from a target project path.

Examples:

  • Next.js → prefers .env.local
  • Express / generic Node apps → prefers .env
  • React Native / Expo → uses .env

You can still override the app type explicitly if needed.

What this MCP server can do

This server is designed to help AI assistants do more than just explain OAuth concepts. It can help with the whole CentralAuth setup flow:

  1. 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
  2. Generate setup artifacts

    • create starter env blocks
    • generate code snippets
    • generate multi-file starter bundles for Next.js and Express
  3. Update real projects

    • write CentralAuth env variables into a target project's .env or .env.local
    • auto-detect the project type when possible
  4. 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

Available tools

Docs-only tools

  • get_integration_checklist
  • explain_callback_setup
  • validate_env_requirements
  • draft_organization_from_prompt
  • generate_env_template
  • generate_project_env
  • write_project_env_file
  • generate_integration_snippet
  • generate_starter_files
  • get_openid_configuration

Optional admin-mode tools

These require CENTRALAUTH_API_KEY in the MCP server environment:

  • create_organization_from_prompt
  • rotate_organization_secret

Both admin tools can also update a target project's .env file automatically when you provide a targetProjectPath or targetEnvPath.

Example prompts

Docs-only examples

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.

Admin-mode examples

Create a new CentralAuth organization from the prompt "Acme customer portal" under tenant `YOUR_TENANT_ID` and write the env values into /path/to/my-nextjs-app.
Rotate the secret for organization `YOUR_ORG_ID` and update this project's env file.

Example MCP config

Local workspace build

{
  "mcpServers": {
    "centralauth": {
      "command": "node",
      "args": ["/absolute/path/to/CentralAuth-MCP-Server/dist/index.js"]
    }
  }
}

Installed via npx

{
  "mcpServers": {
    "centralauth": {
      "command": "npx",
      "args": ["-y", "centralauth-mcp-server"]
    }
  }
}