dexe-setup
What this does
A guided onboarding journey for dexe-mcp. The plugin ships with sane public
defaults, so reads work the moment it's installed — no keys required. This
skill's job is to explain that reality and then help the user unlock the parts
that do need a key, one tier at a time, always saying what they lose by
skipping. It drives from the dexe_doctor tool — no guessing which file or key.
The two-tier reality (say this first)
Open by orienting the user:
Reads already work — DAO info, treasury, holders, proposals, subgraph
queries, IPFS reads all run on shared public defaults with zero setup.
You only need to configure something to write or to create DAOs/
proposals. Want me to walk you through it, or are reads all you need?
If reads are all they need: confirm they're done, mention dexe_doctor is there
if anything misbehaves, and stop.
When to invoke
- The user types
/dexe-setup.
- The user says "set up dexe", "enable writes", "I want to create a DAO/
proposal", "how do I configure dexe-mcp?".
- You see a tool result containing any of:
"DEXE_PINATA_JWT is required",
"Missing required env", "public RPC unstable", "public IPFS gateways are failing", env.sharedDefaults — invoke proactively.
Hard rules (do not violate)
- Never write
DEXE_* values to .claude.json. The MCP host's env block
SHADOWS .env silently. Write env to a .env file the server actually
loads. For a plugin / npx install that is ~/.dexe-mcp/.env (the
cwd-independent home config — works from any folder on any OS; same dir as
state.json). Only a source checkout uses the repo-root .env. Since
0.23.1 the server loads $DEXE_ENV_FILE → <cwd>/.env → ~/.dexe-mcp/.env
→ <pkgdir>/.env; the doctor/banner shows which file it loaded. Do NOT put
config in a project .env for plugin use — the plugin's working directory is
not your project, so it is silently missed.
- Never write
DEXE_PRIVATE_KEY without explicit user opt-in. Signing is
available by default via WalletConnect (below) — reach for a hot key only if
the user insists, and warn it lives in plaintext on disk.
- Always tell the user to restart Claude Code after editing
.env.
process.loadEnvFile() runs once at startup; mid-session edits do nothing
until restart.
- Cap the doctor loop at 3 iterations. After three doctor → fix → restart
cycles still failing, stop and present the full report for manual triage.
The setup tiers (walk in order; for each, state what breaks if skipped)
Tier 0 — Reads (nothing to do)
On-chain reads, subgraph reads, backend reads, IPFS reads all work on shared
public defaults. Skip cost: none. The only downside is the shared Graph API
key + public RPC/IPFS gateways are rate-limited and billable-shared — fine for
light use, upgrade under Tier 3 for heavy use.
Tier 1 — Signing (to vote / execute / broadcast)
WalletConnect is available by default (shared project id). To sign: run
dexe_wc_connect, scan the QR with a wallet, approve each tx on your phone. No
key touches disk.
- Skip cost: you can build calldata and read, but can't broadcast.
- Optional: set your own
DEXE_WALLETCONNECT_PROJECT_ID (free at
cloud.reown.com) to stop sharing the default id.
- Only if the user insists on unattended/CI signing → hot key ladder below.
Tier 2 — Creating DAOs / proposals (the one hard blocker)
Creating a DAO or proposal pins metadata to IPFS, which needs a Pinata JWT
(DEXE_PINATA_JWT). This is the only thing reads/signing can't default around.
- Skip cost:
dexe_dao_create, dexe_proposal_create, and metadata uploads
refuse up front (no on-chain tx is attempted).
- How to get one (say this to non-technical users): sign up free at
https://app.pinata.cloud → API Keys → New Key → enable
pinJSONToIPFS and
pinFileToIPFS → copy the JWT.
- Validate it before saving:
GET https://api.pinata.cloud/data/testAuthentication
with header Authorization: Bearer <jwt> should return {"message": "Congratulations! ..."}. (The npx dexe-mcp init wizard does this check for you.)
Tier 3 — Reliability upgrades (optional, offer when errors appear)
- Private RPC — if a read fails with "public RPC unstable": set
DEXE_RPC_URL_MAINNET (chain 56) / DEXE_RPC_URL_TESTNET (chain 97) to an
Alchemy / QuickNode / Ankr URL. Skip cost: occasional rate-limit flakiness.
- Dedicated IPFS gateway — if a read fails with "public IPFS gateways are
failing": set
DEXE_IPFS_GATEWAY (a free Pinata dedicated gateway comes with
your JWT — https://<subdomain>.mypinata.cloud). Skip cost: slower/flaky
metadata reads.
- Own Graph key — if
dexe_doctor shows env.sharedDefaults: set your own
DEXE_SUBGRAPH_*_URL (with your Graph key embedded, or DEXE_GRAPH_API_KEY).
Skip cost: you share a rate-limited, billable key.
Algorithm
- Call
dexe_doctor (no input).
- Read
summary and checks from the structured response.
- Success is
summary.failures === 0 — equivalently summary.advisoryOnly
when there are warnings. Reads are healthy; ask which tier (if any) the user
wants, and don't block on warnings.
summary.status === "pass" means zero warnings AND zero failures. A
zero-config install always carries warnings (public RPC, shared defaults),
so status is "warn" there and never reaches "pass" — treating it as
the success test loops fix → restart forever with nothing left to fix.
- Treat
warn checks (chain.publicRpcFallback, env.sharedDefaults) as
offers, not problems.
- For each
fail or the user's chosen tier, collect the env key(s). Use the
check's remediation verbatim for network failures.
- Batch questions by tier/category with
AskUserQuestion — one question per
tier, not one per key. Only ask for what the chosen tier needs.
- Locate the
.env the server loads (the doctor/banner shows the path). For a
plugin/npx install use ~/.dexe-mcp/.env (create the .dexe-mcp dir if
absent); for a source checkout use the repo-root .env (where package.json
lives). When unsure, prefer ~/.dexe-mcp/.env — it loads on every OS from any
folder.
- Edit that
.env with the Edit tool: replace the key's line if present, else
append KEY=value (preserve the trailing newline).
- Tell the user, verbatim:
Edits saved to .env. Restart Claude Code so the new values load
(quit and relaunch). Then I'll re-run dexe_doctor to confirm.
- After restart, re-run
dexe_doctor. If still failing, go to step 3. Iterate
at most 3 times.
- After 3 iterations still failing, present the full
checks array — remaining
issues need manual triage (bad credentials, suspended account, paid-plan
required, corporate proxy).
Signer mode escalation
If the user wants signing beyond phone-approval WalletConnect, walk this ladder
(top = safest):
- WalletConnect (default).
dexe_wc_connect → approve on phone. No key on
disk. This is already available; prefer it.
- Safe multisig (
DEXE_SAFE_TX_SERVICE_URL). Proposes tx to a Safe; owners
co-sign separately.
- Hot key (
DEXE_PRIVATE_KEY). Plaintext on disk. Convenient for CI bots,
dangerous for humans. Show this before writing:
Setting DEXE_PRIVATE_KEY stores your key in plaintext at .env. Anyone
who reads the file can drain that wallet. Are you sure you don't want
WalletConnect (already available) or a Safe multisig instead?
- Refuse to proceed to a hot key without an explicit "yes" confirming the
trade-off.
.env precedence trap
If dexe_doctor returns a check named env.<KEY> with "shadowed by host env
block", the same key is defined in BOTH .env and .claude.json. The host
wins. Tell them to keep it in one place (prefer .env) and restart.
Useful tools (reference)
dexe_doctor — diagnostic (read-only, safe to call repeatedly).
dexe_context — signer/mode + env readiness + usingSharedDefaults list.
npx dexe-mcp doctor — CLI form; useful when the MCP server failed to start.
It exits 0 when nothing failed (warnings included), 2 on a real failure
or an unknown flag; pass --strict (or set DEXE_DOCTOR_STRICT=1) to make
warnings exit 1 instead, which is what a CI gate wants and a setup session
does not.
npx dexe-mcp init — fresh-start wizard (prompts + live-validates Pinata JWT).
Overwrites .env; use for new installs, not for fixing an existing setup.
1---2name: dexe-setup3description: Guided setup journey for dexe-mcp. Explains that reads work with ZERO config, then walks the user through only the keys that unlock more — signing, DAO/ proposal creation (Pinata JWT), and optional reliability upgrades — telling them for each one exactly what breaks if they skip it. Drives from `dexe_doctor`, edits `.env` (NEVER `.claude.json`), and tells them to restart. Triggered by `/dexe-setup`, or proactively when a tool reports a missing key ("DEXE_PINATA_JWT is required…", "public RPC unstable", "shared public defaults").4---56# dexe-setup78## What this does910A guided onboarding journey for `dexe-mcp`. The plugin ships with sane public11defaults, so **reads work the moment it's installed** — no keys required. This12skill's job is to explain that reality and then help the user unlock the parts13that *do* need a key, one tier at a time, always saying what they lose by14skipping. It drives from the `dexe_doctor` tool — no guessing which file or key.1516## The two-tier reality (say this first)1718Open by orienting the user:1920> **Reads already work** — DAO info, treasury, holders, proposals, subgraph21> queries, IPFS reads all run on shared public defaults with zero setup.22> You only need to configure something to **write** or to **create DAOs/23> proposals**. Want me to walk you through it, or are reads all you need?2425If reads are all they need: confirm they're done, mention `dexe_doctor` is there26if anything misbehaves, and stop.2728## When to invoke2930- The user types `/dexe-setup`.31- The user says "set up dexe", "enable writes", "I want to create a DAO/32 proposal", "how do I configure dexe-mcp?".33- You see a tool result containing any of: `"DEXE_PINATA_JWT is required"`,34 `"Missing required env"`, `"public RPC unstable"`, `"public IPFS gateways35 are failing"`, `env.sharedDefaults` — invoke proactively.3637## Hard rules (do not violate)38391. **Never write `DEXE_*` values to `.claude.json`.** The MCP host's env block40 SHADOWS `.env` silently. Write env to a `.env` file the server actually41 loads. For a **plugin / `npx` install** that is **`~/.dexe-mcp/.env`** (the42 cwd-independent home config — works from any folder on any OS; same dir as43 `state.json`). Only a **source checkout** uses the repo-root `.env`. Since44 0.23.1 the server loads `$DEXE_ENV_FILE` → `<cwd>/.env` → `~/.dexe-mcp/.env`45 → `<pkgdir>/.env`; the doctor/banner shows which file it loaded. Do NOT put46 config in a project `.env` for plugin use — the plugin's working directory is47 not your project, so it is silently missed.482. **Never write `DEXE_PRIVATE_KEY` without explicit user opt-in.** Signing is49 available by default via WalletConnect (below) — reach for a hot key only if50 the user insists, and warn it lives in plaintext on disk.513. **Always tell the user to restart Claude Code after editing `.env`.**52 `process.loadEnvFile()` runs once at startup; mid-session edits do nothing53 until restart.544. **Cap the doctor loop at 3 iterations.** After three doctor → fix → restart55 cycles still failing, stop and present the full report for manual triage.5657## The setup tiers (walk in order; for each, state what breaks if skipped)5859### Tier 0 — Reads (nothing to do)60On-chain reads, subgraph reads, backend reads, IPFS reads all work on shared61public defaults. **Skip cost: none.** The only downside is the shared Graph API62key + public RPC/IPFS gateways are rate-limited and billable-shared — fine for63light use, upgrade under Tier 3 for heavy use.6465### Tier 1 — Signing (to vote / execute / broadcast)66WalletConnect is **available by default** (shared project id). To sign: run67`dexe_wc_connect`, scan the QR with a wallet, approve each tx on your phone. No68key touches disk.69- **Skip cost:** you can build calldata and read, but can't broadcast.70- Optional: set your own `DEXE_WALLETCONNECT_PROJECT_ID` (free at71 cloud.reown.com) to stop sharing the default id.72- Only if the user *insists* on unattended/CI signing → hot key ladder below.7374### Tier 2 — Creating DAOs / proposals (the one hard blocker)75Creating a DAO or proposal pins metadata to IPFS, which needs a **Pinata JWT**76(`DEXE_PINATA_JWT`). This is the only thing reads/signing can't default around.77- **Skip cost:** `dexe_dao_create`, `dexe_proposal_create`, and metadata uploads78 refuse up front (no on-chain tx is attempted).79- How to get one (say this to non-technical users): sign up free at80 https://app.pinata.cloud → API Keys → New Key → enable `pinJSONToIPFS` and81 `pinFileToIPFS` → copy the JWT.82- Validate it before saving: `GET https://api.pinata.cloud/data/testAuthentication`83 with header `Authorization: Bearer <jwt>` should return `{"message":84 "Congratulations! ..."}`. (The `npx dexe-mcp init` wizard does this check for you.)8586### Tier 3 — Reliability upgrades (optional, offer when errors appear)87- **Private RPC** — if a read fails with *"public RPC unstable"*: set88 `DEXE_RPC_URL_MAINNET` (chain 56) / `DEXE_RPC_URL_TESTNET` (chain 97) to an89 Alchemy / QuickNode / Ankr URL. **Skip cost:** occasional rate-limit flakiness.90- **Dedicated IPFS gateway** — if a read fails with *"public IPFS gateways are91 failing"*: set `DEXE_IPFS_GATEWAY` (a free Pinata dedicated gateway comes with92 your JWT — `https://<subdomain>.mypinata.cloud`). **Skip cost:** slower/flaky93 metadata reads.94- **Own Graph key** — if `dexe_doctor` shows `env.sharedDefaults`: set your own95 `DEXE_SUBGRAPH_*_URL` (with your Graph key embedded, or `DEXE_GRAPH_API_KEY`).96 **Skip cost:** you share a rate-limited, billable key.9798## Algorithm991001. Call `dexe_doctor` (no input).1012. Read `summary` and `checks` from the structured response.102 - **Success is `summary.failures === 0`** — equivalently `summary.advisoryOnly`103 when there are warnings. Reads are healthy; ask which tier (if any) the user104 wants, and don't block on warnings.105 - `summary.status === "pass"` means zero warnings AND zero failures. A106 zero-config install always carries warnings (public RPC, shared defaults),107 so `status` is `"warn"` there and never reaches `"pass"` — treating it as108 the success test loops fix → restart forever with nothing left to fix.109 - Treat `warn` checks (`chain.publicRpcFallback`, `env.sharedDefaults`) as110 *offers*, not problems.1113. For each `fail` or the user's chosen tier, collect the env key(s). Use the112 check's `remediation` verbatim for network failures.1134. Batch questions by tier/category with `AskUserQuestion` — one question per114 tier, not one per key. Only ask for what the chosen tier needs.1155. Locate the `.env` the server loads (the doctor/banner shows the path). For a116 plugin/`npx` install use `~/.dexe-mcp/.env` (create the `.dexe-mcp` dir if117 absent); for a source checkout use the repo-root `.env` (where `package.json`118 lives). When unsure, prefer `~/.dexe-mcp/.env` — it loads on every OS from any119 folder.1206. Edit that `.env` with the Edit tool: replace the key's line if present, else121 append `KEY=value` (preserve the trailing newline).1227. Tell the user, verbatim:123 > Edits saved to `.env`. **Restart Claude Code** so the new values load124 > (quit and relaunch). Then I'll re-run `dexe_doctor` to confirm.1258. After restart, re-run `dexe_doctor`. If still failing, go to step 3. Iterate126 at most 3 times.1279. After 3 iterations still failing, present the full `checks` array — remaining128 issues need manual triage (bad credentials, suspended account, paid-plan129 required, corporate proxy).130131## Signer mode escalation132133If the user wants signing beyond phone-approval WalletConnect, walk this ladder134(top = safest):1351361. **WalletConnect (default).** `dexe_wc_connect` → approve on phone. No key on137 disk. This is already available; prefer it.1382. **Safe multisig (`DEXE_SAFE_TX_SERVICE_URL`).** Proposes tx to a Safe; owners139 co-sign separately.1403. **Hot key (`DEXE_PRIVATE_KEY`).** Plaintext on disk. Convenient for CI bots,141 dangerous for humans. Show this before writing:142 > Setting `DEXE_PRIVATE_KEY` stores your key in plaintext at `.env`. Anyone143 > who reads the file can drain that wallet. Are you sure you don't want144 > WalletConnect (already available) or a Safe multisig instead?1454. Refuse to proceed to a hot key without an explicit "yes" confirming the146 trade-off.147148## .env precedence trap149150If `dexe_doctor` returns a check named `env.<KEY>` with "shadowed by host env151block", the same key is defined in BOTH `.env` and `.claude.json`. The host152wins. Tell them to keep it in one place (prefer `.env`) and restart.153154## Useful tools (reference)155156- `dexe_doctor` — diagnostic (read-only, safe to call repeatedly).157- `dexe_context` — signer/mode + env readiness + `usingSharedDefaults` list.158- `npx dexe-mcp doctor` — CLI form; useful when the MCP server failed to start.159 It exits **0** when nothing failed (warnings included), **2** on a real failure160 or an unknown flag; pass `--strict` (or set `DEXE_DOCTOR_STRICT=1`) to make161 warnings exit **1** instead, which is what a CI gate wants and a setup session162 does not.163- `npx dexe-mcp init` — fresh-start wizard (prompts + live-validates Pinata JWT).164 Overwrites `.env`; use for new installs, not for fixing an existing setup.