🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@mafdet/mcp

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mafdet/mcp

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

latest
npmnpm
Version
0.1.3
Version published
Weekly downloads
87
-28.1%
Maintainers
1
Weekly downloads
 
Created
Source

@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.

Tools

ToolNeeds a keyWhat it does
list_modelsnoList Mafdet AI models with provider, tier, and per-1M-token pricing
search_docsnoSearch the Mafdet AI documentation (titles, URLs, summaries)
get_balanceyesYour organization's wallet: balance, bonus, frozen, available
get_usage_summaryyesRequests, tokens, and charge over the last N days (1–90)
get_subscriptionyesCurrent 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+.

Keywords

mcp

FAQs

Package last updated on 20 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts