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

subgraph-mcp-skills

v1.0.0

Published

AI agent skills for querying The Graph subgraphs via MCP tools. Works with Claude Code, Cursor, Gemini CLI, and more.

Readme

Subgraph MCP Skills

Give your AI agents access to 15,000+ blockchain subgraphs through natural language

This repository provides comprehensive documentation and skills for integrating The Graph's Subgraph MCP (Model Context Protocol) into AI agents. Query blockchain data conversationally without writing GraphQL.

What is Subgraph MCP?

Subgraph MCP is an open-source implementation of Anthropic's Model Context Protocol that connects AI assistants to The Graph's decentralized data network. It enables:

  • Schema Discovery - Access GraphQL schemas for any subgraph on The Graph Network
  • Query Execution - Run GraphQL queries on any subgraph deployment
  • Subgraph Search - Find subgraphs by keyword or contract address
  • Usage Analytics - Retrieve 30-day query volumes for deployments
  • Natural Language - Ask questions about blockchain data without writing GraphQL

Quick Start

Need Help? Let an AI Agent Set It Up!

If you're not sure how to configure MCP, just ask your AI assistant:

"Help me set up Subgraph MCP"

The agent can walk you through the entire setup process interactively, including getting your API key and configuring your client. See Agent-Assisted Setup for how this works.

Manual Setup

1. Get Your API Key

  1. Go to Subgraph Studio
  2. Connect your wallet (MetaMask, Coinbase Wallet, WalletConnect, or Safe)
  3. Navigate to API Keys tab
  4. Click Create API Key
  5. Name your key and save it securely

See Getting API Keys for detailed instructions.

2. Configure Your AI Client

Choose your AI client and follow the setup guide:

| Client | Guide | Config File | |--------|-------|-------------| | Claude Desktop | Setup Guide | claude_desktop_config.json | | Claude Code (CLI) | Setup Guide | ~/.claude/settings.json | | Cursor | Setup Guide | ~/.cursor/mcp.json | | Cline | Setup Guide | cline_mcp_settings.json | | OpenClaw | Setup Guide | ~/.openclaw/openclaw.json |

3. Basic Configuration

Add this to your MCP config file (replace YOUR_API_KEY):

{
  "mcpServers": {
    "subgraph": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "--header",
        "Authorization:${AUTH_HEADER}",
        "https://subgraphs.mcp.thegraph.com/sse"
      ],
      "env": {
        "AUTH_HEADER": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Subgraph MCP Server

Endpoint: https://subgraphs.mcp.thegraph.com/sse

Authentication: Gateway API Key from Subgraph Studio

Access: 15,000+ subgraphs covering DeFi, NFTs, DAOs, governance, and more

Available Tools

| Tool | Description | |------|-------------| | get_schema | Retrieve GraphQL schema by deployment ID, Subgraph ID, or IPFS hash | | execute_query | Run GraphQL queries against any subgraph deployment | | search_subgraphs | Find subgraphs by keyword or contract address | | get_subgraph_info | Get metadata and deployment details | | get_query_volume | Retrieve 30-day query statistics |

Querying Subgraphs

You Don't Need to Know Deployment IDs!

Just describe what you want in natural language:

"Find Uniswap subgraphs and show me the top pools"
"Search for lending protocol subgraphs"
"What subgraphs track ENS domains?"

The AI will search The Graph Network and find the right subgraph for you.

Or Use Specific Deployment IDs (Optional)

For precise control, you can specify a deployment ID:

"Query subgraph 5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV for top 10 pools"

See Popular Subgraphs for common deployment IDs.

Example Queries

"What are the top Uniswap V3 pools by volume?"

"Show me the GraphQL schema for the ENS subgraph"

"Find subgraphs related to Aave lending protocol"

"What's the 30-day query volume for the Compound subgraph?"

"Search for subgraphs that index contract 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984"

See Example Queries for 100+ more examples.

AI Agent Skills

This repo includes skill definitions for integrating subgraph capabilities into AI agent frameworks:

Documentation

| Document | Description | |----------|-------------| | Agent-Assisted Setup | Let an AI agent configure MCP for you | | Getting API Keys | How to obtain and manage API keys | | Popular Subgraphs | Common subgraph deployment IDs | | Claude Desktop Setup | Configure Claude Desktop app | | Claude Code Setup | Configure Claude Code CLI | | Cursor Setup | Configure Cursor IDE | | Cline Setup | Configure Cline extension | | OpenClaw Setup | Configure OpenClaw multi-channel assistant | | Troubleshooting | Common issues and solutions |

Prerequisites

  • Node.js 18+ installed and in your PATH (Node 22+ for OpenClaw)
  • npx or bunx available
  • Wallet for signing into Subgraph Studio (MetaMask, etc.)
  • AI Client - Claude Desktop, Claude Code, Cursor, Cline, or OpenClaw

Security Best Practices

  • Store API keys in environment variables, never hardcode
  • Use domain restrictions in Subgraph Studio
  • Set spending limits on API keys
  • Regenerate keys if compromised

Resources

Contributing

Contributions welcome! Please open an issue or PR.

License

MIT