npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@reneturcios/traplens

v0.1.0

Published

Dated, verified API breakages for coding agents: look up traps by provider or by error text, file new traps, and confirm whether known traps are still true. A local bridge to the hosted Footgun MCP service. One bin serves a small CLI and a stdio MCP serve

Readme

traplens

traplens gives a coding agent a memory for other people's API breakages. Before writing code against a third-party service, look up that provider and get back up to ten verified, dated failure modes, each with its symptoms, its cause, a fix, a code example, and the date it was last checked. When a call fails instead, paste the error text and search for traps whose symptoms match it. After a failure has been fixed, file a new trap so the next agent does not lose the same hours, and after hitting or avoiding a known trap, confirm whether it is still true.

The bridge keeps no trap data of its own. It serves the upstream Footgun server's tool list locally, exactly as captured from the live endpoint, and forwards each tool call upstream, returning the result untouched.

Tools

  • lookup_traps — traps for a provider. Required: provider (slug or common name, e.g. "stripe"). Optional: surface (part of the service, ranks matches first only), context (one-line task description), and include_stale.
  • search_traps — traps matching error text. Required: error_text (4 to 4000 characters; known key and secret formats are redacted before matching). Optional: provider and include_stale.
  • file_trap — draft a trap after a failure was fixed. Required: provider, surface_type (one of api, sdk, ui, billing, infra, tool), surface_name, title, symptoms, cause, fix, apply, and affected. Optional: sources, tags, and visibility (private by default, public to submit to the shared registry).
  • confirm_trap — record whether a trap is still true. Required: trap_id and still_true. Optional: hours_lost and version_seen.

Configuration

  • FOOTGUN_MCP_URL (optional) — override the upstream endpoint. Defaults to https://getfootgun.com/api/mcp. (The override hook is this rebuild's own labelled reconstruction.)
  • FOOTGUN_API_KEY (optional) — when set, every upstream request carries an Authorization: Bearer <key> header. When it is not set, no key header is sent. (The header name is pinned by the registry record; the Bearer scheme and this forwarding are labelled reconstructions — the original surface was captured keyless.)

Forwarding mechanics

On the first tool call the client opens a streamable HTTP session with the upstream: a JSON-RPC initialize request (protocolVersion 2025-03-26, clientInfo name traplens), then a notifications/initialized notification, then the tools/call request carrying the caller's arguments unchanged. When the upstream answers initialize with an Mcp-Session-Id header, that value rides on every later request of the session, which is reused for the life of the process. Replies may arrive as plain JSON or as server-sent events; both are read.

Successful upstream results pass through verbatim, including any isError flag the upstream sets. Failures — a JSON-RPC error, a non-2xx status, an unreadable response, or a request that cannot be completed — come back as an isError result whose text starts with traplens error: (this rendering is this rebuild's own labelled reconstruction).

CLI

Each tool is also a subcommand taking one JSON argument string:

npx @reneturcios/traplens lookup_traps '{"provider":"stripe"}'
npx @reneturcios/traplens search_traps '{"error_text":"No such payment_method"}'
npx @reneturcios/traplens confirm_trap '{"trap_id":"fg-0158","still_true":true}'
npx @reneturcios/traplens --version

Exit codes: 0 on success, 1 on an isError result, 2 on a usage error.

MCP server

npx -y @reneturcios/traplens mcp

MCP client config:

{
  "mcpServers": {
    "traplens": {
      "command": "npx",
      "args": ["-y", "@reneturcios/traplens", "mcp"]
    }
  }
}

Docker

docker run -i ghcr.io/cloudcorprecords/traplens
docker run --rm ghcr.io/cloudcorprecords/traplens --version

The container's default command is mcp, so the first form is a stdio MCP server; any other arguments reach the CLI normally.

Development

npm install
npm run build
npm test
npm run dev

The test suite runs entirely against a stubbed JSON-RPC upstream — no live network calls.

License

MIT — see LICENSE.