TolcaCall the API

Check an npm or PyPI package before your AI agent installs it

Updated 2026-11-21

An AI coding agent that runs npm install or pip install on its own is running code from strangers. A typo in a package name (typosquatting), a package taken over by a new maintainer, or an install script that runs at install time can all reach your machine before anyone reads the code. This guide gives the manual checks first, free, then the one-call version Tolca offers.

1. Check the exact name

2. Check the registry page

A package created days ago with a famous name, or a package whose maintainer changed recently with no announcement, deserves a closer look before installation.

3. Check the install scripts

On npm, the package.json of the version you install may contain preinstall, install or postinstall scripts. These run on your machine during install. On PyPI, a source distribution (sdist) can run setup.py code during install, while a wheel usually does not. Read these before installing, or install with scripts disabled (npm install --ignore-scripts) when you can.

4. Check known advisories

A clean result does not mean the package is safe. It means no known advisory matched at the time of the check.

5. Decide, then pin

Install a specific version, record it in your lock file, and keep a note of why the package was chosen. An agent should not upgrade dependencies silently.

The one-call version

Tolca's pkg-check service (0.003 USD per call, paid per call over x402 or by the MCP tool) returns a verdict for an npm or PyPI package from the registry metadata and the checks above, in one call. Use it as a fast first filter. Keep the manual checks for anything that will run in production.

What this does not replace

A package check reads public metadata. It does not audit the source code, prove that a maintainer is trustworthy, or protect against a compromised but legitimate release. For code that handles payments, personal data or credentials, a code review and a pinned, reviewed version remain the standard.

Try it: Business Verification on the Apify Store ($0.05 per company, card payment) · for AI agents: POST https://tolca.tonbot.ca/v1/verify-business (x402, USDC on Base) · free in Claude or ChatGPT through MCP: https://tolca.tonbot.ca/mcp/public