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

@pyai/mcp

v0.2.0

Published

Model Context Protocol server for the PyAI voice API — lets AI coding agents (Cursor, Claude Code, Codex) get a sandbox key and call PyAI (TTS, STT, voices) directly instead of guessing endpoints.

Downloads

91

Readme

@pyai/mcp — PyAI Model Context Protocol server

Exposes the PyAI voice API as MCP tools so AI coding agents (Cursor, Claude Code, Codex) can go from zero to a working PyAI call with no human steps — the agent can mint its own free sandbox key and then call PyAI directly instead of guessing endpoints. Zero runtime dependencies.

Tools

| Tool | Needs a key? | Maps to | |------|--------------|---------| | create_sandbox_key | No | POST /v1/sandbox/keys — mint a free pyai_test_ key (no email/card), adopted for the session | | get_started | No | Curated quickstart (auth, SDK install, TTS/STT/realtime snippets) — no network/credits | | whoami | Yes | GET /v1/me (scopes, env, credit posture) | | list_models | Yes | GET /v1/models | | list_voices | Yes | GET /v1/voices (optional gender, region) | | synthesize_speech | Yes | POST /v1/audio/speech → writes audio to output_path | | create_transcription_job | Yes | POST /v1/transcription/jobs (async STT for an audio_url) | | get_transcription_job | Yes | GET /v1/transcription/jobs/{id} |

The contract is https://api.pyai.com/openapi.json; these tools wrap a curated subset. No key is required to start — if PYAI_API_KEY is unset, an agent calls create_sandbox_key first and the server adopts the minted key for the rest of the session. Errors (402 credit, 429 rate limit, etc.) surface as MCP tool errors with the stable code.

Install

The server runs straight from npm with npx — no clone, no build.

Cursor — one click

Add to Cursor

Click the button (Cursor decodes the install config and prompts you), or add this to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):

{
  "mcpServers": {
    "pyai": {
      "command": "npx",
      "args": ["-y", "@pyai/mcp"]
    }
  }
}

Add "env": { "PYAI_API_KEY": "pyai_test_..." } to pin a key, or leave it out and let the agent call create_sandbox_key.

Claude Code

claude mcp add pyai -- npx -y @pyai/mcp
# or pin a key:
claude mcp add pyai --env PYAI_API_KEY=pyai_test_... -- npx -y @pyai/mcp

Codex / other MCP hosts

Point the host at the stdio command npx -y @pyai/mcp, optionally with PYAI_API_KEY in the environment. The transport is newline-delimited JSON-RPC 2.0 over stdio.

Config (env)

  • PYAI_API_KEYoptional. A pyai_live_/pyai_test_ key. Omit it to let the agent mint a sandbox key.
  • PYAI_BASE_URL — optional, defaults to https://api.pyai.com.
  • PORT — optional, HTTP transport only (default 8080).

HTTP transport (experimental)

npx @pyai/mcp --http starts a minimal HTTP JSON-RPC endpoint (POST /, GET /health) — the basis for a hosted remote server at mcp.pyai.com. A per-request Authorization: Bearer <key> overrides the env key. Each HTTP request gets an isolated client, so a key minted by create_sandbox_key is returned to that caller but is not retained globally for later callers. This is not yet a full MCP Streamable HTTP server (SSE, session ids, and OAuth are deploy-time follow-ups); the supported install today is npx over stdio.

Develop

npm install        # dev-only: typescript + @types/node
npm test           # node --test (no network; fetch is injected)
npm run typecheck
npm run build      # emit dist/ (tsc rewrites .ts imports → .js)

src/rpc.ts (dispatch) is transport-pure and unit-tested; src/tools.ts holds the tool definitions + operation logic; src/client.ts is the fetch wrapper; src/http.ts is the experimental HTTP transport. Add a tool by extending TOOLS + the callTool switch.