Docs
Search⌘ K
  • Home
  • About The Graph
  • Supported Networks
  • Protocol Contracts
  • Subgraphs
    • Substreams
      • Token API
        • Hypergraph
          • AI Suite
            • Indexing
              • Graph Horizon
                • Resources
                  AI Suite > Substreams MCP

                  3 minutes

                  Substreams Search MCP

                  MCP server that lets AI agents search, inspect, and analyze Substreams⁠ packages — from registry discovery to sink deployment. Supports dual transport for local clients and SSE/HTTP for remote agents (OpenClaw, custom frameworks).

                  Tools

                  Search Substreams

                  search_substreams: Search the substreams.dev package registry.

                  ParameterTypeDefaultDescription
                  querystring (required)—Search term, e.g. "solana dex" or "uniswap"
                  sortstring"most_downloaded"most_downloaded, alphabetical, most_used, last_uploaded
                  networkstring—Filter by chain: ethereum, solana, arbitrum-one, etc.

                  Returns package name, URL, creator, network, version, published date, and download count.

                  Inspect Package

                  inspect_package: Inspect a Substreams package (.spkg) to see its full module graph, protobuf types, and metadata.

                  ParameterTypeDescription
                  urlstring (required)Direct URL to a .spkg file

                  Returns:

                  • Package metadata (name, version, documentation, network)
                  • All modules with their kind (map/store/blockIndex), output types, and update policies
                  • Full DAG: each module’s dependsOn and dependedBy relationships
                  • Input chain for each module (source blocks, other maps, stores with get/deltas mode, params)
                  • List of all protobuf output types and proto files
                  • Mermaid diagram of the module graph

                  List Package Modules

                  list_package_modules: Lightweight alternative to inspect_package — just the module names, types, and inputs/outputs.

                  ParameterTypeDescription
                  urlstring (required)Direct URL to a .spkg file

                  Get Sink Configuration

                  get_sink_config: Analyze a package’s sink configuration and generate ready-to-run CLI commands.

                  ParameterTypeDescription
                  urlstring (required)Direct URL to a .spkg file

                  Returns one of three results:

                  • sink_configured — Package has an embedded sink config. Extracts the SQL schema (for SQL sinks), identifies the sink module and type, and generates install, setup, and run commands with the correct network endpoint.
                  • no_sink_config_but_compatible_modules_found — No embedded config, but modules output sink-compatible types (e.g. DatabaseChanges). Identifies them and suggests how to wire up sinking.
                  • no_sink_support — No sink-compatible modules. Lists all module output types so you know what custom consumer you’d need.

                  Workflow

                  1search_substreams("uniswap", network: "polygon")2  → find package, get spkg.io URL34inspect_package("https://spkg.io/creator/package-v1.0.0.spkg")5  → see module DAG, output types, what it produces67get_sink_config("https://spkg.io/creator/package-v1.0.0.spkg")8  → get SQL schema + CLI commands to deploy

                  Quick Start (npx)

                  No installation needed:

                  Claude Desktop / Cursor / Claude Code

                  Add to your MCP config (claude_desktop_config.json, ~/.cursor/mcp.json, or ~/.claude/mcp.json):

                  1{2  "mcpServers": {3    "substreams-search": {4      "command": "npx",5      "args": ["substreams-search-mcp"]6    }7  }8}

                  OpenClaw / Remote Agents (SSE)

                  Start the server with the HTTP transport:

                  1# Dual transport — stdio + SSE on port 38492npx substreams-search-mcp --http34# SSE only (for remote/server deployments)5npx substreams-search-mcp --http-only67# Custom port8MCP_HTTP_PORT=4000 npx substreams-search-mcp --http

                  Then point your agent at the SSE endpoint:

                  1{2  "mcpServers": {3    "substreams-search": {4      "url": "http://localhost:3849/sse"5    }6  }7}

                  Transport Modes

                  InvocationTransportsUse case
                  npx substreams-search-mcpstdioClaude Desktop, Cursor, Claude Code
                  npx substreams-search-mcp --httpstdio + SSE :3849Dual — local + remote agents
                  npx substreams-search-mcp --http-onlySSE :3849OpenClaw, remote deployments

                  A /health endpoint is available at http://localhost:3849/health when HTTP transport is active.

                  How it works

                  • Search: The substreams.dev registry has no public API. This server scrapes the package listing pages, paginates through all results, deduplicates, and returns structured JSON. Multi-word queries search for the first word server-side and filter the rest client-side.
                  • Inspect: Uses @substreams/core⁠ to fetch and parse .spkg files (protobuf-encoded Substreams packages), extracting module definitions, DAG relationships, and proto type information.
                  • Sink config: Reads the embedded sinkConfig (a google.protobuf.Any field) from the package, decodes it based on the type URL, and maps networks to Substreams endpoints for correct CLI commands.

                  Acknowledgments

                  Thanks for PaulieB for creating the Substreams Search MCP⁠

                  ⁠Edit on GitHub⁠

                  Subgraph SkillsSubstreams Skills
                  On this page
                  • Tools
                  • Search Substreams
                  • Inspect Package
                  • List Package Modules
                  • Get Sink Configuration
                  • Workflow
                  • Quick Start (npx)
                  • Claude Desktop / Cursor / Claude Code
                  • OpenClaw / Remote Agents (SSE)
                  • Transport Modes
                  • How it works
                  • Acknowledgments
                  The GraphStatusTestnetBrand AssetsForumSecurityPrivacy PolicyTerms of Service