@buildaureon/mcp 0.1.8 → 0.1.9

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/docs/setup.md CHANGED
@@ -1,347 +1,347 @@
1
- # Setup Guide
2
-
3
- Complete installation and host configuration for **`@buildaureon/mcp`** `v0.1.1` against the live AUREON API.
4
-
5
- This package is a **stdio** [Model Context Protocol](https://modelcontextprotocol.io) server. It wraps [`@buildaureon/sdk`](https://github.com/buildaureon/aureon-sdk) and exposes **54 tools** so Cursor, Claude Desktop, and other MCP hosts can call the Financial Compass control plane.
6
-
7
- Related docs: [Authentication](./auth.md) · [Tools](./tools.md) · [Agent guide](./agent-guide.md) · [Architecture](./architecture.md) · [Security](./security.md) · [Package README](../README.md)
8
-
9
- ---
10
-
11
- ## What this guide covers
12
-
13
- - What you need before connecting an agent
14
- - Environment variables the MCP process reads
15
- - How to create an issued developer API key
16
- - Cursor and Claude Desktop config (published package first)
17
- - Running via `npx` without a permanent install
18
- - Building from a source clone (optional)
19
- - Smoke prompts to verify the wire is live
20
- - Troubleshooting table, FAQ, and a final checklist
21
-
22
- If you only want auth semantics (key vs Bearer vs private key), skip ahead to [./auth.md](./auth.md).
23
-
24
- ---
25
-
26
- ## What you need
27
-
28
- | Requirement | Notes |
29
- | --- | --- |
30
- | **Node.js 20+** | ESM runtime. Check with `node -v`. |
31
- | **Issued developer API key** | Issue the key on the **same** API you will call. Local mainnet: Developers on `http://127.0.0.1:5174`. Public testnet: [app.aureonlabs.network](https://app.aureonlabs.network) → **Developers** (still chain 46630). Plaintext is shown once. |
32
- | **Network access** | Default is local mainnet `http://127.0.0.1:8788` (chain 4663). Optional `AUREON_NETWORK=testnet` uses `https://api.aureonlabs.network` (still 46630). |
33
- | **MCP host** | Cursor, Claude Desktop, or any client that can launch a stdio MCP server. |
34
-
35
- You do **not** need a wallet Bearer token for day-to-day control-plane tools when you use an issued key.
36
-
37
- You do **not** need a private key inside MCP. Private keys are only for signing and broadcasting vault deposit/withdraw transactions **outside** the MCP process after prepare tools return unsigned steps.
38
-
39
- The MCP server never custodies funds and never signs chain transactions.
40
-
41
- ---
42
-
43
- ## Package at a glance
44
-
45
- | Item | Value |
46
- | --- | --- |
47
- | npm package | `@buildaureon/mcp` |
48
- | Version | `0.1.1` |
49
- | Depends on | `@buildaureon/sdk` |
50
- | Transport | stdio MCP (JSON-RPC over stdin/stdout) |
51
- | Tool count | 47 |
52
- | Default API | `http://127.0.0.1:8788` (4663). Public host is opt-in testnet 46630. |
53
- | Console | [app.aureonlabs.network](https://app.aureonlabs.network) |
54
-
55
- Primary launch command (recommended for hosts):
56
-
57
- ```bash
58
- npx -y @buildaureon/mcp
59
- ```
60
-
61
- ---
62
-
63
- ## Environment variables
64
-
65
- The process reads these at startup. Put them in your MCP host `env` block (Cursor / Claude), not in chat transcripts.
66
-
67
- | Variable | Required | Default | Description |
68
- | --- | --- | --- | --- |
69
- | `AUREON_API_KEY` | **Preferred** | — | Issued developer key (`aureon_…`). Product access **and** wallet identity for control-plane tools. |
70
- | `AUREON_AUTH_TOKEN` | Optional | — | Wallet Bearer session. Wins over key identity when both are present on a request. |
71
- | `AUREON_NETWORK` | Optional | `mainnet` | Omit for local mainnet 4663 / 8788. Set `testnet` for the public host (still 46630). |
72
- | `AUREON_API_URL` | Optional | mainnet `http://127.0.0.1:8788` | Override URL. Must match `AUREON_NETWORK` if both are set. |
73
-
74
- At least one of `AUREON_API_KEY` or `AUREON_AUTH_TOKEN` must be set or the server refuses to start.
75
-
76
- **Recommendation:** set only `AUREON_API_KEY` for local mainnet. Add `AUREON_NETWORK=testnet` only if you want the public host (still 46630).
77
-
78
- Never put a wallet private key in MCP env. Prepare tools return unsigned calldata; the host wallet signs elsewhere.
79
-
80
- ---
81
-
82
- ## Create an issued developer API key
83
-
84
- 1. Open [https://app.aureonlabs.network](https://app.aureonlabs.network).
85
- 2. Complete invite / early-access flow if prompted, then connect your wallet.
86
- 3. Open **Developers**.
87
- 4. Create a key with a clear label (for example `cursor-mcp` or `claude-desktop`).
88
- 5. Copy the secret immediately — plaintext is shown once.
89
- 6. Paste it into your MCP host config as `AUREON_API_KEY`.
90
- 7. If the secret leaks, pause or revoke it from the same Developers page and issue a replacement.
91
-
92
- That key binds control-plane calls to your wallet. You do not need a separate Bearer handshake for normal agent work.
93
-
94
- ---
95
-
96
- ## Cursor configuration
97
-
98
- ### Option A — published package (recommended)
99
-
100
- Create or edit `.cursor/mcp.json` in the project, or merge into your user MCP config:
101
-
102
- ```json
103
- {
104
- "mcpServers": {
105
- "aureon": {
106
- "command": "npx",
107
- "args": ["-y", "@buildaureon/mcp"],
108
- "env": {
109
- "AUREON_API_KEY": "aureon_...."
110
- }
111
- }
112
- }
113
- }
114
- ```
115
-
116
- Restart Cursor (or reload MCP servers). Confirm **aureon** appears under MCP / tools.
117
-
118
- Ask a smoke prompt such as: *“Use aureon_ping, then aureon_me.”*
119
-
120
- Issue the key on the same network this process will call. A public-console key does not authenticate the local 8788 mainnet API. To hit the public host (still 46630), add `"AUREON_NETWORK": "testnet"`.
121
-
122
- ### Option B — from a local build
123
-
124
- Use this only when you are iterating on a clone of the package. Replace the working directory with your own clone path.
125
-
126
- ```json
127
- {
128
- "mcpServers": {
129
- "aureon": {
130
- "command": "node",
131
- "args": ["dist/index.js"],
132
- "cwd": "/path/to/your/clone/mcp",
133
- "env": {
134
- "AUREON_API_KEY": "aureon_...."
135
- }
136
- }
137
- }
138
- }
139
- ```
140
-
141
- Build first (`pnpm build` or `npm run build` inside the MCP package) so `dist/index.js` exists.
142
-
143
- Prefer Option A for everyday agent use. Local `cwd` configs are for contributors and package development.
144
-
145
- ---
146
-
147
- ## Claude Desktop configuration
148
-
149
- Merge the same shape into Claude Desktop’s MCP config file (location depends on your OS; Claude’s docs describe where `claude_desktop_config.json` lives).
150
-
151
- ```json
152
- {
153
- "mcpServers": {
154
- "aureon": {
155
- "command": "npx",
156
- "args": ["-y", "@buildaureon/mcp"],
157
- "env": {
158
- "AUREON_API_KEY": "aureon_...."
159
- }
160
- }
161
- }
162
- }
163
- ```
164
-
165
- Restart Claude Desktop after saving. In a new chat, ask the model to list AUREON tools or call `aureon_ping`.
166
-
167
- For a from-source Claude entry, use `node` + `dist/index.js` with `"cwd": "/path/to/your/clone/mcp"` the same way as Cursor Option B.
168
-
169
- Example templates also ship in the package under `examples/cursor.mcp.json` and `examples/claude-desktop.json`.
170
-
171
- ---
172
-
173
- ## Run with npx (no permanent install)
174
-
175
- From a terminal, with the key in the environment:
176
-
177
- ```bash
178
- export AUREON_API_KEY=aureon_....
179
- # omit AUREON_API_URL for local mainnet 8788 / 4663
180
- # export AUREON_NETWORK=testnet # public host, still 46630
181
-
182
- npx -y @buildaureon/mcp
183
- ```
184
-
185
- On Windows PowerShell:
186
-
187
- ```powershell
188
- $env:AUREON_API_KEY = "aureon_...."
189
- # omit AUREON_API_URL for local mainnet 8788 / 4663
190
- # $env:AUREON_NETWORK = "testnet" # public host, still 46630
191
- npx -y @buildaureon/mcp
192
- ```
193
-
194
- The process speaks MCP on stdio. Running it in a bare terminal is mainly useful to confirm it starts; hosts like Cursor attach automatically when configured.
195
-
196
- You can also add the package to a project:
197
-
198
- ```bash
199
- npm install @buildaureon/mcp
200
- # or
201
- pnpm add @buildaureon/mcp
202
- ```
203
-
204
- Hosts should still prefer `npx -y @buildaureon/mcp` so they pick up published fixes without a manual upgrade step.
205
-
206
- ---
207
-
208
- ## From-source build (optional)
209
-
210
- Use a clone when contributing to `@buildaureon/mcp` or testing unreleased changes. Point every path at **your** clone — never hard-code another machine’s layout.
211
-
212
- ```bash
213
- cd /path/to/your/clone
214
- pnpm install
215
- pnpm --filter @buildaureon/mcp build
216
- pnpm --filter @buildaureon/mcp start
217
- ```
218
-
219
- Inside the MCP package directory alone:
220
-
221
- ```bash
222
- cd /path/to/your/clone/mcp
223
- pnpm install # or npm install, depending on your workspace setup
224
- pnpm build # tsup → dist/
225
- pnpm start # node dist/index.js
226
- ```
227
-
228
- Useful scripts (from `package.json`):
229
-
230
- | Script | Purpose |
231
- | --- | --- |
232
- | `build` | Compile with `tsup` into `dist/` |
233
- | `dev` | Run TypeScript entry via `tsx` (hot iteration) |
234
- | `start` | `node dist/index.js` (what hosts should launch after build) |
235
- | `typecheck` | `tsc --noEmit` |
236
- | `test` | Unit / smoke tests |
237
-
238
- Wire the host to `node dist/index.js` with `cwd` set to `/path/to/your/clone/mcp` as shown above.
239
-
240
- Always authenticate against the **live** API with an issued key from the Developers page. Do not invent local secret files or private API endpoints for normal setup.
241
-
242
- ---
243
-
244
- ## Smoke prompts
245
-
246
- After the host shows the aureon server as connected, try these in order:
247
-
248
- 1. **Connectivity** — “Call `aureon_ping` and summarize the response.”
249
- 2. **Identity** — “Call `aureon_me` and tell me which wallet is bound.”
250
- 3. **Read path** — “Sync my portfolio with `aureon_sync_portfolio`, then `aureon_get_vault_status`.”
251
- 4. **Objectives** — “List objectives with `aureon_list_objectives`.”
252
- 5. **Health** — “Show compass health with `aureon_get_health`.”
253
-
254
- If ping works but `aureon_me` fails, the key is likely invalid, paused, or revoked — rotate from Developers and update the host `env`.
255
-
256
- For write workflows (create objective, restore, prepare vault), see [./agent-guide.md](./agent-guide.md) and the full schemas in [./tools.md](./tools.md).
257
-
258
- ---
259
-
260
- ## Verify the tool surface
261
-
262
- A healthy install exposes auth, read, objective, portfolio, execution, market, vault prepare, and developer key tools — **47** in total.
263
-
264
- You do not need every tool on day one. Start with:
265
-
266
- - `aureon_ping`
267
- - `aureon_me`
268
- - `aureon_sync_portfolio`
269
- - `aureon_list_objectives`
270
- - `aureon_get_health`
271
-
272
- Vault **prepare** tools return unsigned steps only. Signing and broadcasting stay with your wallet or a separate SDK script that holds a private key — never the MCP env. Details: [./auth.md](./auth.md) and [./security.md](./security.md).
273
-
274
- ---
275
-
276
- ## Troubleshooting
277
-
278
- | Symptom | Likely cause | What to try |
279
- | --- | --- | --- |
280
- | Server missing in host UI | Config JSON invalid or host not restarted | Validate JSON, restart Cursor / Claude |
281
- | Startup error about missing credentials | Neither key nor Bearer set | Set `AUREON_API_KEY` in the host `env` block |
282
- | `401` / unauthorized on tools | Bad, paused, or revoked key | Create a new issued key; update config |
283
- | `npx` hangs or fails | Network / registry issue | Retry; ensure Node 20+; try `npm view @buildaureon/mcp version` |
284
- | Tools listed but every call fails | Wrong URL / mixed network | Omit `AUREON_API_URL` for 8788, or set `AUREON_NETWORK=testnet` for the public host (still 46630) |
285
- | `aureon_me` shows unexpected wallet | Bearer also set and winning | Clear `AUREON_AUTH_TOKEN` / logout; prefer key-only — see [./auth.md](./auth.md) |
286
- | Local `node dist/index.js` fails | Missing build | Run `pnpm build` so `dist/index.js` exists |
287
- | Deposit / withdraw “not signed” | Expected | MCP returns unsigned steps; sign outside MCP |
288
- | `aureon_dev_login` fails | Production API | Expected — use issued key on live API |
289
-
290
- Still stuck? Confirm HTTPS reachability to the API, then re-check that the key string has no extra quotes or trailing spaces in the host config.
291
-
292
- ---
293
-
294
- ## FAQ
295
-
296
- ### Do I need to install the package globally?
297
-
298
- No. Prefer `npx -y @buildaureon/mcp` in the host config so the published `v0.1.1` (or newer) is fetched on demand.
299
-
300
- ### Is a Bearer token required?
301
-
302
- No for the recommended agent path. An issued `AUREON_API_KEY` is enough for control-plane tools. Bearer is optional and documented in [./auth.md](./auth.md).
303
-
304
- ### Can I put my private key in the MCP config?
305
-
306
- No. Keep private keys out of MCP. Use them only in a separate signing host when broadcasting prepared vault transactions.
307
-
308
- ### Does MCP talk to a local backend?
309
-
310
- Default (omit `AUREON_API_URL`) is local mainnet `http://127.0.0.1:8788` (chain 4663). Set `AUREON_NETWORK=testnet` only for the public host (still 46630). Do not map mainnet to `api.aureonlabs.network`.
311
-
312
- ### How is this different from `@buildaureon/sdk`?
313
-
314
- The SDK is for typed TypeScript programs. MCP is the same surface as **named tools** for AI hosts over stdio. Both authenticate the same way against the live API.
315
-
316
- ### Where do I rotate a leaked key?
317
-
318
- [app.aureonlabs.network](https://app.aureonlabs.network) → **Developers** → pause / revoke → create a new key → update the host `env`.
319
-
320
- ### What Node version is required?
321
-
322
- Node.js **20 or newer**. Older runtimes are unsupported.
323
-
324
- ---
325
-
326
- ## Post-setup checklist
327
-
328
- - [ ] Node 20+ installed (`node -v`)
329
- - [ ] Issued key created on the Developers page
330
- - [ ] Host config uses `npx -y @buildaureon/mcp` (or local `node dist/index.js` with a placeholder cwd)
331
- - [ ] `AUREON_API_KEY` set in host `env` (no private key)
332
- - [ ] `AUREON_API_URL` omitted (mainnet 8788). Optional `AUREON_NETWORK=testnet` for the public host (still 46630)
333
- - [ ] Host restarted; aureon server shows connected
334
- - [ ] `aureon_ping` succeeds
335
- - [ ] `aureon_me` returns the expected wallet
336
- - [ ] You know where [./tools.md](./tools.md) and [./agent-guide.md](./agent-guide.md) live for the next workflow
337
-
338
- ---
339
-
340
- ## Next steps
341
-
342
- 1. Read [./auth.md](./auth.md) if you need Bearer sessions or conflict rules.
343
- 2. Skim [./tools.md](./tools.md) for argument schemas.
344
- 3. Follow a playbook in [./agent-guide.md](./agent-guide.md).
345
- 4. Review trust boundaries in [./architecture.md](./architecture.md) and [./security.md](./security.md).
346
-
347
- Package overview and ecosystem diagram: [../README.md](../README.md).
1
+ # Setup Guide
2
+
3
+ Complete installation and host configuration for **`@buildaureon/mcp`** `v0.1.9` against the live AUREON API.
4
+
5
+ This package is a **stdio** [Model Context Protocol](https://modelcontextprotocol.io) server. It wraps [`@buildaureon/sdk`](https://github.com/buildaureon/aureon-sdk) and exposes **54 tools** so Cursor, Claude Desktop, and other MCP hosts can call the Financial Compass control plane.
6
+
7
+ Related docs: [Authentication](./auth.md) · [Tools](./tools.md) · [Agent guide](./agent-guide.md) · [Architecture](./architecture.md) · [Security](./security.md) · [Package README](../README.md)
8
+
9
+ ---
10
+
11
+ ## What this guide covers
12
+
13
+ - What you need before connecting an agent
14
+ - Environment variables the MCP process reads
15
+ - How to create an issued developer API key
16
+ - Cursor and Claude Desktop config (published package first)
17
+ - Running via `npx` without a permanent install
18
+ - Building from a source clone (optional)
19
+ - Smoke prompts to verify the wire is live
20
+ - Troubleshooting table, FAQ, and a final checklist
21
+
22
+ If you only want auth semantics (key vs Bearer vs private key), skip ahead to [./auth.md](./auth.md).
23
+
24
+ ---
25
+
26
+ ## What you need
27
+
28
+ | Requirement | Notes |
29
+ | --- | --- |
30
+ | **Node.js 20+** | ESM runtime. Check with `node -v`. |
31
+ | **Issued developer API key** | Issue the key at [app.aureonlabs.network](https://app.aureonlabs.network) → **Developers**. Plaintext is shown once. |
32
+ | **Network access** | Default is the official API `https://api.aureonlabs.network` (currently chain 46630). Optional `AUREON_NETWORK=mainnet` selects chain 4663 on the same host. |
33
+ | **MCP host** | Cursor, Claude Desktop, or any client that can launch a stdio MCP server. |
34
+
35
+ You do **not** need a wallet Bearer token for day-to-day control-plane tools when you use an issued key.
36
+
37
+ You do **not** need a private key inside MCP. Private keys are only for signing and broadcasting vault deposit/withdraw transactions **outside** the MCP process after prepare tools return unsigned steps.
38
+
39
+ The MCP server never custodies funds and never signs chain transactions.
40
+
41
+ ---
42
+
43
+ ## Package at a glance
44
+
45
+ | Item | Value |
46
+ | --- | --- |
47
+ | npm package | `@buildaureon/mcp` |
48
+ | Version | `0.1.9` |
49
+ | Depends on | `@buildaureon/sdk` |
50
+ | Transport | stdio MCP (JSON-RPC over stdin/stdout) |
51
+ | Tool count | 54 |
52
+ | Default API | `https://api.aureonlabs.network` (testnet 46630). `AUREON_NETWORK=mainnet` selects chain 4663. |
53
+ | Console | [app.aureonlabs.network](https://app.aureonlabs.network) |
54
+
55
+ Primary launch command (recommended for hosts):
56
+
57
+ ```bash
58
+ npx -y @buildaureon/mcp
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Environment variables
64
+
65
+ The process reads these at startup. Put them in your MCP host `env` block (Cursor / Claude), not in chat transcripts.
66
+
67
+ | Variable | Required | Default | Description |
68
+ | --- | --- | --- | --- |
69
+ | `AUREON_API_KEY` | **Preferred** | — | Issued developer key (`aureon_…`). Product access **and** wallet identity for control-plane tools. |
70
+ | `AUREON_AUTH_TOKEN` | Optional | — | Wallet Bearer session. Wins over key identity when both are present on a request. |
71
+ | `AUREON_NETWORK` | Optional | `testnet` | Omit for official API / 46630. Set `mainnet` for chain 4663. |
72
+ | `AUREON_API_URL` | Optional | `https://api.aureonlabs.network` | Override the official host only if you must. |
73
+
74
+ At least one of `AUREON_API_KEY` or `AUREON_AUTH_TOKEN` must be set or the server refuses to start.
75
+
76
+ **Recommendation:** set only `AUREON_API_KEY`. The process uses the official API. Add `AUREON_NETWORK=mainnet` only if you want chain 4663 on that host.
77
+
78
+ Never put a wallet private key in MCP env. Prepare tools return unsigned calldata; the host wallet signs elsewhere.
79
+
80
+ ---
81
+
82
+ ## Create an issued developer API key
83
+
84
+ 1. Open [https://app.aureonlabs.network](https://app.aureonlabs.network).
85
+ 2. Complete invite / early-access flow if prompted, then connect your wallet.
86
+ 3. Open **Developers**.
87
+ 4. Create a key with a clear label (for example `cursor-mcp` or `claude-desktop`).
88
+ 5. Copy the secret immediately — plaintext is shown once.
89
+ 6. Paste it into your MCP host config as `AUREON_API_KEY`.
90
+ 7. If the secret leaks, pause or revoke it from the same Developers page and issue a replacement.
91
+
92
+ That key binds control-plane calls to your wallet. You do not need a separate Bearer handshake for normal agent work.
93
+
94
+ ---
95
+
96
+ ## Cursor configuration
97
+
98
+ ### Option A — published package (recommended)
99
+
100
+ Create or edit `.cursor/mcp.json` in the project, or merge into your user MCP config:
101
+
102
+ ```json
103
+ {
104
+ "mcpServers": {
105
+ "aureon": {
106
+ "command": "npx",
107
+ "args": ["-y", "@buildaureon/mcp"],
108
+ "env": {
109
+ "AUREON_API_KEY": "aureon_...."
110
+ }
111
+ }
112
+ }
113
+ }
114
+ ```
115
+
116
+ Restart Cursor (or reload MCP servers). Confirm **aureon** appears under MCP / tools.
117
+
118
+ Ask a smoke prompt such as: *“Use aureon_ping, then aureon_me.”*
119
+
120
+ Issue the key at [app.aureonlabs.network](https://app.aureonlabs.network) **Developers**. The official API is used when `AUREON_API_URL` is omitted. Add `"AUREON_NETWORK": "mainnet"` only to select chain 4663.
121
+
122
+ ### Option B — from a local build
123
+
124
+ Use this only when you are iterating on a clone of the package. Replace the working directory with your own clone path.
125
+
126
+ ```json
127
+ {
128
+ "mcpServers": {
129
+ "aureon": {
130
+ "command": "node",
131
+ "args": ["dist/index.js"],
132
+ "cwd": "/path/to/your/clone/mcp",
133
+ "env": {
134
+ "AUREON_API_KEY": "aureon_...."
135
+ }
136
+ }
137
+ }
138
+ }
139
+ ```
140
+
141
+ Build first (`pnpm build` or `npm run build` inside the MCP package) so `dist/index.js` exists.
142
+
143
+ Prefer Option A for everyday agent use. Local `cwd` configs are for contributors and package development.
144
+
145
+ ---
146
+
147
+ ## Claude Desktop configuration
148
+
149
+ Merge the same shape into Claude Desktop’s MCP config file (location depends on your OS; Claude’s docs describe where `claude_desktop_config.json` lives).
150
+
151
+ ```json
152
+ {
153
+ "mcpServers": {
154
+ "aureon": {
155
+ "command": "npx",
156
+ "args": ["-y", "@buildaureon/mcp"],
157
+ "env": {
158
+ "AUREON_API_KEY": "aureon_...."
159
+ }
160
+ }
161
+ }
162
+ }
163
+ ```
164
+
165
+ Restart Claude Desktop after saving. In a new chat, ask the model to list AUREON tools or call `aureon_ping`.
166
+
167
+ For a from-source Claude entry, use `node` + `dist/index.js` with `"cwd": "/path/to/your/clone/mcp"` the same way as Cursor Option B.
168
+
169
+ Example templates also ship in the package under `examples/cursor.mcp.json` and `examples/claude-desktop.json`.
170
+
171
+ ---
172
+
173
+ ## Run with npx (no permanent install)
174
+
175
+ From a terminal, with the key in the environment:
176
+
177
+ ```bash
178
+ export AUREON_API_KEY=aureon_....
179
+ # omit AUREON_API_URL for official API https://api.aureonlabs.network
180
+ # export AUREON_NETWORK=mainnet # chain 4663 on the same official host
181
+
182
+ npx -y @buildaureon/mcp
183
+ ```
184
+
185
+ On Windows PowerShell:
186
+
187
+ ```powershell
188
+ $env:AUREON_API_KEY = "aureon_...."
189
+ # omit AUREON_API_URL for official API https://api.aureonlabs.network
190
+ # $env:AUREON_NETWORK = "mainnet" # chain 4663 on the same official host
191
+ npx -y @buildaureon/mcp
192
+ ```
193
+
194
+ The process speaks MCP on stdio. Running it in a bare terminal is mainly useful to confirm it starts; hosts like Cursor attach automatically when configured.
195
+
196
+ You can also add the package to a project:
197
+
198
+ ```bash
199
+ npm install @buildaureon/mcp
200
+ # or
201
+ pnpm add @buildaureon/mcp
202
+ ```
203
+
204
+ Hosts should still prefer `npx -y @buildaureon/mcp` so they pick up published fixes without a manual upgrade step.
205
+
206
+ ---
207
+
208
+ ## From-source build (optional)
209
+
210
+ Use a clone when contributing to `@buildaureon/mcp` or testing unreleased changes. Point every path at **your** clone — never hard-code another machine’s layout.
211
+
212
+ ```bash
213
+ cd /path/to/your/clone
214
+ pnpm install
215
+ pnpm --filter @buildaureon/mcp build
216
+ pnpm --filter @buildaureon/mcp start
217
+ ```
218
+
219
+ Inside the MCP package directory alone:
220
+
221
+ ```bash
222
+ cd /path/to/your/clone/mcp
223
+ pnpm install # or npm install, depending on your workspace setup
224
+ pnpm build # tsup → dist/
225
+ pnpm start # node dist/index.js
226
+ ```
227
+
228
+ Useful scripts (from `package.json`):
229
+
230
+ | Script | Purpose |
231
+ | --- | --- |
232
+ | `build` | Compile with `tsup` into `dist/` |
233
+ | `dev` | Run TypeScript entry via `tsx` (hot iteration) |
234
+ | `start` | `node dist/index.js` (what hosts should launch after build) |
235
+ | `typecheck` | `tsc --noEmit` |
236
+ | `test` | Unit / smoke tests |
237
+
238
+ Wire the host to `node dist/index.js` with `cwd` set to `/path/to/your/clone/mcp` as shown above.
239
+
240
+ Always authenticate against the **live** API with an issued key from the Developers page. Do not invent local secret files or private API endpoints for normal setup.
241
+
242
+ ---
243
+
244
+ ## Smoke prompts
245
+
246
+ After the host shows the aureon server as connected, try these in order:
247
+
248
+ 1. **Connectivity** — “Call `aureon_ping` and summarize the response.”
249
+ 2. **Identity** — “Call `aureon_me` and tell me which wallet is bound.”
250
+ 3. **Read path** — “Sync my portfolio with `aureon_sync_portfolio`, then `aureon_get_vault_status`.”
251
+ 4. **Objectives** — “List objectives with `aureon_list_objectives`.”
252
+ 5. **Health** — “Show compass health with `aureon_get_health`.”
253
+
254
+ If ping works but `aureon_me` fails, the key is likely invalid, paused, or revoked — rotate from Developers and update the host `env`.
255
+
256
+ For write workflows (create objective, restore, prepare vault), see [./agent-guide.md](./agent-guide.md) and the full schemas in [./tools.md](./tools.md).
257
+
258
+ ---
259
+
260
+ ## Verify the tool surface
261
+
262
+ A healthy install exposes auth, read, objective, portfolio, execution, market, vault prepare, and developer key tools — **47** in total.
263
+
264
+ You do not need every tool on day one. Start with:
265
+
266
+ - `aureon_ping`
267
+ - `aureon_me`
268
+ - `aureon_sync_portfolio`
269
+ - `aureon_list_objectives`
270
+ - `aureon_get_health`
271
+
272
+ Vault **prepare** tools return unsigned steps only. Signing and broadcasting stay with your wallet or a separate SDK script that holds a private key — never the MCP env. Details: [./auth.md](./auth.md) and [./security.md](./security.md).
273
+
274
+ ---
275
+
276
+ ## Troubleshooting
277
+
278
+ | Symptom | Likely cause | What to try |
279
+ | --- | --- | --- |
280
+ | Server missing in host UI | Config JSON invalid or host not restarted | Validate JSON, restart Cursor / Claude |
281
+ | Startup error about missing credentials | Neither key nor Bearer set | Set `AUREON_API_KEY` in the host `env` block |
282
+ | `401` / unauthorized on tools | Bad, paused, or revoked key | Create a new issued key; update config |
283
+ | `npx` hangs or fails | Network / registry issue | Retry; ensure Node 20+; try `npm view @buildaureon/mcp version` |
284
+ | Tools listed but every call fails | Wrong URL / mixed network | Omit `AUREON_API_URL` for the official API, or set `AUREON_NETWORK=mainnet` for chain 4663 |
285
+ | `aureon_me` shows unexpected wallet | Bearer also set and winning | Clear `AUREON_AUTH_TOKEN` / logout; prefer key-only — see [./auth.md](./auth.md) |
286
+ | Local `node dist/index.js` fails | Missing build | Run `pnpm build` so `dist/index.js` exists |
287
+ | Deposit / withdraw “not signed” | Expected | MCP returns unsigned steps; sign outside MCP |
288
+ | `aureon_dev_login` fails | Production API | Expected — use issued key on live API |
289
+
290
+ Still stuck? Confirm HTTPS reachability to the API, then re-check that the key string has no extra quotes or trailing spaces in the host config.
291
+
292
+ ---
293
+
294
+ ## FAQ
295
+
296
+ ### Do I need to install the package globally?
297
+
298
+ No. Prefer `npx -y @buildaureon/mcp` in the host config so the published `v0.1.9` (or newer) is fetched on demand.
299
+
300
+ ### Is a Bearer token required?
301
+
302
+ No for the recommended agent path. An issued `AUREON_API_KEY` is enough for control-plane tools. Bearer is optional and documented in [./auth.md](./auth.md).
303
+
304
+ ### Can I put my private key in the MCP config?
305
+
306
+ No. Keep private keys out of MCP. Use them only in a separate signing host when broadcasting prepared vault transactions.
307
+
308
+ ### Does MCP talk to a local backend?
309
+
310
+ Default (omit `AUREON_API_URL`) is the official API `https://api.aureonlabs.network` (currently chain 46630). Set `AUREON_NETWORK=mainnet` to select chain 4663 on that same host.
311
+
312
+ ### How is this different from `@buildaureon/sdk`?
313
+
314
+ The SDK is for typed TypeScript programs. MCP is the same surface as **named tools** for AI hosts over stdio. Both authenticate the same way against the live API.
315
+
316
+ ### Where do I rotate a leaked key?
317
+
318
+ [app.aureonlabs.network](https://app.aureonlabs.network) → **Developers** → pause / revoke → create a new key → update the host `env`.
319
+
320
+ ### What Node version is required?
321
+
322
+ Node.js **20 or newer**. Older runtimes are unsupported.
323
+
324
+ ---
325
+
326
+ ## Post-setup checklist
327
+
328
+ - [ ] Node 20+ installed (`node -v`)
329
+ - [ ] Issued key created on the Developers page
330
+ - [ ] Host config uses `npx -y @buildaureon/mcp` (or local `node dist/index.js` with a placeholder cwd)
331
+ - [ ] `AUREON_API_KEY` set in host `env` (no private key)
332
+ - [ ] `AUREON_API_URL` omitted (official API). Optional `AUREON_NETWORK=mainnet` for chain 4663
333
+ - [ ] Host restarted; aureon server shows connected
334
+ - [ ] `aureon_ping` succeeds
335
+ - [ ] `aureon_me` returns the expected wallet
336
+ - [ ] You know where [./tools.md](./tools.md) and [./agent-guide.md](./agent-guide.md) live for the next workflow
337
+
338
+ ---
339
+
340
+ ## Next steps
341
+
342
+ 1. Read [./auth.md](./auth.md) if you need Bearer sessions or conflict rules.
343
+ 2. Skim [./tools.md](./tools.md) for argument schemas.
344
+ 3. Follow a playbook in [./agent-guide.md](./agent-guide.md).
345
+ 4. Review trust boundaries in [./architecture.md](./architecture.md) and [./security.md](./security.md).
346
+
347
+ Package overview and ecosystem diagram: [../README.md](../README.md).