gage-mcp 0.5.0 → 0.6.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/CHANGELOG.md +17 -0
- package/README.md +26 -23
- package/dist/cli.js +3 -3
- package/dist/limits.d.ts +2 -2
- package/dist/limits.js +11 -5
- package/dist/server.d.ts +4 -3
- package/dist/server.js +4 -3
- package/dist/wallet.d.ts +6 -3
- package/dist/wallet.js +12 -9
- package/package.json +10 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
- **Mainnet is the default.** Without `GAGE_NETWORK` the server and `init` serve Robinhood Chain (4663);
|
|
6
|
+
`GAGE_NETWORK=testnet` serves the testnet, and `init` there prints the commands that name it. Breaking: a setup that
|
|
7
|
+
relied on the testnet default must set `GAGE_NETWORK=testnet`.
|
|
8
|
+
- **The owner may lift a spend limit with `off`**, one setting at a time: `GAGE_MAX_BORROW_USDG=off` and the rest. The
|
|
9
|
+
mainnet defaults (100 USDG an action, 250 in 24 hours) stay where nothing is set.
|
|
10
|
+
- Built on exactly gage-sdk 0.6.0.
|
|
11
|
+
|
|
12
|
+
## 0.5.1
|
|
13
|
+
|
|
14
|
+
- Built on exactly gage-sdk 0.5.1: a loan the private lane opened stays out of `gage_loan`, `gage_portfolio` and
|
|
15
|
+
`gage_collect`, and every action on it is refused, whatever gage's index says; a chain read that fails is
|
|
16
|
+
`UNAVAILABLE`, to retry.
|
|
17
|
+
- Open source at [github.com/DebenLabs/gage-sdk](https://github.com/DebenLabs/gage-sdk), from where npm's copy is
|
|
18
|
+
published with provenance; `repository` and `bugs` in package.json.
|
|
19
|
+
|
|
3
20
|
## 0.5.0
|
|
4
21
|
|
|
5
22
|
- Four actions more: `gage_cash_out`, `gage_roll`, `gage_auto_roll` and `gage_cancel_auto_roll`, with their previews.
|
package/README.md
CHANGED
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
gage's MCP server for an AI agent that holds its own money: it borrows and earns on [gage](https://gage.cash),
|
|
4
4
|
fixed-cost loans with no liquidation (a loan is never closed early because a price moves; unpaid at the end of its term,
|
|
5
|
-
the lenders keep the collateral and nothing else is taken). **Robinhood Chain
|
|
6
|
-
|
|
5
|
+
the lenders keep the collateral and nothing else is taken). **Robinhood Chain (4663)**, under spend limits you may
|
|
6
|
+
lift, and its testnet (46630, see Testnet).
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
9
|
npx -y gage-mcp init
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
`init` makes the agent's own wallet on this computer: its key in `~/.gage/agent-
|
|
13
|
-
made once and never overwritten.
|
|
14
|
-
the
|
|
12
|
+
`init` makes the agent's own wallet on this computer: its key in `~/.gage/agent-4663.key`, readable only by this user,
|
|
13
|
+
made once and never overwritten. It prints the address, its spend limits and how to add the server, never the key.
|
|
14
|
+
Nobody funds it but you: send it only what the agent may use, and a little ETH for gas. Then add the server to the
|
|
15
|
+
agent:
|
|
15
16
|
|
|
16
17
|
```bash
|
|
17
18
|
claude mcp add gage -- npx -y gage-mcp # Claude Code
|
|
@@ -24,8 +25,8 @@ Any client with an `mcpServers` file (Claude Desktop, Cursor, Hermes, …):
|
|
|
24
25
|
{ "mcpServers": { "gage": { "command": "npx", "args": ["-y", "gage-mcp"] } } }
|
|
25
26
|
```
|
|
26
27
|
|
|
27
|
-
With the wallet `init` made, the server has
|
|
28
|
-
|
|
28
|
+
With the wallet `init` made, the server has 33 tools on mainnet (`gage_limits`, rolling over and the rating among
|
|
29
|
+
them), and 24 on the testnet:
|
|
29
30
|
- seven reads (`gage_capabilities`, `gage_assets`, `gage_borrow_quote`, `gage_leverage_quote`, `gage_loan`,
|
|
30
31
|
`gage_portfolio`, `gage_earn_vaults`) and `gage_wallet`;
|
|
31
32
|
- a preview that sends nothing for each action (`gage_prepare_*`);
|
|
@@ -56,29 +57,27 @@ borrow, and on Earn the asset each vault takes. Leverage stays USDG's.
|
|
|
56
57
|
Without a key it keeps the reads and the previews: the agent prepares, and you sign elsewhere. For a person who signs
|
|
57
58
|
every step on gage.cash, the hosted server is the one to use (Steward, /agents/steward on gage.cash).
|
|
58
59
|
|
|
59
|
-
##
|
|
60
|
+
## Testnet
|
|
60
61
|
|
|
61
|
-
`GAGE_NETWORK=
|
|
62
|
-
for your own wallet to sign. With one it signs under spend limits:
|
|
62
|
+
`GAGE_NETWORK=testnet` serves Robinhood Chain testnet, with test assets only:
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
|
-
GAGE_NETWORK=
|
|
65
|
+
GAGE_NETWORK=testnet npx -y gage-mcp init
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
makes the agent's
|
|
69
|
-
|
|
70
|
-
told its network:
|
|
68
|
+
makes the agent's testnet wallet (`~/.gage/agent-46630.key`, apart from the mainnet one) and funds it from gage's
|
|
69
|
+
faucet. Then add the server, told its network:
|
|
71
70
|
|
|
72
71
|
```bash
|
|
73
|
-
claude mcp add gage -e GAGE_NETWORK=
|
|
74
|
-
codex mcp add gage --env GAGE_NETWORK=
|
|
72
|
+
claude mcp add gage -e GAGE_NETWORK=testnet -- npx -y gage-mcp # Claude Code
|
|
73
|
+
codex mcp add gage --env GAGE_NETWORK=testnet -- npx -y gage-mcp # Codex
|
|
75
74
|
```
|
|
76
75
|
|
|
77
76
|
```json
|
|
78
|
-
{ "mcpServers": { "gage": { "command": "npx", "args": ["-y", "gage-mcp"], "env": { "GAGE_NETWORK": "
|
|
77
|
+
{ "mcpServers": { "gage": { "command": "npx", "args": ["-y", "gage-mcp"], "env": { "GAGE_NETWORK": "testnet" } } } }
|
|
79
78
|
```
|
|
80
79
|
|
|
81
|
-
|
|
80
|
+
## Spend limits
|
|
82
81
|
|
|
83
82
|
| Setting | On mainnet unless set | |
|
|
84
83
|
|---|---|---|
|
|
@@ -87,8 +86,9 @@ codex mcp add gage --env GAGE_NETWORK=mainnet -- npx -y gage-mcp # Codex
|
|
|
87
86
|
| `GAGE_MAX_DEPOSIT_USDG` | 100 | the most one deposit puts into a partner vault |
|
|
88
87
|
| `GAGE_MAX_DEPOSIT_DAY_USDG` | 250 | the most deposits put in in any 24 hours |
|
|
89
88
|
|
|
90
|
-
Amounts of USDG, whole or with up to six decimals; 0 stops that kind of action,
|
|
91
|
-
stops the server from starting.
|
|
89
|
+
Amounts of USDG, whole or with up to six decimals; 0 stops that kind of action, `off` lifts that limit, and any other
|
|
90
|
+
setting stops the server from starting. Whether the agent signs under limits is your choice: with all four `off` it
|
|
91
|
+
signs without any. On the testnet only the limits you set apply. Repaying, cashing out, withdrawing,
|
|
92
92
|
cancelling and collecting are not limited: they bring money or collateral back to the wallet. A roll counts only what
|
|
93
93
|
it borrows beyond the loan it repays, and the server rolls at the same size, so nothing; leaving a loan to roll by
|
|
94
94
|
itself, or ending that, moves nothing. Nor are actions in an asset other than USDG limited, nor a rating of gage, which
|
|
@@ -110,7 +110,7 @@ An agent that already keeps its own wallet's key in a file can sign here with th
|
|
|
110
110
|
| `GAGE_PRIVATE_KEY_FILE` | a key of your own instead of `init`'s: a file holding only the 0x-prefixed key, mode 600 (the server warns on stderr when other users can read it) |
|
|
111
111
|
| `GAGE_PRIVATE_KEY` | the key itself, when a file is not possible; removed from the environment once read |
|
|
112
112
|
| `GAGE_HOME` | where `init` keeps the wallet and the limits keep their record; `~/.gage` when unset. It must be yours, writable by no one else, and the wallet's key a file of yours only you can read: otherwise the key is refused (`KEY_FILE_UNSAFE`) and so is a limited action (`LIMITS_UNSAFE`, or `LIMITS_UNREADABLE` when the record cannot be read) |
|
|
113
|
-
| `GAGE_NETWORK` | `
|
|
113
|
+
| `GAGE_NETWORK` | `mainnet` (the default) or `testnet` (see Testnet) |
|
|
114
114
|
| `GAGE_MAX_BORROW_USDG`, `GAGE_MAX_BORROW_DAY_USDG`, `GAGE_MAX_DEPOSIT_USDG`, `GAGE_MAX_DEPOSIT_DAY_USDG` | the spend limits (see Spend limits) |
|
|
115
115
|
| `GAGE_RPC_URL`, `GAGE_INDEXER_URL`, `GAGE_RATES_URL`, `GAGE_VALUATION_URL`, `GAGE_FAUCET_URL` | elsewhere than the network's own services |
|
|
116
116
|
|
|
@@ -124,17 +124,20 @@ An agent that already keeps its own wallet's key in a file can sign here with th
|
|
|
124
124
|
injected into a page or a token name cannot make it pay someone; an aggregator's call is decoded before it is used.
|
|
125
125
|
- **Clients ask before acting.** The signing tools carry MCP's destructive hint, so a client asks before each one
|
|
126
126
|
unless you allow it.
|
|
127
|
-
- **
|
|
127
|
+
- **Never past the spend limits it keeps**, checked with each action's plan before anything is sent.
|
|
128
128
|
- **Private loans** are never read or acted on.
|
|
129
129
|
- **Logs go to stderr.** stdout carries MCP messages only.
|
|
130
130
|
|
|
131
131
|
## Development
|
|
132
132
|
|
|
133
|
-
In
|
|
133
|
+
In gage's repository or its public mirror (`packages/mcp`; the engine is `gage-sdk`, `packages/sdk`):
|
|
134
134
|
|
|
135
135
|
```bash
|
|
136
136
|
pnpm --filter gage-mcp test # in-memory MCP tests, and the CLI over real stdio
|
|
137
137
|
pnpm --filter gage-mcp start # the built CLI
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
+
The source is at [github.com/DebenLabs/gage-sdk](https://github.com/DebenLabs/gage-sdk), beside gage-sdk's, from where
|
|
141
|
+
npm's copy is published with provenance. Report a vulnerability privately (its SECURITY.md).
|
|
142
|
+
|
|
140
143
|
MIT licensed.
|
package/dist/cli.js
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* - `gage-mcp` serves the tools. Without a key it reads gage and prepares unsigned transactions. With one it also
|
|
7
7
|
* signs and sends gage's own planned transactions, and the key never leaves this process. The key comes from
|
|
8
8
|
* GAGE_PRIVATE_KEY_FILE, GAGE_PRIVATE_KEY, or the wallet `init` made.
|
|
9
|
-
*
|
|
10
|
-
* owner's GAGE_MAX_BORROW_USDG, GAGE_MAX_BORROW_DAY_USDG, GAGE_MAX_DEPOSIT_USDG and GAGE_MAX_DEPOSIT_DAY_USDG
|
|
11
|
-
* USDG an action and 250 in 24 hours (limits.ts); on the testnet only those set. GAGE_RPC_URL, GAGE_INDEXER_URL, GAGE_RATES_URL,
|
|
9
|
+
* It serves Robinhood Chain (4663, D260) unless GAGE_NETWORK=testnet (D311). There a key signs under spend limits (D297):
|
|
10
|
+
* the owner's GAGE_MAX_BORROW_USDG, GAGE_MAX_BORROW_DAY_USDG, GAGE_MAX_DEPOSIT_USDG and GAGE_MAX_DEPOSIT_DAY_USDG (`off`
|
|
11
|
+
* lifts one, D311), else 100 USDG an action and 250 in 24 hours (limits.ts); on the testnet only those set. GAGE_RPC_URL, GAGE_INDEXER_URL, GAGE_RATES_URL,
|
|
12
12
|
* GAGE_VALUATION_URL and GAGE_FAUCET_URL point it elsewhere than the network's own services. In server mode stdout
|
|
13
13
|
* carries MCP messages only; logs go to stderr.
|
|
14
14
|
*/
|
package/dist/limits.d.ts
CHANGED
|
@@ -15,8 +15,8 @@ export declare const MAINNET_LIMITS: Limits;
|
|
|
15
15
|
/** What the limits leave free (`NOT_LIMITED`), in words, for the guide, `init` and `gage_limits`. */
|
|
16
16
|
export declare const NOT_LIMITED_WORDS = "Repaying, cashing out, rolling a loan over at the same size, leaving a loan to roll by itself or ending that, withdrawing, cancelling, collecting and rating gage are not limited, nor are actions in an asset other than USDG.";
|
|
17
17
|
/**
|
|
18
|
-
* The limits a server signs under on `chainId`: each setting given, else mainnet's default for it. On
|
|
19
|
-
* setting not given is no limit, and with none given there are no limits at all (null).
|
|
18
|
+
* The limits a server signs under on `chainId`: each setting given (`off` for none), else mainnet's default for it. On
|
|
19
|
+
* the testnet a setting not given is no limit, and with none given there are no limits at all (null).
|
|
20
20
|
*/
|
|
21
21
|
export declare function limitsFrom(env: NodeJS.ProcessEnv, chainId: number): Limits | null;
|
|
22
22
|
/** Raw USDG as it is written: 100, 20.5, 0.000001. */
|
package/dist/limits.js
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* action in an asset other than USDG (the founder's choice). A roll counts only what it borrows beyond the loan it
|
|
7
7
|
* repays (the founder, 18 October 2026): gage-sdk rolls a loan into one of the same size, so a roll counts nothing, as
|
|
8
8
|
* repaying does; leaving a loan to roll by itself, or ending that, moves nothing, nor does a rating of gage (D302). On
|
|
9
|
-
* mainnet each limit has a default, 100 USDG an action and 250 in 24 hours
|
|
9
|
+
* mainnet each limit has a default, 100 USDG an action and 250 in 24 hours, which the owner may lift with `off` (D311:
|
|
10
|
+
* whether an agent signs without limits is its owner's choice); on the testnet there is none unless one is set.
|
|
10
11
|
*
|
|
11
12
|
* The 24 hours count across restarts and across every gage-mcp on this computer acting for the wallet: each action that
|
|
12
13
|
* counts holds its amount as a file in the wallet's folder, named after its time, kind and amount. The file is made
|
|
@@ -36,17 +37,22 @@ const SETTINGS = {
|
|
|
36
37
|
const NOT_LIMITED = ["reclaim", "cash_out", "roll (a loan of the same size)", "auto_roll", "cancel_auto_roll", "earn_redeem", "cancel", "collect", "feedback", "actions in an asset other than USDG"];
|
|
37
38
|
/** What the limits leave free (`NOT_LIMITED`), in words, for the guide, `init` and `gage_limits`. */
|
|
38
39
|
export const NOT_LIMITED_WORDS = "Repaying, cashing out, rolling a loan over at the same size, leaving a loan to roll by itself or ending that, withdrawing, cancelling, collecting and rating gage are not limited, nor are actions in an asset other than USDG.";
|
|
39
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* A setting's amount of USDG, whole or with up to six decimals, as raw USDG, or null for `off` (no limit, D311); anything
|
|
42
|
+
* else is refused in fixed words naming it.
|
|
43
|
+
*/
|
|
40
44
|
function amountOf(name, value) {
|
|
41
45
|
const written = value.trim();
|
|
46
|
+
if (written.toLowerCase() === "off")
|
|
47
|
+
return null;
|
|
42
48
|
if (!/^\d{1,12}(\.\d{1,6})?$/.test(written))
|
|
43
|
-
throw new ApiError("INVALID_LIMIT", `${name} must be an amount of USDG, such as 100 or 0.5`, 400);
|
|
49
|
+
throw new ApiError("INVALID_LIMIT", `${name} must be an amount of USDG, such as 100 or 0.5, or off`, 400);
|
|
44
50
|
const [whole = "0", decimals = ""] = written.split(".");
|
|
45
51
|
return BigInt(whole) * USDG_UNIT + BigInt(decimals.padEnd(6, "0"));
|
|
46
52
|
}
|
|
47
53
|
/**
|
|
48
|
-
* The limits a server signs under on `chainId`: each setting given, else mainnet's default for it. On
|
|
49
|
-
* setting not given is no limit, and with none given there are no limits at all (null).
|
|
54
|
+
* The limits a server signs under on `chainId`: each setting given (`off` for none), else mainnet's default for it. On
|
|
55
|
+
* the testnet a setting not given is no limit, and with none given there are no limits at all (null).
|
|
50
56
|
*/
|
|
51
57
|
export function limitsFrom(env, chainId) {
|
|
52
58
|
const given = (name) => (env[name] ?? "").trim() !== "";
|
package/dist/server.d.ts
CHANGED
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
* and prepares unsigned transactions. With a key it also carries actions out, signing in this process. The key never
|
|
4
4
|
* leaves the process, and gage never sees it. It signs only the transactions gage's own planner builds, to gage's
|
|
5
5
|
* contracts and, for a rating of gage on mainnet (D302), to ERC-8004's Reputation Registry: there is no tool that sends
|
|
6
|
-
* arbitrary calldata. On
|
|
7
|
-
* spend limits (
|
|
6
|
+
* arbitrary calldata. On mainnet (4663, D260, the default since D311) and the testnet (46630, D222), with or without a
|
|
7
|
+
* key; on mainnet a key signs under spend limits (D297) unless its owner lifts them (D311), and every action is checked
|
|
8
|
+
* against the limits kept before anything is sent.
|
|
8
9
|
*/
|
|
9
10
|
import { type ActionName, type Gage, type Signer } from "gage-sdk";
|
|
10
11
|
import { McpServer } from "@modelcontextprotocol/server";
|
|
11
12
|
import { type Ledger, type Limits } from "./limits.js";
|
|
12
|
-
export declare const VERSION = "0.
|
|
13
|
+
export declare const VERSION = "0.6.0";
|
|
13
14
|
/** A key's spend limits (D297), and the ledger of what they have held. */
|
|
14
15
|
export interface Limited {
|
|
15
16
|
limits: Limits;
|
package/dist/server.js
CHANGED
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
* and prepares unsigned transactions. With a key it also carries actions out, signing in this process. The key never
|
|
4
4
|
* leaves the process, and gage never sees it. It signs only the transactions gage's own planner builds, to gage's
|
|
5
5
|
* contracts and, for a rating of gage on mainnet (D302), to ERC-8004's Reputation Registry: there is no tool that sends
|
|
6
|
-
* arbitrary calldata. On
|
|
7
|
-
* spend limits (
|
|
6
|
+
* arbitrary calldata. On mainnet (4663, D260, the default since D311) and the testnet (46630, D222), with or without a
|
|
7
|
+
* key; on mainnet a key signs under spend limits (D297) unless its owner lifts them (D311), and every action is checked
|
|
8
|
+
* against the limits kept before anything is sent.
|
|
8
9
|
*/
|
|
9
10
|
import { ACTIONS, MAINNET, MAINNET_DEFAULTS, TESTNET, gageTools, refusalOf } from "gage-sdk";
|
|
10
11
|
import { McpServer } from "@modelcontextprotocol/server";
|
|
11
12
|
import { z } from "zod";
|
|
12
13
|
import { limitsOf, limitsSentence, NOT_LIMITED_WORDS, spendLimit } from "./limits.js";
|
|
13
|
-
export const VERSION = "0.
|
|
14
|
+
export const VERSION = "0.6.0";
|
|
14
15
|
const WHERE = {
|
|
15
16
|
[TESTNET]: "on Robinhood Chain testnet (46630). Test assets only.",
|
|
16
17
|
[MAINNET]: "on Robinhood Chain (4663), with real assets.",
|
package/dist/wallet.d.ts
CHANGED
|
@@ -21,9 +21,12 @@ export declare function ensureKey(file: string): {
|
|
|
21
21
|
* link), so it is read as named, and `warn` says when other users can read it.
|
|
22
22
|
*/
|
|
23
23
|
export declare function readKey(env: NodeJS.ProcessEnv, made: string, warn?: (message: string) => void): string | undefined;
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
/**
|
|
25
|
+
* How each agent adds the server that signs with this wallet on the testnet: the prompt on testnet.gage.cash says "do
|
|
26
|
+
* what it prints". The server serves mainnet unless told otherwise (D311), so it is told the testnet.
|
|
27
|
+
*/
|
|
28
|
+
export declare const NEXT: readonly ["Next: add gage's MCP server, which runs `npx -y gage-mcp` on the testnet and signs with this wallet, then restart so its tools load.", " Claude Code: `claude mcp add gage -e GAGE_NETWORK=testnet -- npx -y gage-mcp`", " Codex: `codex mcp add gage --env GAGE_NETWORK=testnet -- npx -y gage-mcp`", " Hermes: under mcp_servers in ~/.hermes/config.yaml, `gage: { command: \"npx\", args: [\"-y\", \"gage-mcp\"], env: { GAGE_NETWORK: \"testnet\" } }`, then /reload-mcp", " Any other agent: a stdio MCP server named gage that runs `npx -y gage-mcp` with GAGE_NETWORK=testnet."];
|
|
29
|
+
/** The same on mainnet, where the server is told its network (D260), as earlier releases needed. */
|
|
27
30
|
export declare const NEXT_MAINNET: readonly ["Next: add gage's MCP server, which runs `npx -y gage-mcp` on mainnet and signs with this wallet, then restart so its tools load.", " Claude Code: `claude mcp add gage -e GAGE_NETWORK=mainnet -- npx -y gage-mcp`", " Codex: `codex mcp add gage --env GAGE_NETWORK=mainnet -- npx -y gage-mcp`", " Hermes: under mcp_servers in ~/.hermes/config.yaml, `gage: { command: \"npx\", args: [\"-y\", \"gage-mcp\"], env: { GAGE_NETWORK: \"mainnet\" } }`, then /reload-mcp", " Any other agent: a stdio MCP server named gage that runs `npx -y gage-mcp` with GAGE_NETWORK=mainnet."];
|
|
28
31
|
export interface InitOptions {
|
|
29
32
|
gage: Gage;
|
package/dist/wallet.js
CHANGED
|
@@ -95,15 +95,18 @@ async function fund(faucetUrl, to, fetcher) {
|
|
|
95
95
|
refused: results.filter((r) => !r.hash).map((r) => `${r.label}${r.code ? ` (${r.code})` : ""}`),
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* How each agent adds the server that signs with this wallet on the testnet: the prompt on testnet.gage.cash says "do
|
|
100
|
+
* what it prints". The server serves mainnet unless told otherwise (D311), so it is told the testnet.
|
|
101
|
+
*/
|
|
99
102
|
export const NEXT = [
|
|
100
|
-
"Next: add gage's MCP server, which runs `npx -y gage-mcp` and signs with this wallet, then restart so its tools load.",
|
|
101
|
-
" Claude Code: `claude mcp add gage -- npx -y gage-mcp`",
|
|
102
|
-
" Codex: `codex mcp add gage -- npx -y gage-mcp`",
|
|
103
|
-
' Hermes: under mcp_servers in ~/.hermes/config.yaml, `gage: { command: "npx", args: ["-y", "gage-mcp"] }`, then /reload-mcp',
|
|
104
|
-
" Any other agent: a stdio MCP server named gage that runs `npx -y gage-mcp
|
|
103
|
+
"Next: add gage's MCP server, which runs `npx -y gage-mcp` on the testnet and signs with this wallet, then restart so its tools load.",
|
|
104
|
+
" Claude Code: `claude mcp add gage -e GAGE_NETWORK=testnet -- npx -y gage-mcp`",
|
|
105
|
+
" Codex: `codex mcp add gage --env GAGE_NETWORK=testnet -- npx -y gage-mcp`",
|
|
106
|
+
' Hermes: under mcp_servers in ~/.hermes/config.yaml, `gage: { command: "npx", args: ["-y", "gage-mcp"], env: { GAGE_NETWORK: "testnet" } }`, then /reload-mcp',
|
|
107
|
+
" Any other agent: a stdio MCP server named gage that runs `npx -y gage-mcp` with GAGE_NETWORK=testnet.",
|
|
105
108
|
];
|
|
106
|
-
/** The same on mainnet, where the server is told its network (D260). */
|
|
109
|
+
/** The same on mainnet, where the server is told its network (D260), as earlier releases needed. */
|
|
107
110
|
export const NEXT_MAINNET = [
|
|
108
111
|
"Next: add gage's MCP server, which runs `npx -y gage-mcp` on mainnet and signs with this wallet, then restart so its tools load.",
|
|
109
112
|
" Claude Code: `claude mcp add gage -e GAGE_NETWORK=mainnet -- npx -y gage-mcp`",
|
|
@@ -120,7 +123,7 @@ export async function init(o) {
|
|
|
120
123
|
const chainId = o.gage.deployment.chainId, mainnet = chainId === MAINNET;
|
|
121
124
|
const file = keyFile(o.home, chainId);
|
|
122
125
|
const { key, created } = ensureKey(file);
|
|
123
|
-
const signer = privateKeySigner(key, { ...(o.rpcUrl ? { rpcUrl: o.rpcUrl } : {}),
|
|
126
|
+
const signer = privateKeySigner(key, { ...(o.rpcUrl ? { rpcUrl: o.rpcUrl } : {}), network: mainnet ? "mainnet" : "testnet" });
|
|
124
127
|
o.out(`Your gage wallet on Robinhood Chain${mainnet ? "" : " testnet"} (${chainId}): ${signer.address}`);
|
|
125
128
|
o.out(created ? `Made just now. Its key is in ${file}, readable only by you: never print, share or move it.` : `It already existed; its key is in ${file}.`);
|
|
126
129
|
if (o.faucetUrl) {
|
|
@@ -144,7 +147,7 @@ export async function init(o) {
|
|
|
144
147
|
}
|
|
145
148
|
if (o.limits) {
|
|
146
149
|
o.out(`Spend limits: ${limitsSentence(o.limits)}`);
|
|
147
|
-
o.out("Change them in the server's environment: GAGE_MAX_BORROW_USDG, GAGE_MAX_BORROW_DAY_USDG, GAGE_MAX_DEPOSIT_USDG, GAGE_MAX_DEPOSIT_DAY_USDG (amounts of USDG).");
|
|
150
|
+
o.out("Change them in the server's environment: GAGE_MAX_BORROW_USDG, GAGE_MAX_BORROW_DAY_USDG, GAGE_MAX_DEPOSIT_USDG, GAGE_MAX_DEPOSIT_DAY_USDG (amounts of USDG, or off for no limit).");
|
|
148
151
|
}
|
|
149
152
|
for (const line of mainnet ? NEXT_MAINNET : NEXT)
|
|
150
153
|
o.out(line);
|
package/package.json
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gage-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"mcpName": "cash.gage/gage",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "gage's MCP server for agents with their own wallet: `npx -y gage-mcp init`, then borrow and earn on gage. Robinhood Chain under spend limits, and its testnet.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"homepage": "https://gage.cash/agents/valet",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/DebenLabs/gage-sdk.git",
|
|
12
|
+
"directory": "packages/mcp"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/DebenLabs/gage-sdk/issues"
|
|
16
|
+
},
|
|
9
17
|
"keywords": [
|
|
10
18
|
"gage",
|
|
11
19
|
"mcp",
|
|
@@ -39,7 +47,7 @@
|
|
|
39
47
|
"@modelcontextprotocol/server": "2.0.0",
|
|
40
48
|
"viem": "2.56.3",
|
|
41
49
|
"zod": "^4.5.4",
|
|
42
|
-
"gage-sdk": "0.
|
|
50
|
+
"gage-sdk": "0.6.0"
|
|
43
51
|
},
|
|
44
52
|
"devDependencies": {
|
|
45
53
|
"@modelcontextprotocol/client": "2.0.0",
|