substreams-search-mcp 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -17
- package/package.json +24 -2
package/README.md
CHANGED
|
@@ -6,9 +6,13 @@
|
|
|
6
6
|
<img width="380" height="200" src="https://glama.ai/mcp/servers/@PaulieB14/substreams-search-mcp-server/badge" />
|
|
7
7
|
</a>
|
|
8
8
|
|
|
9
|
-
MCP server that lets AI agents search
|
|
9
|
+
MCP server that lets AI agents search, inspect, and analyze [Substreams](https://substreams.dev) packages — from registry discovery to sink deployment.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Tools
|
|
12
|
+
|
|
13
|
+
### `search_substreams`
|
|
14
|
+
|
|
15
|
+
Search the substreams.dev package registry.
|
|
12
16
|
|
|
13
17
|
| Parameter | Type | Default | Description |
|
|
14
18
|
|-----------|------|---------|-------------|
|
|
@@ -16,7 +20,58 @@ MCP server that lets AI agents search the [substreams.dev](https://substreams.de
|
|
|
16
20
|
| `sort` | string | `"most_downloaded"` | `most_downloaded`, `alphabetical`, `most_used`, `last_uploaded` |
|
|
17
21
|
| `network` | string | — | Filter by chain: `ethereum`, `solana`, `arbitrum-one`, etc. |
|
|
18
22
|
|
|
19
|
-
Returns
|
|
23
|
+
Returns package name, URL, creator, network, version, published date, and download count.
|
|
24
|
+
|
|
25
|
+
### `inspect_package`
|
|
26
|
+
|
|
27
|
+
Inspect a Substreams package (.spkg) to see its full module graph, protobuf types, and metadata.
|
|
28
|
+
|
|
29
|
+
| Parameter | Type | Description |
|
|
30
|
+
|-----------|------|-------------|
|
|
31
|
+
| `url` | string (required) | Direct URL to a `.spkg` file |
|
|
32
|
+
|
|
33
|
+
Returns:
|
|
34
|
+
- Package metadata (name, version, documentation, network)
|
|
35
|
+
- All modules with their kind (map/store/blockIndex), output types, and update policies
|
|
36
|
+
- Full DAG: each module's `dependsOn` and `dependedBy` relationships
|
|
37
|
+
- Input chain for each module (source blocks, other maps, stores with get/deltas mode, params)
|
|
38
|
+
- List of all protobuf output types and proto files
|
|
39
|
+
- Mermaid diagram of the module graph
|
|
40
|
+
|
|
41
|
+
### `list_package_modules`
|
|
42
|
+
|
|
43
|
+
Lightweight alternative to `inspect_package` — just the module names, types, and inputs/outputs.
|
|
44
|
+
|
|
45
|
+
| Parameter | Type | Description |
|
|
46
|
+
|-----------|------|-------------|
|
|
47
|
+
| `url` | string (required) | Direct URL to a `.spkg` file |
|
|
48
|
+
|
|
49
|
+
### `get_sink_config`
|
|
50
|
+
|
|
51
|
+
Analyze a package's sink configuration and generate ready-to-run CLI commands.
|
|
52
|
+
|
|
53
|
+
| Parameter | Type | Description |
|
|
54
|
+
|-----------|------|-------------|
|
|
55
|
+
| `url` | string (required) | Direct URL to a `.spkg` file |
|
|
56
|
+
|
|
57
|
+
Returns one of three results:
|
|
58
|
+
|
|
59
|
+
- **`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.
|
|
60
|
+
- **`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.
|
|
61
|
+
- **`no_sink_support`** — No sink-compatible modules. Lists all module output types so you know what custom consumer you'd need.
|
|
62
|
+
|
|
63
|
+
## Workflow
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
search_substreams("uniswap", network: "polygon")
|
|
67
|
+
→ find package, get spkg.io URL
|
|
68
|
+
|
|
69
|
+
inspect_package("https://spkg.io/creator/package-v1.0.0.spkg")
|
|
70
|
+
→ see module DAG, output types, what it produces
|
|
71
|
+
|
|
72
|
+
get_sink_config("https://spkg.io/creator/package-v1.0.0.spkg")
|
|
73
|
+
→ get SQL schema + CLI commands to deploy
|
|
74
|
+
```
|
|
20
75
|
|
|
21
76
|
## Quick Start (npx)
|
|
22
77
|
|
|
@@ -67,19 +122,8 @@ Add to `~/.claude/mcp.json`:
|
|
|
67
122
|
}
|
|
68
123
|
```
|
|
69
124
|
|
|
70
|
-
## Next Step: Sink Data to PostgreSQL
|
|
71
|
-
|
|
72
|
-
Found a package with `search_substreams`? Stream it into PostgreSQL with [create-substreams-sink-sql](https://www.npmjs.com/package/create-substreams-sink-sql):
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
npm init substreams-sink-sql my-sink
|
|
76
|
-
cd my-sink
|
|
77
|
-
# Edit substreams.yaml with your .spkg URL, then:
|
|
78
|
-
make up && make setup && make dev
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Scaffolds a complete project with Docker Postgres, pgweb UI, Makefile automation, and a step-by-step tutorial. No custom code needed.
|
|
82
|
-
|
|
83
125
|
## How it works
|
|
84
126
|
|
|
85
|
-
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.
|
|
127
|
+
- **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.
|
|
128
|
+
- **Inspect**: Uses [`@substreams/core`](https://github.com/substreams-js/substreams-js) to fetch and parse `.spkg` files (protobuf-encoded Substreams packages), extracting module definitions, DAG relationships, and proto type information.
|
|
129
|
+
- **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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "substreams-search-mcp",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "MCP server to search and inspect Substreams packages — browse the registry and introspect .spkg module graphs, protobuf types, and DAG dependencies",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -17,11 +17,33 @@
|
|
|
17
17
|
],
|
|
18
18
|
"keywords": [
|
|
19
19
|
"mcp",
|
|
20
|
+
"mcp-server",
|
|
21
|
+
"model-context-protocol",
|
|
20
22
|
"substreams",
|
|
23
|
+
"substreams-dev",
|
|
24
|
+
"spkg",
|
|
21
25
|
"blockchain",
|
|
26
|
+
"blockchain-data",
|
|
27
|
+
"streaming",
|
|
28
|
+
"indexer",
|
|
29
|
+
"the-graph",
|
|
30
|
+
"streamingfast",
|
|
31
|
+
"ethereum",
|
|
32
|
+
"solana",
|
|
33
|
+
"polygon",
|
|
34
|
+
"arbitrum",
|
|
35
|
+
"base",
|
|
36
|
+
"defi",
|
|
37
|
+
"web3",
|
|
22
38
|
"ai",
|
|
23
39
|
"claude",
|
|
24
|
-
"
|
|
40
|
+
"cursor",
|
|
41
|
+
"ai-agent",
|
|
42
|
+
"protobuf",
|
|
43
|
+
"module-graph",
|
|
44
|
+
"sink",
|
|
45
|
+
"sql-sink",
|
|
46
|
+
"data-pipeline"
|
|
25
47
|
],
|
|
26
48
|
"author": "PaulieB14",
|
|
27
49
|
"license": "MIT",
|