Skip to content
MCP server

Pkgtruth

Catches hallucinated and slopsquatted npm and PyPI packages before an agent installs them.

Runs locallyStatus and history
Install
Pricing
Open source
Runs
Locally
Version
0.2.2
Listing updated
6 days ago

About Pkgtruth

Pkgtruth is an open-source MCP server. It runs locally on your machine and is started by your AI client.

Install

Run in a terminal

claude mcp add pkgtruth -- npx -y pkgtruth

Add to claude_desktop_config.json

{
  "mcpServers": {
    "pkgtruth": {
      "command": "npx",
      "args": [
        "-y",
        "pkgtruth"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "pkgtruth": {
      "command": "npx",
      "args": [
        "-y",
        "pkgtruth"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "pkgtruth": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "pkgtruth"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "pkgtruth": {
      "command": "npx",
      "args": [
        "-y",
        "pkgtruth"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "pkgtruth": {
      "command": "npx",
      "args": [
        "-y",
        "pkgtruth"
      ]
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Configuration

  • PKGTRUTH_REGISTRYAlternate npm registry to verify against. Defaults to https://registry.npmjs.org.
  • PKGTRUTH_DOWNLOADS_APIAlternate downloads API used for adoption figures. Defaults to https://api.npmjs.org.
  • PKGTRUTH_CACHE_DIRWhere adoption figures are cached between runs. Defaults to ~/.cache/pkgtruth.
  • PKGTRUTH_TIMEOUT_MSPer-request timeout in milliseconds. Defaults to 8000.

Pricing

Open source

Pkgtruth FAQ

Is Pkgtruth free?

Yes. Pkgtruth is open source, so you can use and self-host it for free.

How do I add Pkgtruth to Claude Code?

Run this command in your terminal: claude mcp add pkgtruth -- npx -y pkgtruth

Where this comes from

  • Description: from the official MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers