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

@alsania-io/api-client-kit

v0.3.3

Published

Auth engine, OpenAPI loader, HTTP executor, and response shaper. Extracted from openapi-dynamic-mcp.

Readme

@alsania-io/api-client-kit

Auth engine, OpenAPI loader, HTTP executor, and response shaper for Alsania services that talk to authenticated external APIs.

Extracted from: openapi-dynamic-mcp (MIT, Andrey Starostin).

Why this exists

The auth/ module here is the single most reusable piece we found across six reviewed projects. It handles API key, bearer, basic, and four OAuth2 flows (client credentials, password, device code, authorization code + PKCE) behind one resolver, with a persistent token store and agent-relayable interactive responses.

Modules

auth/

| File | Responsibility | |---|---| | resolveAuth.ts | Dispatch by security scheme type | | schemeAuth.ts | API key / bearer / basic | | oauthClient.ts | Shared OAuth engine (oauth4webapi) | | deviceCodeFlow.ts | Device code flow | | authCodeFlow.ts | Authorization code + PKCE | | authStore.ts | Token persistence | | env.ts | Env-var derivation (<API>_<SCHEME>_ACCESS_TOKEN, etc.) |

openapi/

| File | Responsibility | |---|---| | loadSpec.ts | Load OpenAPI 3.x / Swagger 2.0 from file or URL | | endpointIndex.ts | Index endpoints for lookup | | jsonPointer.ts | JSON Pointer resolution |

http/

| File | Responsibility | |---|---| | requestExecutor.ts | Build request, dry-run mode, retry 429 |

output/

| File | Responsibility | |---|---| | jsonPath.ts | JSONPath response filtering + size warnings |

config/

| File | Responsibility | |---|---| | loadConfig.ts | YAML config validation |

Interactive OAuth2 pattern

When a flow needs the user, return a structured object an agent can relay:

{
  "status": "authorization_required",
  "method": "device_code",
  "verificationUri": "https://auth.example.com/device",
  "userCode": "ABCD-1234",
  "instruction": "After the user confirms, call this endpoint again."
}

This is the pattern to standardize across all Alsania MCP servers.

Security notes

  • Tokens are never logged.
  • Env vars are the source of truth; the store is a fallback.
  • Add a URL allowlist before wiring to production credentials (see TODO in the security plan).

Setup

make install
make build

License

MIT. See LICENSE. Original copyright (c) 2026 Andrey Starostin.