Get the FREE Ultimate OpenClaw Setup Guide →

mcp

MCP server from shape-network/mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio shape-network-mcp-server node src/index.ts \
  --env CHAIN_ID="Network chain ID (360 for mainnet, 11011 for Sepolia/testnet)" \
  --env REDIS_URL="Optional: Redis URL for caching (e.g., redis://localhost:6379)" \
  --env SHAPE_RPC_URL="Your Shape node RPC URL (or use public node by default)" \
  --env ALCHEMY_API_KEY="Your Alchemy API key for NFT queries"

How to use

Shape MCP Server exposes a modular suite of tools for Shape on-chain data, including gasback analytics, NFT collection insights, Stack achievements, and network monitoring. The server is organized into categories such as /tools/network, /tools/nft, /tools/gasback, and /tools/stack, allowing agents to chain tools and build multi-step workflows. To start, run the server locally and point your MCP client (e.g., Cursor IDE or your preferred agent) to the running endpoint. Once connected, you can invoke tools like getChainStatus for RPC health and gas prices, getCollectionAnalytics to study NFT collection metrics, getShapeNft to enumerate an address’s Shape NFTs, getShapeCreatorAnalytics for creator earnings, and simulateGasbackRewards to estimate gasback earnings under different scenarios. The system supports optional Redis caching to speed up RPC-heavy queries and reduce load on upstream nodes. For testing, you can also use the deployed example URL provided in the docs, but note it is rate-limited and intended for sandbox use only. Tools are designed to be chained in prompts, enabling automated workflows such as “analyze collection liquidity, then pull top collectors, then simulate gasback for a creator.”

How to install

Prerequisites:

  • Node.js installed (preferred version aligned with the project, e.g., 16+)
  • yarn or npm for dependencies
  • Access to a Shape RPC endpoint and optional Redis for caching

Step-by-step:

  1. Clone the repository

  2. Install dependencies

    • yarn install // or: npm install
  3. Configure environment

    • Copy .env.example to .env
    • Edit .env with your credentials, e.g. ALCHEMY_API_KEY=your_key_here SHAPE_RPC_URL=https://your-shape-node CHAIN_ID=360 REDIS_URL=redis://localhost:6379 (optional)
  4. Run the server locally

    • yarn dev // or: npm run dev
  5. Verify locally

  6. Optional: Deploy

    • Fork the repo and deploy to your hosting environment (Vercel, etc.) and set the environment variables accordingly.

Notes:

  • If you modify the code, rebuild as needed (the exact build steps depend on your deployment target).
  • Ensure your MCP client configuration points to http://localhost:3002/mcp or your deployed URL.

Additional notes

Tips and common considerations:

  • Environment variables: SHAPE_RPC_URL, ALCHEMY_API_KEY, CHAIN_ID are essential for data access. REDIS_URL is optional but recommended for caching to improve performance.
  • RPC setup: You can use Shape’s public RPC endpoints or provide your own via SHAPE_RPC_URL to avoid public RPC limits.
  • Caching: Redis can significantly reduce RPC load for gasback and NFT queries; ensure Redis is reachable from your MCP server host.
  • Tool design: Tools are modular and auto-discovered under /tools/* folders. To add a new tool, place it in the appropriate category and implement the metadata/schema as shown in the docs.
  • Deployment: When deploying, reconfigure environment variables for production (e.g., SHAPE_RPC_URL, CHAIN_ID, ALCHEMY_API_KEY) and consider enabling rate limiting or authentication if exposing a public endpoint.

Related MCP Servers

Sponsor this space

Reach thousands of developers