Menu

1 / 5

How to Build an MCP Server That Checks npm Packages Before AI Installs Them

#hackernoon#technology#request#server#client
Long article (2998 words) — no AI summary yet.
Reading 0:00
15s threshold

Build a remote MCP server on Cloudflare Workers with the 2026-07-28 spec and TypeScript SDK v2. It checks npm packages for typos, deprecation and known vulnerabilities before your AI installs them.

AI coding assistants are good at writing npm install lines. They're less good at knowing whether the package in that line is real, abandoned, or a trap.

I wanted my assistant to check before it suggests anything. So I built a small MCP server for it: two tools, running on Cloudflare Workers, using the new stateless MCP spec from July 2026. It's free to host and needs no API keys.

This post walks through the build. It also covers the parts that surprised me, and a few of them changed how the tools work.

What we're building

The server is called pkgscout. It exposes two tools:

inspect_package tells the model whether a package exists, its latest version, weekly downloads, license, repository, and whether it's deprecated.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.