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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mcp-consultant-tools/azure-b2c

v22.0.0

Published

MCP server for Azure AD B2C - user management, password reset, and group operations

Readme

@mcp-consultant-tools/azure-b2c

MCP server for Azure AD B2C user management via Microsoft Graph API.

Features

  • User Management: List, search, get user details
  • Group Operations: List groups, get memberships
  • Password Reset: Reset passwords, force change on next login
  • User Lifecycle: Create, update, and delete users
  • Granular Security: Separate flags for each write operation type

Installation

npm install @mcp-consultant-tools/azure-b2c

Configuration

Required Environment Variables

AZURE_B2C_TENANT_ID=your-tenant.onmicrosoft.com  # or tenant GUID
AZURE_B2C_CLIENT_ID=app-registration-client-id
AZURE_B2C_CLIENT_SECRET=app-registration-secret

Optional Security Flags

All write operations are disabled by default. Enable only what you need:

AZURE_B2C_ENABLE_PASSWORD_RESET=true   # Enable password reset tools
AZURE_B2C_ENABLE_USER_CREATE=true      # Enable user creation
AZURE_B2C_ENABLE_USER_UPDATE=true      # Enable user profile updates
AZURE_B2C_ENABLE_USER_DELETE=true      # Enable user deletion (dangerous!)

Optional Settings

AZURE_B2C_MAX_RESULTS=100              # Max users/groups per request

Azure Setup Requirements

  1. Create App Registration in your B2C tenant
  2. Add API Permissions (Application type):
    • User.ReadWrite.All
    • Directory.ReadWrite.All (for group operations)
  3. Grant Admin Consent for the permissions
  4. Assign Role: Add "User Administrator" role to the app's service principal

Tools (11)

Read-Only (Always Enabled)

| Tool | Description | |------|-------------| | b2c-list-users | List users with optional filtering | | b2c-get-user | Get user by ID or email | | b2c-search-users | Search by name, email | | b2c-list-groups | List all groups | | b2c-get-user-groups | Get groups for a user | | b2c-get-group-members | Get members of a group |

Password Operations (Requires AZURE_B2C_ENABLE_PASSWORD_RESET=true)

| Tool | Description | |------|-------------| | b2c-reset-user-password | Set new password | | b2c-force-password-change | Force change on next login |

User Creation (Requires AZURE_B2C_ENABLE_USER_CREATE=true)

| Tool | Description | |------|-------------| | b2c-create-user | Create new local account |

User Update (Requires AZURE_B2C_ENABLE_USER_UPDATE=true)

| Tool | Description | |------|-------------| | b2c-update-user | Update user profile |

User Deletion (Requires AZURE_B2C_ENABLE_USER_DELETE=true)

| Tool | Description | |------|-------------| | b2c-delete-user | Delete user (irreversible!) |

Prompts (2)

| Prompt | Description | |--------|-------------| | b2c-user-overview | Formatted user profile with groups | | b2c-tenant-summary | Tenant statistics |

Usage Example

MCP Client Configuration

{
  "mcpServers": {
    "azure-b2c": {
      "command": "npx",
      "args": ["@mcp-consultant-tools/azure-b2c"],
      "env": {
        "AZURE_B2C_TENANT_ID": "contoso.onmicrosoft.com",
        "AZURE_B2C_CLIENT_ID": "your-client-id",
        "AZURE_B2C_CLIENT_SECRET": "your-secret",
        "AZURE_B2C_ENABLE_PASSWORD_RESET": "true"
      }
    }
  }
}

Important Notes

  • Local Accounts Only: Password operations only work for local B2C accounts, not federated/social accounts
  • Password Requirements: Passwords must be 8-256 characters with at least 3 of: lowercase, uppercase, digit, symbol
  • Deletion is Permanent: The delete operation cannot be undone

License

MIT