@secondlayer/mcp 6.0.1 → 7.0.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 +14 -14
- package/dist/bin-http.js +226 -140
- package/dist/bin-http.js.map +15 -14
- package/dist/bin.js +226 -140
- package/dist/bin.js.map +15 -14
- package/dist/index.js +226 -140
- package/dist/index.js.map +15 -14
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ bun add @secondlayer/mcp
|
|
|
15
15
|
|
|
16
16
|
## Auth
|
|
17
17
|
|
|
18
|
-
Most reads are public — `index_*` and `contracts_find` work with no key. Subgraph tools need an `SL_API_KEY`; separately, **public** subgraphs are anon-readable over HTTP at `GET /v1/subgraphs/<name>/<table>` (`{ rows, next_cursor, tip }` cursor envelope), while private ones need the owning account's key (anon → 404). `streams_dumps` needs no key — the dumps manifest is public; the tool only needs `SL_STREAMS_DUMPS_URL` configured. Writes (deploy, reindex, delete, subscriptions) need a key: set `SL_API_KEY` to the `INSTANCE_TOKEN` that `secondlayer init` wrote for your instance. Read `secondlayer://context` first — it reports auth state and read-auth tiers.
|
|
18
|
+
Most reads are public — `index_*` and `contracts_find` work with no key. Subgraph tools need an `SL_API_KEY`; separately, **public** subgraphs are anon-readable over HTTP at `GET /v1/subgraphs/<name>/<table>` (`{ rows, next_cursor, tip }` cursor envelope), while private ones need the owning account's key (anon → 404). `streams_dumps` needs no key — the dumps manifest is public; the tool only needs `SL_STREAMS_DUMPS_URL` configured. Every other `streams_*` tool is key-mandatory (keyless → 401). Writes (deploy, reindex, delete, subscriptions) need a key: set `SL_API_KEY` to the `INSTANCE_TOKEN` that `secondlayer init` wrote for your instance. Read `secondlayer://context` first — it reports auth state and read-auth tiers.
|
|
19
19
|
|
|
20
20
|
## Quick Start — Stdio (IDE)
|
|
21
21
|
|
|
@@ -58,18 +58,22 @@ bunx -p @secondlayer/mcp secondlayer-mcp-http
|
|
|
58
58
|
| Domain | Tools |
|
|
59
59
|
| --- | --- |
|
|
60
60
|
| **Index** (9) | `index_events`, `index_ft_transfers`, `index_nft_transfers`, `index_contract_calls`, `index_blocks`, `index_transactions`, `index_print_schema`, `index_discover`, `batch_query` |
|
|
61
|
-
| **Subgraphs** (
|
|
62
|
-
| **Subscriptions** (
|
|
63
|
-
| **Streams** (
|
|
64
|
-
| **Contracts** (2) | `contracts_find`, `
|
|
65
|
-
| **
|
|
61
|
+
| **Subgraphs** (12) | `subgraphs_list`, `subgraphs_status`, `subgraphs_spec`, `subgraphs_scaffold`, `subgraphs_deploy`, `subgraphs_delete`, `subgraphs_query`, `subgraphs_backfill`, `subgraphs_reindex`, `subgraphs_stop`, `subgraphs_operations`, `subgraphs_gaps` |
|
|
62
|
+
| **Subscriptions** (13) | `subscriptions_create`, `subscriptions_list`, `subscriptions_get`, `subscriptions_update`, `subscriptions_delete`, `subscriptions_test`, `subscriptions_pause`, `subscriptions_resume`, `subscriptions_rotate_secret`, `subscriptions_deliveries`, `subscriptions_dead`, `subscriptions_requeue`, `subscriptions_replay` |
|
|
63
|
+
| **Streams** (7) | `streams_tip`, `streams_events`, `streams_events_by_tx`, `streams_block_events`, `streams_canonical`, `streams_reorgs`, `streams_dumps` |
|
|
64
|
+
| **Contracts** (2) | `contracts_find`, `contracts_get_abi` |
|
|
65
|
+
| **Account** (2) | `account_whoami`, `account_create_key` |
|
|
66
|
+
|
|
67
|
+
Verify after mutating: `subgraphs_operations` for deploy/reindex/backfill/stop,
|
|
68
|
+
`subscriptions_deliveries` for create/test/replay.
|
|
66
69
|
|
|
67
70
|
Periphery surfaces (single block/tx lookups, mempool, stacking, proofs,
|
|
68
|
-
|
|
69
|
-
|
|
71
|
+
credits/caps, live Streams SSE) are REST-only: see the OpenAPI spec at the API
|
|
72
|
+
host. Following the chain over MCP means polling `streams_events` with a cursor.
|
|
70
73
|
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
Point the server at your instance with `SL_API_URL` (default
|
|
75
|
+
`http://127.0.0.1:3800`). Writes and account tools use `INSTANCE_TOKEN` from
|
|
76
|
+
`secondlayer init`.
|
|
73
77
|
|
|
74
78
|
### `subscriptions_create` kinds
|
|
75
79
|
|
|
@@ -79,10 +83,6 @@ a webhook on raw chain events (contract / event / function / trait) with no
|
|
|
79
83
|
subgraph (e.g. `[{ "type": "contract_call", "contractId": "SP....amm",
|
|
80
84
|
"functionName": "swap-*" }]`).
|
|
81
85
|
|
|
82
|
-
### Subgraph visibility
|
|
83
|
-
|
|
84
|
-
Deploys default `public` — the name is claimed in a single global public namespace (409 `PUBLIC_NAME_TAKEN` if claimed). Public subgraphs are anon-readable at `GET /v1/subgraphs/<name>/<table>`.
|
|
85
|
-
|
|
86
86
|
### `subgraphs_query` enhancements
|
|
87
87
|
|
|
88
88
|
- `fields` — comma-separated column projection (e.g. `"sender,amount_x"`)
|