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

@mafdet/mcp

v0.1.4

Published

Mafdet AI MCP server — read-only account tools (models, balance, usage, subscription, docs) for Claude Code, Cursor, Codex, OpenCode, and Claude Desktop.

Readme

@mafdet/mcp

A Model Context Protocol server that brings read-only Mafdet AI account tools into Claude Code, Claude Desktop, Cursor, Codex CLI, OpenCode, and any other MCP client.

It does not run model inference — you keep calling Mafdet AI models through each tool's normal OpenAI-compatible endpoint. This server only exposes read-only account and documentation helpers.

What Mafdet AI is

Mafdet AI is an OpenAI-compatible AI gateway: one API key and one base URL reach models from several providers, billed by usage. Any tool or SDK that speaks the OpenAI API works by pointing its base URL and key at Mafdet AI.

  • Base URL: https://api.mafdet.ai/v1
  • Endpoints: /chat/completions, /embeddings, /audio/speech
  • Providers: Google (Gemini), Kimi (Moonshot), Qwen, DeepSeek
  • 30 models as of August 2026. The catalogue changes, so the authoritative list with current prices is models.json
  • Docs: https://docs.mafdet.ai

Tools

| Tool | Needs a key | What it does | | --- | --- | --- | | list_models | no | List Mafdet AI models with provider, tier, and per-1M-token pricing | | search_docs | no | Search the Mafdet AI documentation (titles, URLs, summaries) | | get_balance | yes | Your organization's wallet: balance, bonus, frozen, available | | get_usage_summary | yes | Requests, tokens, and charge over the last N days (1–90) | | get_subscription | yes | Current plan, status, period, and Playground credit |

The account tools are read-only — there is no key management, recharge, refund, subscription change, or any write operation.

Configuration

Set these environment variables (all optional):

  • MAFDET_API_KEY — a Mafdet AI key with the account:read scope. Only the account tools need it; list_models and search_docs work without a key. Create a key with the scope in the Console (API Keys → "Allow the local MCP server to read this account"). Prefer your client's secret/env configuration over putting the key on a command line.
  • MAFDET_BASE_URL — defaults to https://backend.mafdet.ai. Only change it for local/staging testing; it must be an https:// URL.
  • MAFDET_DOCS_URL — defaults to https://docs.mafdet.ai.

Client setup

Claude Code

claude mcp add mafdet --env MAFDET_API_KEY=sk-mafdet-live-... -- npx -y @mafdet/mcp

Claude Desktop / Cursor / other MCP clients

Add to the client's MCP config (claude_desktop_config.json, Cursor MCP settings, etc.):

{
  "mcpServers": {
    "mafdet": {
      "command": "npx",
      "args": ["-y", "@mafdet/mcp"],
      "env": { "MAFDET_API_KEY": "sk-mafdet-live-..." }
    }
  }
}

Codex CLI (~/.codex/config.toml)

[mcp_servers.mafdet]
command = "npx"
args = ["-y", "@mafdet/mcp"]
env = { MAFDET_API_KEY = "sk-mafdet-live-..." }

OpenCode (opencode.json)

{
  "mcp": {
    "mafdet": {
      "type": "local",
      "command": ["npx", "-y", "@mafdet/mcp"],
      "environment": { "MAFDET_API_KEY": "sk-mafdet-live-..." }
    }
  }
}

Omit MAFDET_API_KEY to use only the public tools (list_models, search_docs).

Notes

  • Pin a major version (@mafdet/mcp@0) in automated setups to avoid surprise upgrades.
  • The server writes only JSON-RPC to stdout; diagnostics go to stderr and never include your key.
  • Requires Node.js 20+.