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

@weckr/mcp

v0.1.1

Published

Weckr MCP server — query your AI cost and margin data directly from Claude, Cursor, or any MCP-compatible client.

Readme

@weckr/mcp

Query your Weckr AI cost and margin data directly from Claude, Cursor, or any other MCP-compatible AI assistant.

Ask things like:

  • "Which of my users are losing me money this month?"
  • "What's my AI margin right now?"
  • "Which feature should I switch to a cheaper model?"
  • "Is my pricing sustainable given my actual AI costs?"
  • "Show me the feature cost breakdown."

Claude calls the Weckr API and gives you the real numbers from your dashboard, in the conversation.

Get an api key

Sign up at app.useweckr.com. Your wk_ key is shown once when you create a project — copy it. If you missed it, mint a new project at app.useweckr.com/dashboard/projects/new.

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "weckr": {
      "command": "npx",
      "args": ["-y", "@weckr/mcp"],
      "env": {
        "WECKR_API_KEY": "wk_your_key_here"
      }
    }
  }
}

Restart Claude Desktop. Try: "Use the Weckr tools to show me my AI costs this month."

Why npx and not npm install -g? Claude Desktop runs under launchd on macOS, which doesn't inherit your interactive shell's PATH. If you installed Node via nvm / asdf / volta, a globally-installed weckr-mcp binary usually isn't on Claude Desktop's PATH and the server fails to start with no diagnostic. npx -y @weckr/mcp sidesteps the PATH problem entirely.

Cursor

Add to .cursor/mcp.json at your project root (or ~/.cursor/mcp.json for global):

{
  "mcpServers": {
    "weckr": {
      "command": "npx",
      "args": ["-y", "@weckr/mcp"],
      "env": {
        "WECKR_API_KEY": "wk_your_key_here"
      }
    }
  }
}

Tools exposed

| Tool | Use it to ask | |---|---| | get_overview | "How am I doing this month?" — total cost, revenue, margin, requests, unprofitable user count | | get_users | "Which users are unprofitable?" / "Show me my top-cost users." — per-user margin (filterable) | | get_feature_breakdown | "Which features cost me the most?" — per-feature cost share | | get_model_recommendations | "Where can I cut AI cost?" — same-provider cheaper-model swaps with $-saving estimate | | get_pricing_recommendations | "Is my pricing sustainable?" — per-plan margin health + recommended price | | get_spending_cap_url | Returns the dashboard URL where caps are edited (does NOT mutate state) |

Configuration

| Env var | Required | Default | Notes | |---|---|---|---| | WECKR_API_KEY | yes | — | Your wk_ key from app.useweckr.com | | WECKR_PROJECT_ID | no | resolved from /api/v1/me | Optional: pre-set the project UUID to skip one round-trip on startup | | WECKR_BASE_URL | no | https://app.useweckr.com | Override for self-hosted Weckr. Your wk_ key is sent here on every request — do not set this to a host you do not control. Only https:// is accepted (loopback http:// allowed for dev). |

How it works

The MCP server is a tiny stdio process spawned by your AI client. It calls the Weckr HTTP API using your wk_ key (server-to-server, no JWT needed). The api key authoritatively identifies one project — the server uses it to resolve projectId once at startup, then scopes every subsequent call to that project. The dashboard endpoints (/api/v1/stats, /users, /recommendations/*) verify the URL project id matches the api key's project and return 404 on mismatch, so a leaked api key cannot be used to read another project's data.

No prompt text or completion text is sent anywhere by this package — the tools only read aggregated stats. The api key never leaves your local process except to the URL configured via WECKR_BASE_URL (default app.useweckr.com). If you change WECKR_BASE_URL, the SDK prints a stderr warning so you can spot a copy-paste config that points at the wrong host.

Troubleshooting

Claude Desktop shows "weckr — server disconnected" with no error. Likely a PATH issue — switch to the npx -y @weckr/mcp form above. To see the actual error from the spawn, run the server manually in a terminal: WECKR_API_KEY=wk_... npx -y @weckr/mcp. Anything wrong (missing api key, 401 from Weckr, network issue) prints to stderr.

Weckr API 401 on /api/v1/me. Your WECKR_API_KEY is empty, malformed, revoked, or pasted with a trailing space. Confirm a working key by visiting app.useweckr.com/dashboard/projects/new and creating a fresh project.

Tools show "Project not found or forbidden" (404). You set WECKR_PROJECT_ID to a UUID that doesn't belong to the project the api key owns. Remove WECKR_PROJECT_ID so the server resolves the right project id from the api key.

Local development

git clone https://github.com/Ghiles3232/weckr-sdks
cd weckr-sdks/mcp
npm install
npm run build

# Smoke-test against production:
WECKR_API_KEY=wk_... node dist/index.js
# (prints "weckr-mcp running on stdio" to stderr, then waits for JSON-RPC on stdin)

To point at a local Weckr backend:

WECKR_API_KEY=wk_... WECKR_BASE_URL=http://localhost:3000 node dist/index.js

Source

Open source at github.com/Ghiles3232/weckr-sdks.

License

MIT