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

sourcify-4byte-mcp

v1.0.1

Published

MCP server that decodes EVM function/error/event signatures via the Sourcify 4byte API

Readme

sourcify-4byte-mcp

An MCP server that decodes EVM signatures via the Sourcify signature database (OpenChain-compatible 4byte API). Give it function/error selectors or event topic hashes and it returns human-readable signatures, ranking real, on-chain-verified candidates first.

Tools

  • decode_signature{ hashes: string[], filter?: boolean, verifiedOnly?: boolean } Decode 4-byte function/error selectors (0x + 8 hex) and 32-byte event topic0 hashes (0x + 64 hex), 1-50 per call. Hashes are auto-routed by length; the 0x prefix is optional. The best (unfiltered + on-chain-verified) candidate is shown first.
    • 0xa9059cbbtransfer(address,uint256) [verified on-chain]
    • 0xbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595EmergencyWithdraw(address,uint256,uint256)
  • search_signature{ query: string, filter?: boolean, verifiedOnly?: boolean } Search signatures by name with * / ? wildcards (case-sensitive; upstream returns up to 100 matches, each hash's candidate list capped by SOURCIFY_MAX_RESULTS).

filter defaults to true (hides junk/spam signatures); set it false to see every raw candidate.

verifiedOnly defaults to true (shows only signatures backed by an on-chain-verified contract). If a hash has no verified candidate, it falls back to listing the unverified ones, flagged as only unverified results found. Each candidate list is capped at SOURCIFY_MAX_RESULTS entries (default 20), with a trailing +N more when truncated.

Install / run

Runs on Node (≥22) via npx, or directly under Bun for development.

As an MCP server

# Add to ~/.claude.json under mcpServers
claude mcp add --scope user sourcify-4byte -- npx -y sourcify-4byte-mcp

# Add to ~/.claude.json under projects[cwd].mcpServers
claude mcp add --scope local sourcify-4byte -- npx -y sourcify-4byte-mcp

# Add to ./.mcp.json
claude mcp add --scope project sourcify-4byte -- npx -y sourcify-4byte-mcp

Restart the session to load it. Tools then appear as mcp__sourcify-4byte__decode_signature / …__search_signature. (The npm package is sourcify-4byte-mcp; the server identity — and therefore the tool prefix — is sourcify-4byte.)

To remove:

# Remove from ~/.claude.json under mcpServers
claude mcp remove --scope user sourcify-4byte

# Remove from ~/.claude.json under projects[cwd].mcpServers
claude mcp remove --scope local sourcify-4byte

# Remove from ./.mcp.json
claude mcp remove --scope project sourcify-4byte

Configuration

| Env var | Default | Purpose | | ---------------------- | -------------------------------- | ------------------------------------------------ | | SOURCIFY_API_URL | https://api.4byte.sourcify.dev | Upstream signature-database base | | SOURCIFY_TIMEOUT_MS | 20000 | Per-request timeout in ms | | SOURCIFY_MAX_RESULTS | 20 | Max candidates listed per hash before +N more |

Development

bun install
bun run dev          # run the server from source (speaks MCP over stdio)
bun run typecheck    # tsc --noEmit (strict)
bun run lint         # biome check .
bun test             # unit + handler tests
bun run build        # bundle to dist/index.js (Node-targeted, executable)
node dist/index.js --version   # also: --help

bun run dev and bun test use Bun; the published artifact (dist/index.js) is plain Node-compatible ESM and is what runs via npx.

Troubleshooting

  • Tools don't appear — confirm the mcpServers entry and restart the client; npx needs network access on first run to fetch the package.
  • "Sourcify request timed out" — the upstream API was slow or unreachable; raise SOURCIFY_TIMEOUT_MS or check connectivity.
  • "Sourcify API returned HTTP …" — upstream returned an error; retry, or point SOURCIFY_API_URL at a known-good endpoint.

License

MIT — see LICENSE.