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

@mogintel/mcp-pk-shared

v0.1.0

Published

Shared Pakistan-Stack library: error taxonomy, token codec, canonical types, idempotency store, health-check helpers, and shared CI workflow templates. Consumed by every `@mogintel/mcp-*` provider MCP and by `mogintel/nokar`. **Not** an MCP server — no to

Readme

@mogintel/mcp-pk-shared

Shared Pakistan-Stack library: error taxonomy, token codec, canonical types, idempotency store, health-check helpers, and shared CI workflow templates. Consumed by every @mogintel/mcp-* provider MCP and by mogintel/nokar. Not an MCP server — no tools registered here.

Install

npm install @mogintel/mcp-pk-shared

Quick start

import { issueApprovalToken, verifyApprovalToken, idempotencyKey, TTL_CONFIG } from '@mogintel/mcp-pk-shared';

const scope = { install_id: 'inst_1', tool_name: 'mcp-jazzcash.create_payment_link', caller_identity: 'agent:runtime' };
const params = { amount: 500, currency: 'PKR', order_ref: 'ORD-1' };

// ttlSeconds defaults to the canonical TTL_CONFIG (600s) — no consumer defines a local TTL const.
const issued = issueApprovalToken({ scope, params, secret: process.env.HMAC_SECRET!, ttlSeconds: TTL_CONFIG });
const result = verifyApprovalToken(issued.token, process.env.HMAC_SECRET!, { expectedScope: scope, params });
// result: { valid: true, payload } | { valid: false, reason: 'TOKEN_SIGNATURE_INVALID' | 'TOKEN_EXPIRED' | ... }

const key = idempotencyKey('order', 'create', params.order_ref, params); // stable, drift-sensitive

See examples/quick-start.ts for the runnable version.

Tool surface

Shared library — no tools. See @mogintel/mcp-jazzcash, @mogintel/mcp-easypaisa, @mogintel/mcp-tcs-courier, @mogintel/mcp-daraz-seller for provider tools.

Auth setup

Not applicable — this package holds no auth code of its own. Provider MCPs load credentials via the Doppler nokar-prod-<provider> scope; see each provider MCP's README.

Error semantics

Errors are data across the MCP boundary — never thrown (AD-10). src/errors.ts ships the canonical PakStackError taxonomy; each member (AMOUNT_EXCEEDS_TIER, TOKEN_EXPIRED, TOKEN_SCOPE_MISMATCH, TOKEN_PARAMS_MISMATCH, RATE_LIMITED, UPSTREAM_ERROR, IDEMPOTENCY_CONFLICT, …) carries { code, retryable, httpStatus } and serialises via .toWire() to the snake_case wire union { ok: false, error: { code, message, retryable, http_status, upstream_ref? } }. The convenience field is httpStatus (camel); the wire field is http_status (snake).

Tier model

See mogintel/nokar/ARCHITECTURE-SPINE.md §AD-3 — every MCP tool declares T1_READ | T2_WRITE_CONFIRM | T3_HUMAN_ONLY in its manifest.json; the facade enforces the tier at call time, not the MCP.

Rate limits

Not applicable — this is a client-side library.

Sandbox vs prod toggle

Not applicable — no runtime.

CONTRIBUTING

Auth-critical paths (src/tokens.ts, src/errors.ts, src/auth.ts, scripts/workflow-templates/**, scripts/forbidden-calls.txt) require code-owner review from @mogintel/security + @yahya. See .github/CODEOWNERS.

Licence (MIT)

See LICENSE.

Commercial CTA

Unaffiliated community wrapper around public APIs. Commercial support and hosted operator console available via MogIntel — contact [email protected].