@dreamcash-org/mcp 0.1.0 → 0.1.2

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.
Files changed (3) hide show
  1. package/README.md +112 -29
  2. package/dist/dreamcash-mcp.js +4823 -4771
  3. package/package.json +9 -2
package/README.md CHANGED
@@ -1,65 +1,148 @@
1
1
  # Dreamcash MCP
2
2
 
3
- Connects your own AI agent (Claude Code, Grok Bot, Hermes, OpenClaw, or any
4
- MCP client that runs local servers) to your [Dreamcash](https://dreamcash.xyz)
5
- account. Your agent can read your account and Hyperliquid's markets, and ask
6
- for trades. Every trade waits for you to confirm it in your own wallet.
7
-
8
- Chat apps that connect to remote MCP servers (Claude, ChatGPT, Grok) need no
9
- install: add `https://api.dreamcash.xyz/mcp` as a connector instead.
3
+ Let your own AI agent work with your [Dreamcash](https://dreamcash.xyz)
4
+ account. Dreamcash is a trading app on Hyperliquid; this MCP server lets an
5
+ agent such as Claude Code, Grok Bot, Hermes, OpenClaw or Cursor read your
6
+ account and markets, and trade: **each trade confirmed by you in your own
7
+ wallet, or, if you let it, on its own within limits you set.**
8
+
9
+ > Using a chat app that connects to remote MCP servers (Claude, ChatGPT,
10
+ > Grok, Gemini)? You don't need this package: add
11
+ > `https://api.dreamcash.xyz/mcp` as a custom connector instead. Each trade
12
+ > then waits for you; trading on its own needs this package.
13
+
14
+ ## What your agent can do
15
+
16
+ - **Read**: balances, positions, open orders, trade and order history, PnL,
17
+ funding and transfers, XP and rewards, vaults, and Hyperliquid's markets
18
+ (perps, HIP-3 markets, spot, prediction markets) with prices and charts.
19
+ - **Ask for trades**: open, close and resize positions, limit and market
20
+ orders, cancel or change orders, take profit and stop loss, leverage and
21
+ margin, spot and prediction orders, vault deposits and withdrawals, moving
22
+ USDC between spot and perps, and withdrawing to one of your own wallets.
23
+ Each request gives you a link to review exactly what will be signed, and
24
+ confirm it in your wallet. Requests you don't confirm expire after 15
25
+ minutes. Trades pay the same fees as in the app.
26
+ - **Trade on its own**, if you choose it when you connect: your main wallet
27
+ approves the agent's key on Hyperliquid once, for the days you pick (up to
28
+ 180), and its orders, position changes and HLP moves on your main wallet go
29
+ through without asking you, within your limits per order, on leverage and
30
+ per day. Withdrawals and transfers always wait for you.
31
+
32
+ Try asking it:
33
+
34
+ - "How did my positions do this week?"
35
+ - "Buy $50 of HYPE at 3x with a stop loss 5% below."
36
+ - "Close everything I have open on BTC."
10
37
 
11
38
  ## Set up
12
39
 
40
+ You need Node.js 20 or newer and a Dreamcash account (made in the Dreamcash
41
+ app for [iPhone](https://apps.apple.com/app/id6748916424) or
42
+ [Android](https://play.google.com/store/apps/details?id=xyz.dreamcash.app)).
43
+
13
44
  Add a local (stdio) MCP server that runs:
14
45
 
15
46
  ```sh
16
47
  npx -y @dreamcash-org/mcp
17
48
  ```
18
49
 
19
- Claude Code:
50
+ **Claude Code**
20
51
 
21
52
  ```sh
22
53
  claude mcp add dreamcash -- npx -y @dreamcash-org/mcp
23
54
  ```
24
55
 
25
- Any client configured with JSON:
56
+ **Claude Desktop, Cursor and other clients configured with JSON**
26
57
 
27
58
  ```json
28
59
  {
29
60
  "mcpServers": {
30
- "dreamcash": { "command": "npx", "args": ["-y", "@dreamcash-org/mcp"] }
61
+ "dreamcash": {
62
+ "command": "npx",
63
+ "args": ["-y", "@dreamcash-org/mcp"]
64
+ }
31
65
  }
32
66
  }
33
67
  ```
34
68
 
35
- Needs Node.js 20 or newer.
69
+ **Codex** (`~/.codex/config.toml`)
36
70
 
37
- ## Connect your account
71
+ ```toml
72
+ [mcp_servers.dreamcash]
73
+ command = "npx"
74
+ args = ["-y", "@dreamcash-org/mcp"]
75
+ ```
38
76
 
39
- Ask your agent to connect to Dreamcash. It gives you a short code and a link.
40
- Open the link, sign in with the account you use in the Dreamcash app and
41
- enter the code. The agent then sees your balances, positions, orders,
42
- history, PnL, XP and vaults, and can ask for trades: each one opens at a link
43
- for you to confirm in your own wallet.
77
+ **Gemini for Mac**: Customize › Connectors › Add custom app › Local MCP, with
78
+ the command `npx -y @dreamcash-org/mcp`.
44
79
 
45
- The pairing page shows the address of the key being paired; the agent tells
46
- you its own. Check that they match.
80
+ **Agents that set up their own tools** (Grok Bot, Hermes, OpenClaw): ask
81
+ the agent to add a local MCP server that runs `npx -y @dreamcash-org/mcp`.
47
82
 
48
- ## The key
83
+ Desktop apps often start servers without your terminal's `PATH`: if `npx`
84
+ isn't found, use its full path, which `which npx` prints in your terminal
85
+ (e.g. `/opt/homebrew/bin/npx`).
49
86
 
50
- The first time it connects, the server makes a new key and saves it in
51
- `~/.dreamcash/agent-key.json`, readable only by your user. Dreamcash never
52
- sees it. Every call to Dreamcash is signed with it, so whoever holds the file
53
- can read your account and ask for trades as this agent. It can't place a
54
- trade, withdraw or move your funds: each of those needs your own wallet.
55
- Delete the file to disconnect this machine.
87
+ ## Connect your account
56
88
 
57
- Pairing again makes a new key in `agent-key.json.pending`. The key before it
58
- keeps working until you approve the new one, which then replaces it.
89
+ 1. Ask your agent to connect to Dreamcash. It gives you a link and a short
90
+ code, valid for 10 minutes.
91
+ 2. Open the link, sign in with the account you use in the Dreamcash app and
92
+ enter the code.
93
+ 3. Check that the key address the page shows is the one your agent told you.
94
+ 4. Choose **ask me before each trade**, or **trade on its own** with its
95
+ limits (by default $1,000 per order, 10x leverage, $5,000 a day) and how
96
+ many days its key lasts. Then approve; for trading on its own, your wallet
97
+ then signs the key's approval on the next page.
98
+
99
+ ## Safety
100
+
101
+ - **Dreamcash holds no key that can trade for you.** Everything you confirm is
102
+ signed in your own wallet, on a page that shows exactly what you sign. Read
103
+ it before you confirm: an agent can be wrong, or be misled by what it reads.
104
+ - **The agent's key stays on its machine.** The first time it connects, this
105
+ server makes a key and saves it in `~/.dreamcash/agent-key.json`, readable
106
+ only by your user. Dreamcash never sees it. Every call the agent makes is
107
+ signed with it, so whoever holds the file can read your account and ask for
108
+ trades as this agent.
109
+ - **If you let it trade on its own**, that key becomes an API wallet of your
110
+ main account on Hyperliquid until it expires. Whoever holds the file can
111
+ then trade any market there directly, and deposit into HLP (deposits stay
112
+ locked for 4 days), outside Dreamcash and its limits: your limits bind only
113
+ the trades the agent asks Dreamcash for. It can't withdraw or send your
114
+ funds. So keep the file as safe as the money on your main wallet, and pick a
115
+ short key life. Before it signs a trade, this server checks that it is the
116
+ one the agent asked for, on your main wallet, at prices within 10% of
117
+ Hyperliquid's live price.
118
+ - **Enter only codes your agent showed you just now.** Never one someone sent
119
+ you: entering it would connect their agent to your account.
120
+ - **What the agent sees**: the balances, positions and history of every
121
+ wallet in your Dreamcash account.
122
+ - **To disconnect** this machine, delete the key file. A key you let trade
123
+ stays approved on Hyperliquid until it expires, or until you approve another
124
+ AI key, which replaces it. Pairing again makes a new key in
125
+ `agent-key.json.pending`; the key before it keeps working until you approve
126
+ the new one.
127
+
128
+ ## Troubleshooting
129
+
130
+ | What the agent reports | What to do |
131
+ | --- | --- |
132
+ | `dreamcash_unreachable` | Check the machine is online; try again in a minute. |
133
+ | `npx` not found | Use its full path (`which npx` prints it), as above. |
134
+ | `key_not_saved`, `key_unreadable` | Make the key file readable and writable by the user the agent runs as, or set `DREAMCASH_AGENT_KEY_FILE` to a file that is, then restart the agent. An app that runs servers in a sandbox (e.g. Gemini for Mac) may allow writes only to some folders: put the key file in one of them. Deleting a paired key file disconnects this machine. |
135
+ | No Dreamcash tools after connecting | Restart the agent or reload its MCP servers: some clients don't notice new tools by themselves. |
136
+ | `update_required` | Run the server as `npx -y @dreamcash-org/mcp@latest` once (npx may keep using a version it already downloaded), then restart the agent. |
59
137
 
60
138
  ## Settings
61
139
 
62
140
  | Variable | Default |
63
141
  | --- | --- |
64
142
  | `DREAMCASH_AGENT_KEY_FILE` | `~/.dreamcash/agent-key.json` |
65
- | `DREAMCASH_API_URL` | `https://api.dreamcash.xyz` |
143
+ | `DREAMCASH_API_URL` | `https://api.dreamcash.xyz` (https only; plain http only for `localhost`) |
144
+
145
+ ## License
146
+
147
+ MIT. The published file bundles open-source packages; their licenses are in
148
+ `dist/THIRD_PARTY_LICENSES.md`.