@secondlayer/mcp 7.2.1 → 7.3.0

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 CHANGED
@@ -3,9 +3,10 @@
3
3
  Gives your coding agent direct access to the Stacks data on your own instance —
4
4
  Index (decoded rows), Subgraphs (tables you define, served from your instance),
5
5
  and Streams (raw inputs). Exposes the golden-path tools only: Index reads, the
6
- subgraph lifecycle, subscriptions, and contract discovery/scaffolding.
7
- Everything else (single-record lookups, mempool, stacking, proofs, codegen,
8
- credits, live Streams reads) is available over REST `/v1` + OpenAPI.
6
+ subgraph lifecycle, subscriptions, contract discovery/scaffolding, instance
7
+ status, archive verify/bootstrap, and hosted credits/quote. Everything else
8
+ (single-record lookups, mempool, stacking, proofs, live Streams reads) is
9
+ available over REST `/v1` + OpenAPI. There is no `consume` tool.
9
10
 
10
11
  ## Install
11
12
 
@@ -50,9 +51,12 @@ bunx -p @secondlayer/mcp secondlayer-mcp-http
50
51
 
51
52
  | Variable | Required | Default | Description |
52
53
  | --- | --- | --- | --- |
53
- | `INSTANCE_TOKEN` | Writes only | — | From `secondlayer init`. Required for write tools; reads are public. `SL_API_KEY` is a legacy alias. |
54
+ | `INSTANCE_TOKEN` | Writes only | — | From `secondlayer init`. Required for write tools; reads are public. `SL_API_KEY` is a legacy alias. Not valid for hosted credits. |
55
+ | `SL_ARCHIVE_API_KEY` | Hosted credits/quote/latest | — | `sk-sl_*` for `api.secondlayer.tools`. `INSTANCE_TOKEN` is the instance. |
54
56
  | `SL_API_URL` | No | `http://127.0.0.1:3800` | Instance API. |
55
57
  | `SECONDLAYER_API_URL` | No | — | Overrides `SL_API_URL`. |
58
+ | `SECONDLAYER_BIN` | CLI tools | `secondlayer` on PATH | Path to the CLI binary (`setup`, `bootstrap`, `repair`). |
59
+ | `SECONDLAYER_CWD` | CLI tools | process cwd | Compose project directory. |
56
60
  | `SECONDLAYER_MCP_PORT` | No | `3100` | HTTP transport port. |
57
61
  | `SECONDLAYER_MCP_SECRET` | No | — | Bearer token for HTTP auth. Disabled if unset. |
58
62
 
@@ -65,10 +69,16 @@ bunx -p @secondlayer/mcp secondlayer-mcp-http
65
69
  | **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` |
66
70
  | **Streams** (7) | `streams_tip`, `streams_events`, `streams_events_by_tx`, `streams_block_events`, `streams_canonical`, `streams_reorgs`, `streams_dumps` |
67
71
  | **Contracts** (2) | `contracts_find`, `contracts_get_abi` |
72
+ | **Instance** (1) | `instance_status` |
73
+ | **Archive** (5) | `archive_verify`, `archive_bootstrap`, `archive_repair`, `archive_latest`, `archive_quote` |
74
+ | **Setup** (1) | `setup` |
75
+ | **Credits** (1) | `credits_balance` (needs `SL_ARCHIVE_API_KEY`) |
68
76
  | **Account** (2) | `account_whoami`, `account_create_key` (only when pointed at `https://api.secondlayer.tools`) |
69
77
 
70
78
  Verify after mutating: `subgraphs_operations` for deploy/reindex/backfill/stop,
71
- `subscriptions_deliveries` for create/test/replay.
79
+ `subscriptions_deliveries` for create/test/replay. Empty index: `setup` or
80
+ `archive_bootstrap`, poll `instance_status` until decoders are ok, then
81
+ `archive_verify`, then `codegen_index_schema`.
72
82
 
73
83
  Periphery surfaces (single block/tx lookups, mempool, stacking, proofs,
74
84
  credits/caps, live Streams SSE) are REST-only: see the OpenAPI spec at the API