@buildaureon/mcp 0.1.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/docs/setup.md ADDED
@@ -0,0 +1,346 @@
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 **34 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** | Create at [app.aureonlabs.network](https://app.aureonlabs.network) → **Developers**. Plaintext is shown once. |
32
+ | **Network access** | HTTPS to `https://api.aureonlabs.network` (Robinhood Chain early access). |
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 | 34 |
52
+ | Live API | `https://api.aureonlabs.network` |
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_API_URL` | Optional | `https://api.aureonlabs.network` | API base URL. Leave unset unless you intentionally override. |
72
+
73
+ At least one of `AUREON_API_KEY` or `AUREON_AUTH_TOKEN` must be set or the server refuses to start.
74
+
75
+ **Recommendation:** set only `AUREON_API_KEY` (and optionally leave `AUREON_API_URL` at the default). That is the agent-friendly path documented in [./auth.md](./auth.md).
76
+
77
+ Never put a wallet private key in MCP env. Prepare tools return unsigned calldata; the host wallet signs elsewhere.
78
+
79
+ ---
80
+
81
+ ## Create an issued developer API key
82
+
83
+ 1. Open [https://app.aureonlabs.network](https://app.aureonlabs.network).
84
+ 2. Complete invite / early-access flow if prompted, then connect your wallet.
85
+ 3. Open **Developers**.
86
+ 4. Create a key with a clear label (for example `cursor-mcp` or `claude-desktop`).
87
+ 5. Copy the secret immediately — plaintext is shown once.
88
+ 6. Paste it into your MCP host config as `AUREON_API_KEY`.
89
+ 7. If the secret leaks, pause or revoke it from the same Developers page and issue a replacement.
90
+
91
+ That key binds control-plane calls to your wallet. You do not need a separate Bearer handshake for normal agent work.
92
+
93
+ ---
94
+
95
+ ## Cursor configuration
96
+
97
+ ### Option A — published package (recommended)
98
+
99
+ Create or edit `.cursor/mcp.json` in the project, or merge into your user MCP config:
100
+
101
+ ```json
102
+ {
103
+ "mcpServers": {
104
+ "aureon": {
105
+ "command": "npx",
106
+ "args": ["-y", "@buildaureon/mcp"],
107
+ "env": {
108
+ "AUREON_API_URL": "https://api.aureonlabs.network",
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
+ ### Option B — from a local build
121
+
122
+ Use this only when you are iterating on a clone of the package. Replace the working directory with your own clone path.
123
+
124
+ ```json
125
+ {
126
+ "mcpServers": {
127
+ "aureon": {
128
+ "command": "node",
129
+ "args": ["dist/index.js"],
130
+ "cwd": "/path/to/your/clone/mcp",
131
+ "env": {
132
+ "AUREON_API_URL": "https://api.aureonlabs.network",
133
+ "AUREON_API_KEY": "aureon_...."
134
+ }
135
+ }
136
+ }
137
+ }
138
+ ```
139
+
140
+ Build first (`pnpm build` or `npm run build` inside the MCP package) so `dist/index.js` exists.
141
+
142
+ Prefer Option A for everyday agent use. Local `cwd` configs are for contributors and package development.
143
+
144
+ ---
145
+
146
+ ## Claude Desktop configuration
147
+
148
+ 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).
149
+
150
+ ```json
151
+ {
152
+ "mcpServers": {
153
+ "aureon": {
154
+ "command": "npx",
155
+ "args": ["-y", "@buildaureon/mcp"],
156
+ "env": {
157
+ "AUREON_API_URL": "https://api.aureonlabs.network",
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
+ # optional — live API is already the default
180
+ export AUREON_API_URL=https://api.aureonlabs.network
181
+
182
+ npx -y @buildaureon/mcp
183
+ ```
184
+
185
+ On Windows PowerShell:
186
+
187
+ ```powershell
188
+ $env:AUREON_API_KEY = "aureon_...."
189
+ $env:AUREON_API_URL = "https://api.aureonlabs.network"
190
+ npx -y @buildaureon/mcp
191
+ ```
192
+
193
+ 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.
194
+
195
+ You can also add the package to a project:
196
+
197
+ ```bash
198
+ npm install @buildaureon/mcp
199
+ # or
200
+ pnpm add @buildaureon/mcp
201
+ ```
202
+
203
+ Hosts should still prefer `npx -y @buildaureon/mcp` so they pick up published fixes without a manual upgrade step.
204
+
205
+ ---
206
+
207
+ ## From-source build (optional)
208
+
209
+ 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.
210
+
211
+ ```bash
212
+ cd /path/to/your/clone
213
+ pnpm install
214
+ pnpm --filter @buildaureon/mcp build
215
+ pnpm --filter @buildaureon/mcp start
216
+ ```
217
+
218
+ Inside the MCP package directory alone:
219
+
220
+ ```bash
221
+ cd /path/to/your/clone/mcp
222
+ pnpm install # or npm install, depending on your workspace setup
223
+ pnpm build # tsup → dist/
224
+ pnpm start # node dist/index.js
225
+ ```
226
+
227
+ Useful scripts (from `package.json`):
228
+
229
+ | Script | Purpose |
230
+ | --- | --- |
231
+ | `build` | Compile with `tsup` into `dist/` |
232
+ | `dev` | Run TypeScript entry via `tsx` (hot iteration) |
233
+ | `start` | `node dist/index.js` (what hosts should launch after build) |
234
+ | `typecheck` | `tsc --noEmit` |
235
+ | `test` | Unit / smoke tests |
236
+
237
+ Wire the host to `node dist/index.js` with `cwd` set to `/path/to/your/clone/mcp` as shown above.
238
+
239
+ 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.
240
+
241
+ ---
242
+
243
+ ## Smoke prompts
244
+
245
+ After the host shows the aureon server as connected, try these in order:
246
+
247
+ 1. **Connectivity** — “Call `aureon_ping` and summarize the response.”
248
+ 2. **Identity** — “Call `aureon_me` and tell me which wallet is bound.”
249
+ 3. **Read path** — “Sync my portfolio with `aureon_sync_portfolio`, then `aureon_get_vault_status`.”
250
+ 4. **Objectives** — “List objectives with `aureon_list_objectives`.”
251
+ 5. **Health** — “Show compass health with `aureon_get_health`.”
252
+
253
+ If ping works but `aureon_me` fails, the key is likely invalid, paused, or revoked — rotate from Developers and update the host `env`.
254
+
255
+ For write workflows (create objective, restore, prepare vault), see [./agent-guide.md](./agent-guide.md) and the full schemas in [./tools.md](./tools.md).
256
+
257
+ ---
258
+
259
+ ## Verify the tool surface
260
+
261
+ A healthy install exposes auth, read, objective, portfolio, execution, market, vault prepare, and developer key tools — **34** in total.
262
+
263
+ You do not need every tool on day one. Start with:
264
+
265
+ - `aureon_ping`
266
+ - `aureon_me`
267
+ - `aureon_sync_portfolio`
268
+ - `aureon_list_objectives`
269
+ - `aureon_get_health`
270
+
271
+ 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).
272
+
273
+ ---
274
+
275
+ ## Troubleshooting
276
+
277
+ | Symptom | Likely cause | What to try |
278
+ | --- | --- | --- |
279
+ | Server missing in host UI | Config JSON invalid or host not restarted | Validate JSON, restart Cursor / Claude |
280
+ | Startup error about missing credentials | Neither key nor Bearer set | Set `AUREON_API_KEY` in the host `env` block |
281
+ | `401` / unauthorized on tools | Bad, paused, or revoked key | Create a new issued key; update config |
282
+ | `npx` hangs or fails | Network / registry issue | Retry; ensure Node 20+; try `npm view @buildaureon/mcp version` |
283
+ | Tools listed but every call fails | Wrong `AUREON_API_URL` | Remove override or set `https://api.aureonlabs.network` |
284
+ | `aureon_me` shows unexpected wallet | Bearer also set and winning | Clear `AUREON_AUTH_TOKEN` / logout; prefer key-only — see [./auth.md](./auth.md) |
285
+ | Local `node dist/index.js` fails | Missing build | Run `pnpm build` so `dist/index.js` exists |
286
+ | Deposit / withdraw “not signed” | Expected | MCP returns unsigned steps; sign outside MCP |
287
+ | `aureon_dev_login` fails | Production API | Expected — use issued key on live API |
288
+
289
+ 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.
290
+
291
+ ---
292
+
293
+ ## FAQ
294
+
295
+ ### Do I need to install the package globally?
296
+
297
+ No. Prefer `npx -y @buildaureon/mcp` in the host config so the published `v0.1.1` (or newer) is fetched on demand.
298
+
299
+ ### Is a Bearer token required?
300
+
301
+ 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).
302
+
303
+ ### Can I put my private key in the MCP config?
304
+
305
+ No. Keep private keys out of MCP. Use them only in a separate signing host when broadcasting prepared vault transactions.
306
+
307
+ ### Does MCP talk to a local backend?
308
+
309
+ Public setup uses `https://api.aureonlabs.network` only. Point hosts at that URL (or omit `AUREON_API_URL` to use the default).
310
+
311
+ ### How is this different from `@buildaureon/sdk`?
312
+
313
+ 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.
314
+
315
+ ### Where do I rotate a leaked key?
316
+
317
+ [app.aureonlabs.network](https://app.aureonlabs.network) → **Developers** → pause / revoke → create a new key → update the host `env`.
318
+
319
+ ### What Node version is required?
320
+
321
+ Node.js **20 or newer**. Older runtimes are unsupported.
322
+
323
+ ---
324
+
325
+ ## Post-setup checklist
326
+
327
+ - [ ] Node 20+ installed (`node -v`)
328
+ - [ ] Issued key created on the Developers page
329
+ - [ ] Host config uses `npx -y @buildaureon/mcp` (or local `node dist/index.js` with a placeholder cwd)
330
+ - [ ] `AUREON_API_KEY` set in host `env` (no private key)
331
+ - [ ] `AUREON_API_URL` omitted or set to `https://api.aureonlabs.network`
332
+ - [ ] Host restarted; aureon server shows connected
333
+ - [ ] `aureon_ping` succeeds
334
+ - [ ] `aureon_me` returns the expected wallet
335
+ - [ ] You know where [./tools.md](./tools.md) and [./agent-guide.md](./agent-guide.md) live for the next workflow
336
+
337
+ ---
338
+
339
+ ## Next steps
340
+
341
+ 1. Read [./auth.md](./auth.md) if you need Bearer sessions or conflict rules.
342
+ 2. Skim [./tools.md](./tools.md) for argument schemas.
343
+ 3. Follow a playbook in [./agent-guide.md](./agent-guide.md).
344
+ 4. Review trust boundaries in [./architecture.md](./architecture.md) and [./security.md](./security.md).
345
+
346
+ Package overview and ecosystem diagram: [../README.md](../README.md).