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

@crscreditapi/b2c-mcp-server

v1.0.0-0d49a2d

Published

MCP server for B2C ECM - live queries, diagnostics, user management, and documentation lookups

Readme

ECM MCP Server

MCP server for B2C ECM - provides live API queries, documentation lookups, diagnostic tools, and write operations for user management.

Setup

npm install
npm run build

Admin vs. customer mode

There are two server builds, not a runtime flag:

| Mode | Entry point | npm package | Required credentials | Hits | | -------- | ------------------------ | -------------------------------- | ------------------------------------------------------------ | ------------------------------------------------ | | Admin | dist/index.js | @crscreditapi/b2c-mcp-server | SCOREAPI_ADMIN_USERNAME + SCOREAPI_ADMIN_PASSWORD | /admin/** — internal KB, all 26 tools | | Customer | dist-customer/index.js | @crscreditapi/b2c-mcp-customer | SCOREAPI_PROD_CUSTOMER_USERNAME + SCOREAPI_PROD_CUSTOMER_PASSWORD (+ optional DEV_ variants) | /customers/** — external KB, reference + portal tools |

The customer entry point sets MCP_CUSTOMER_MODE=true internally — you do not set it yourself. Pick a mode by picking the binary. You can register both side-by-side in .mcp.json if you want to switch between scopes in the same session.

Stdio mode — admin (Claude Code, Cursor, etc.)

Add to your MCP client config (e.g., .mcp.json):

{
	"mcpServers": {
		"scoreapi-admin": {
			"command": "node",
			"args": ["/path/to/b2c-mcp-server/dist/index.js"],
			"env": {
				"SCOREAPI_BASE_URL": "http://localhost:8081/api",
				"SCOREAPI_ADMIN_USERNAME": "your_username",
				"SCOREAPI_ADMIN_PASSWORD": "your_password"
			}
		}
	}
}

Or install as an npm package:

{
	"mcpServers": {
		"scoreapi-admin": {
			"command": "npx",
			"args": ["@crscreditapi/b2c-mcp-server"],
			"env": {
				"SCOREAPI_BASE_URL": "http://localhost:8081/api",
				"SCOREAPI_ADMIN_USERNAME": "your_username",
				"SCOREAPI_ADMIN_PASSWORD": "your_password"
			}
		}
	}
}

Stdio mode — customer

{
	"mcpServers": {
		"scoreapi-customer": {
			"command": "npx",
			"args": ["@crscreditapi/b2c-mcp-customer"],
			"env": {
				"SCOREAPI_PROD_BASE_URL": "https://prod.example.com/api",
				"SCOREAPI_PROD_CUSTOMER_USERNAME": "your_prod_username",
				"SCOREAPI_PROD_CUSTOMER_PASSWORD": "your_prod_password",
				"SCOREAPI_DEV_BASE_URL": "https://dev.example.com/api",
				"SCOREAPI_DEV_CUSTOMER_USERNAME": "your_dev_username",
				"SCOREAPI_DEV_CUSTOMER_PASSWORD": "your_dev_password"
			}
		}
	}
}

HTTP mode (n8n, Docker)

# Admin
MCP_TRANSPORT=http MCP_PORT=3001 node dist/index.js

# Customer
MCP_TRANSPORT=http MCP_PORT=3001 node dist-customer/index.js

Endpoints:

  • POST / and POST /mcp — MCP Streamable HTTP transport
  • GET /health — Health check

See .env.example for all environment variables.

Tools (26)

| Category | Tools | | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Reference | lookup_error_code, lookup_openapi_spec, explain_identity_flow, lookup_knowledge_base | | Customer | get_customer_info, get_customer_hosts, get_customer_stats, get_platform_stats, search_users, get_customer_users_by_period, get_customer_billing_report, get_billing_details | | User | get_user_info, get_user_logs, get_user_features, get_user_identity_status, get_user_reports_history | | Diagnostic | diagnose_user_issue, compare_user_to_host_config | | Write | pause_user, reactivate_user, cancel_user, bulk_pause_users, bulk_resume_users | | Metric | get_metric_stats | | Admin | get_enrollment_failures |

See docs/TOOLS.md for detailed parameter reference.

Resources

The server also exposes 3 MCP resources for direct document access:

| URI | Description | | ------------------------------- | -------------------------------------------------- | | scoreapi://docs/error-codes | All SC* error codes with meanings and remediation | | scoreapi://docs/openapi-spec | Full OpenAPI 3.0 spec for ECM | | scoreapi://docs/identity-flow | DIT -> SMFA -> Enrollment flow documentation |

Customer Package (@crscreditapi/b2c-mcp-customer)

A stripped-down build published separately for customers. Ships the 4 reference tools and 3 resources. lookup_error_code, lookup_openapi_spec, and explain_identity_flow work entirely from bundled data; lookup_knowledge_base calls /customers/knowledge-base/query on b2c-server, so customer credentials are required.

How it works

The customer package uses a separate build pipeline from the same codebase:

| File | Purpose | | -------------------------------- | ----------------------------------------------------------------------------------------------- | | src/index.customer.ts | Entry point — imports only customer tools/handlers | | src/tools/index.customer.ts | Exports only referenceTools from reference.tools.ts | | src/handlers/index.customer.ts | Registers only 4 reference handlers | | tsconfig.customer.json | Compiles to dist-customer/ — TypeScript follows imports, so only reachable files are included | | package.customer.json | npm package metadata (no repository field — keeps GitHub org private) | | README.customer.md | README shown on npmjs.com |

Adding a tool to the customer package

  1. Create the tool schema and handler as normal (see "Adding a new tool" above)
  2. Import and register in src/tools/index.customer.ts and src/handlers/index.customer.ts
  3. Run npm run build:customer to verify only intended files end up in dist-customer/

Build & publish

npm run build:customer    # tsc -p tsconfig.customer.json + copy data/*.json

Both packages are published to npmjs.com on push to main via .github/workflows/publish.yml.

Development

See docs/ARCHITECTURE.md for project structure.