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

@xmcp-dev/cli

v0.1.1

Published

Official xmcp developer CLI

Downloads

908

Readme

@xmcp-dev/cli

CLI tool for generating typed clients from xmcp MCP servers external connections.

Usage

npx @xmcp-dev/cli generate [options]

Client Configuration

Define everything in src/clients.ts to use the full feature set:

export const clients = {
  figma: {
    url: "https://mcp.figma.com/mcp",
    headers: [{ name: "x-api-key", env: "FIGMA_TOKEN" }],
  },
  playwright: {
    npm: "@playwright/mcp@latest",
    args: ["--browser", "chromium"],
    env: { DEBUG: "pw:api,pw:browser*" },
  },
  firecrawl: {
    npm: "firecrawl-mcp",
    env: { FIRECRAWL_API_KEY: process.env.FIRECRAWL_API_KEY ?? "" },
  },
  context7: {
    command: "bunx",
    args: [
      "-y",
      "@upstash/context7-mcp",
      "--api-key",
      process.env.CONTEXT7_KEY!,
    ],
  },
};
  • Entries with a url use the HTTP transport (optional headers are supported, just like before).
  • Entries with npm (optionally command, args, env, cwd, stderr) use STDIO. The CLI runs command (defaults to npx) with [npm, ...args] and passes through env.
  • API keys can be provided either as CLI args (e.g., ["--api-key", process.env.CONTEXT7_KEY!]) or via the env map. Prefer env for secrets.
  • STDIO packages must already be installed in the environment the CLI runs in (global install, workspace dependency, or cached npx package).

Run npx @xmcp-dev/cli generate to produce the typed client files.

Optional CLI flags

  • -c, --clients <path>: Custom path to clients.ts (default src/clients.ts).
  • -o, --out <path>: Output directory (default src/generated).

Generated Output

For each client defined in clients.ts, the CLI generates a client.{name}.ts file containing:

  • Zod schemas for each tool's arguments
  • Type exports (e.g., GreetArgs)
  • Tool metadata objects
  • createRemoteToolClient() factory function
  • Pre-instantiated client export

An index file (client.index.ts) is always generated with a unified generatedClients object:

import { generatedClients } from "./generated/client.index";

await generatedClients.client1.greet({ name: "World" });
await generatedClients.client2.randomNumber();

Caveats

  • Server/process must be available — The CLI connects over HTTP or spawns the STDIO package to fetch tool definitions. Ensure the remote server is reachable or the npm package is installed and executable in your environment.
  • clients.ts required — The CLI generates clients only from the definitions you provide (or the path you pass with --clients).