importprobe
Queries the public npm registry to verify package existence, age, popularity, and deprecation, and downloads published tarballs to inspect real exports and APIs without installing them.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
importprobe
Catch what your AI coding agent made up — before it runs.
AI assistants write code that is almost right: an import from a package that
doesn't exist, a function the package never exported, a method from a different
library or an older major version, a dependency nobody added to package.json.
importprobe checks every import and API call against the real package.
$ npx importprobe
src/hallucinated.tsx
2:26 ✖ error react-router-dom@7.18.6 has no export named "useHistory".
→ note: "useHistory" was removed: it last existed in v5 (react-router-dom@5.3.4).
3:10 ✖ error react-dom@19.3.1 has no export named "render".
→ note: "render" was removed: it last existed in v18 (@types/react-dom@18.3.7).
5:10 ✖ error dayjs@1.11.23 has no export named "addDays".
→ note: "addDays" is exported by date-fns (already in your package.json).
16:33 ✖ error "emailAddress" does not exist on ZodString (from zod@4.6.7).
→ did you mean: .email
18:5 ✖ error "listenAsync" does not exist on Express (from @types/express-serve-static-core@5.1.3).
→ did you mean: .listen
src/api.ts
3:30 ✖ error "axios-retry-pro" does not exist on npm — most likely made up by an AI.
→ did you mean: axios-retry, axios-pro, retry-proWhat it checks
Problem | Example | Rule |
Package doesn't exist |
|
|
Package is brand new / barely used (slopsquatting risk) | an invented name someone registered last week |
|
Real package, not in package.json, not installed |
|
|
Works only by accident (transitive) |
|
|
Export doesn't exist |
|
|
Method doesn't exist — directly or in a chain |
|
|
Entry point doesn't exist |
|
|
Node built-ins |
|
|
Local files | missing file, wrong export name, default import of a named-only module |
|
And it explains why, so the fix is obvious:
"was removed in vX" / "was added in vY" — checks older and newer majors of the package (or its
@types)."is exported by date-fns (already in your package.json)" — the AI mixed up two libraries.
"did you mean" — closest real names, preferring runnable values over type-only exports.
It checks the real package without installing it. When a package isn't
installed, importprobe downloads the published tarball, keeps only declaration /
JS / package.json files, and reads them with the TypeScript checker. Nothing from
the package is ever executed — no install scripts, no require.
Chained-call checks only report members missing from types that a package's
own declaration files define. Your project's types, augmentations
(declare global, declare module) and tsconfig paths/types are respected.
Related MCP server: BabelsHoard
Use it
npx importprobe # current folder
npx importprobe src/ app.tsx # files or folders
npx importprobe --changed # only files changed in git
npx importprobe --fast # imports + direct members only, no network hints
npx importprobe --json # for tools
npx importprobe --sarif > importprobe.sarif # GitHub code scanningExit code 1 when errors are found (--strict: warnings too), 0 when clean.
In a monorepo each file is checked against its own nearest package.json.
Let your AI agent fix its own mistakes (Claude Code hook)
Add to .claude/settings.json. After every file the agent writes, importprobe
checks it; if anything is invented, the agent gets the list back and fixes it.
{
"hooks": {
"PostToolUse": [
{ "matcher": "Write|Edit|MultiEdit",
"hooks": [{ "type": "command", "command": "npx -y importprobe hook" }] }
]
}
}Let your agent look things up instead of guessing (MCP)
claude mcp add importprobe -- npx -y importprobe mcpTool | What the agent gets |
| The real API of a package or built-in, with signatures; or the members of one export (methods, what a call returns, class instance members). Installed version, or any version from npm. |
| Does it exist? How old, how popular, deprecated? Similar real names if not. |
| Everything the CLI checks, as agent-ready feedback. |
Works with any MCP client (Cursor, VS Code, Windsurf…): command npx, args ["-y", "importprobe", "mcp"].
GitHub Actions
- run: npx importprobe --sarif > importprobe.sarif || true
- uses: github/codeql-action/upload-sarif@v3
with: { sarif_file: importprobe.sarif }How it works
Pre-scans files for module specifiers (static, dynamic
import(),require, re-exports).For each package: is it declared? installed? on npm? how old, how popular?
Fetches declarations for packages that aren't installed (+ matching-major
@types/*).Builds one TypeScript program (with your project's
.d.tsfiles and resolution settings) and asks the checker what each module really exports and what each value really has.For misses, looks at other major versions and your other dependencies to explain them.
Exports inferred from plain-JavaScript packages (no types) can be incomplete, so those findings are warnings, not errors.
Privacy
Only public registry endpoints are called (registry.npmjs.org,
api.npmjs.org), and only with package names. Your code never leaves your
machine. Results are cached in one folder (%LOCALAPPDATA%\importprobe\cache,
$XDG_CACHE_HOME/importprobe or ~/.cache/importprobe; override with
IMPORTPROBE_CACHE). --offline disables the network entirely.
Development
npm install
npm run demo:setup # installs both sample apps' dependencies (scripts disabled)
npm run demo # run against test/fixtures/ai-app
npm test
IMPORTPROBE_DEBUG=1 npx importprobe # phase timings (=files: biggest packages loaded)License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Live npm and UNPKG data for AI agents: resolution, audits, import maps, malware/CVE checks.
Real-time package and vulnerability data (Python, npm, Cargo, Go, and more) for AI coding agents.
Verify npm packages before your AI agent installs them: hallucinations, advisories, API drift.
Check npm/PyPI packages exist and that a function or method exists in an exact package version.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI coding agents to automatically verify npm packages against the live registry before installation, flagging hallucinated, slopsquatted, or otherwise suspicious packages with risk verdicts.MIT
- AlicenseAqualityBmaintenanceProvides a local, version-exact API index for installed Python and TypeScript packages, enabling accurate lookups and static code checking that catches hallucinated or misused APIs without executing the code.9MIT
- FlicenseNot gradedqualityAmaintenanceEnables Claude Code and other MCP clients to retrieve context-aware documentation, type signatures, and code examples for any npm package, along with cross-version migration guides, error diagnosis, package comparison, and dependency scanning. Results are formatted to match query intent and drawing on real package types, changelogs, and GitHub docs.-
- FlicenseNot gradedqualityAmaintenanceEnables Claude Code and other MCP clients to retrieve real-time TypeScript signatures, documentation, and examples for any npm package, with intent-aware formatting, version migration insights, error diagnosis, package comparison, and dependency scanning. It supports natural-language queries, documentation-first search, and production-grade caching without requiring curated package setup.-