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

smithery-runtime

v1.0.1

Published

Smithery hosted-runtime bootstrap. Wraps user modules (createServer + createAuthAdapter) with the MCP-SDK transport, OTel instrumentation, auth dispatch, and Secrets Store env resolution. Consumed by apps/api at deploy time (string-bundle form) and by SDK

Readme

smithery-runtime

Smithery hosted-runtime bootstrap. Wraps user modules with the MCP-SDK transport, OTel instrumentation, auth dispatch, and Secrets Store env resolution.

Consumed by:

  • Smithery's deploy pipeline at deploy time, via the bundled string at smithery-runtime/bootstrap-source. The deploy workflow concatenates this with your user-module.js and uploads the combined script to Cloudflare Workers-for-Platforms.
  • SDK consumers at test time, via simulate() from smithery-runtime/testing. Drive your user module through the same dispatch logic the platform runs, without going through the full release pipeline.

User module contract

A Smithery hosted server exports:

// default — required
export default function createServer({ config, env }: ServerContext): McpServer

// optional — required for OAuth providers
export const createAuthAdapter: (ctx: { env: Record<string, unknown> }) => Promise<AuthAdapter>

// optional — for HTTP routes outside the MCP path
export const handleHttp?: HandleHttpFn

The runtime's bootstrap inspects these exports and routes incoming requests:

  • POST /__smithery/authcreateAuthAdapter (auth-dispatch from apps/auth)
  • non-/ paths → handleHttp
  • /createServer then through MCP-SDK transport

Testing your user module

import { simulate } from "smithery-runtime/testing"

const userModule = await import("./your-bundle.js")
const sim = await simulate({
  userModule,
  env: {
    OAUTH_CLIENT_ID: "...",
    OAUTH_CLIENT_SECRET: "...",
    OAUTH_AUTHORIZE_URL: "...",
    OAUTH_TOKEN_URL: "...",
    OAUTH_SCOPES: "...",
  },
})

sim.assertShape() // throws if default export isn't a function
sim.hasAuthAdapter() // boolean

const res = await sim.dispatchAuth({
  action: "getAuthorizationUrl",
  payload: {
    callbackUrl: "https://auth.smithery.ai/connect",
    state: "test",
    codeChallenge: "...",
    config: {},
  },
})
// res = { status: 200, body: { ok: true, value: { authorizationUrl } } }

The simulator mirrors the bootstrap's two-stage error envelope:

| Source | Response | |---|---| | createAuthAdapter factory throws | { ok: false, error: "adapter_init_failed", message } (status 500) | | adapter.{getAuthorizationUrl,exchangeCode,refreshToken} throws | { ok: false, error: "adapter_error", message } (status 500) | | Adapter method resolves | { ok: true, value } (status 200) | | Unknown action | { ok: false, error: "unknown_action", message } (status 400) | | createAuthAdapter not exported | { ok: false, error: "no_auth_adapter", message } (status 500) |

What the bootstrap doesn't catch

simulate() faithfully runs the bootstrap's auth dispatch path, but two opaque pieces remain platform-only and aren't proven by passing tests:

  • apps/auth issuing correctly-shaped synthetic auth-dispatch requests
  • The gateway attaching stored OAuth tokens on subsequent tools/call requests

Both are well-tested production code shared with every other OAuth-proxy provider.

License

MIT.