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 🙏

© 2025 – Pkg Stats / Ryan Hefner

plasmascan-mcp

v0.1.1

Published

Model Context Protocol server exposing PlasmaScan contract data

Readme

PlasmaScan MCP Server

A Model Context Protocol (MCP) server that exposes PlasmaScan (Routescan) contract data so LLM agents can fetch verified contract ABIs, source code, deployer information, and event logs.

Features

  • plasmascan_get_contract – returns ABI, source code, metadata, and optional deployment info for a verified contract.
  • plasmascan_get_contract_logs – queries contract events with optional block boundaries, pagination, and topic filters.
  • plasmascan_get_contract_creation – fetches deployer address and creation transaction hash for up to five contracts.
  • plasmascan_get_transaction_status / plasmascan_get_transaction_receipt_status – inspect transaction execution and receipt flags.
  • plasmascan_get_token_* and plasmascan_get_address_* – gather ERC-20 and ERC-721 metadata, balances, holders, and supply snapshots.
  • Resource template plasmascan://contract/{address} for loading contract details directly into context.

Prerequisites

  • Node.js 18 or newer

Installation

npm install

Configuration

Environment variables (optionally via .env) control which PlasmaScan instance is queried:

  • PLASMASCAN_API_KEY – API key, if you have one (not required for low-volume access).
  • PLASMASCAN_NETWORK_ID – Network scope, defaults to mainnet.
  • PLASMASCAN_CHAIN_ID – Chain identifier, defaults to 9745 (Plasma mainnet).
  • PLASMASCAN_BASE_URL – Override the full Routescan/Etherscan-compatible endpoint.
  • PLASMASCAN_TIMEOUT_MS – HTTP timeout in milliseconds (defaults to 15000).

Development

Run the MCP server over stdio:

npm run dev

Build transpiled output:

npm run build

The compiled entry point is written to dist/index.js and can be executed with npm start.

Codex CLI Integration

Add the server to Codex by updating config.toml (or the appropriate config file):

[mcp_servers.plasmascan]
command = "npx"
args = ["plasmascan-mcp@latest"]
env = {}

Adjust the args path if the repository lives elsewhere or if you prefer running the TypeScript entry point (e.g., replace with "./node_modules/.bin/tsx", "src/index.ts").

CLI Usage

After running npm run build, you can launch the MCP server directly via:

npx plasmascan-mcp

The npx command invokes the package's bin script (dist/index.js), so make sure the compiled output exists.

Tool Reference

plasmascan_get_contract

Input

{
  "address": "0x...",
  "includeSource": true,
  "includeAbi": true,
  "includeMetadata": true,
  "includeCreation": true
}

Returns a JSON blob describing the contract. The include* flags are optional booleans that default to true.

plasmascan_get_contract_logs

Input

{
  "address": "0x...",
  "fromBlock": 0,
  "toBlock": 0,
  "page": 1,
  "offset": 100,
  "topics": ["0x..."]
}

All parameters except address are optional. Up to four topics are supported.

plasmascan_get_contract_creation

Accepts either a single address or an addresses array (max length 5) and returns deployer information.

plasmascan_get_transaction_status

Input

{
  "txHash": "0x..."
}

Returns status and (if available) a message describing the execution outcome.

plasmascan_get_transaction_receipt_status

Input is the same as above; output contains the receipt status flag.

plasmascan_get_token_supply

{
  "contractAddress": "0x..."
}

Outputs { "contractAddress": "0x...", "totalSupply": "..." }.

plasmascan_get_token_supply_history

{
  "contractAddress": "0x...",
  "blockNumber": 8000000
}

Returns the ERC-20 supply at the requested block.

plasmascan_get_token_balance

{
  "contractAddress": "0x...",
  "holderAddress": "0x...",
  "tag": "latest"
}

tag defaults to latest and also accepts earliest or pending.

plasmascan_get_token_balance_history

Same parameters as plasmascan_get_token_balance, but replace tag with blockNumber to capture a historical snapshot.

plasmascan_get_token_holder_list

{
  "contractAddress": "0x...",
  "page": 1,
  "offset": 10
}

Returns the holder list (and count) for the contract.

plasmascan_get_token_info

Fetches the PlasmaScan metadata for an ERC-20; output includes raw payload plus decoded name, symbol, and decimals.

plasmascan_get_address_token_holdings

Lists ERC-20 balances owned by an address.

plasmascan_get_address_nft_holdings

Lists ERC-721 holdings (all contracts) owned by an address.

plasmascan_get_address_nft_inventory

Filters ERC-721 holdings for an address down to a specific NFT contract.

Resource Template

  • plasmascan://contract/{address} – loads the same payload returned by plasmascan_get_contract (all optional fields included) as a JSON document.
  • plasmascan://token/{address} – returns token metadata and total supply for a contract.

Notes

  • PlasmaScan free tier allows 2 requests per second with up to 10,000 calls per day.
  • All HTTP requests honour the configured timeout and surface structured MCP errors when PlasmaScan signals a failure.