@mint.club/v2-mcp 2.0.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/README.md +117 -0
- package/dist/index.js +14417 -0
- package/package.json +64 -0
package/README.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Mint Club V2 MCP Server
|
|
2
|
+
|
|
3
|
+
An MCP server exposing Mint Club V2 Bond operations and bounded local Uniswap ZapV2 routing across ten mainnets and two testnets.
|
|
4
|
+
|
|
5
|
+
[npm package](https://www.npmjs.com/package/@mint.club/v2-mcp) · [repository](https://github.com/Steemhunt/mint.club-v2-ai) · [CLI reference](../cli) · [ElizaOS plugin](../eliza-plugin)
|
|
6
|
+
|
|
7
|
+
The server delegates to [`@mint.club/v2-cli`](../cli), so the CLI remains the single source of truth for contracts, token resolution, route discovery, pricing, and transactions. Chain keys are loaded from the CLI's published `chain-registry.json` rather than duplicated in the MCP package.
|
|
8
|
+
|
|
9
|
+
## Configure
|
|
10
|
+
|
|
11
|
+
Requires Node.js 18 or later. Most MCP clients can launch the package directly with `npx`:
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"mcpServers": {
|
|
16
|
+
"mintclub": {
|
|
17
|
+
"command": "npx",
|
|
18
|
+
"args": ["-y", "@mint.club/v2-mcp@2"]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
For a global installation, run `npm install -g @mint.club/v2-mcp` and use `"command": "mintclub-mcp"` instead. The MCP package installs a compatible `@mint.club/v2-cli` 2.x runtime dependency automatically.
|
|
25
|
+
|
|
26
|
+
Read-only tools work without a wallet. Write tools and `wallet_balance` require `PRIVATE_KEY` in the server process, or a key in `~/.mintclub/.env`. Supply it through the MCP client's secret/environment facility. To generate a dedicated local wallet, install the CLI and run `mc wallet --generate` in a trusted terminal.
|
|
27
|
+
|
|
28
|
+
> Never store a key in a committed MCP configuration or paste it into a model conversation. Use a dedicated wallet with limited funds.
|
|
29
|
+
|
|
30
|
+
## Tools
|
|
31
|
+
|
|
32
|
+
The server exposes nine protocol-specific tools:
|
|
33
|
+
|
|
34
|
+
| Tool | Description |
|
|
35
|
+
|---|---|
|
|
36
|
+
| `token_info` | Token supply, reserve, curve, price, and USD values |
|
|
37
|
+
| `token_price` | Price in reserve token and USD |
|
|
38
|
+
| `wallet_balance` | Chain-local configured-wallet balances |
|
|
39
|
+
| `buy_token` | `MCV2_Bond.mint` with reserve ERC-20 |
|
|
40
|
+
| `sell_token` | `MCV2_Bond.burn` for reserve ERC-20 |
|
|
41
|
+
| `zap_buy` | Exact routed input asset → `MCV2_ZapV2.zapMint` |
|
|
42
|
+
| `zap_sell` | `MCV2_ZapV2.zapBurn` → routed output asset |
|
|
43
|
+
| `send_token` | Send native currency or an ERC-20 token |
|
|
44
|
+
| `create_token` | Create an ERC-20 bonding curve token |
|
|
45
|
+
|
|
46
|
+
`create_token` requires `curve`, `initialPrice`, and `finalPrice` in addition to its name, symbol, reserve, and maximum supply. It uses the CLI defaults of 100 basis points (1%) for both mint and burn royalties; use the CLI directly when different royalties are required.
|
|
47
|
+
|
|
48
|
+
Every tool accepts an optional canonical `chain` property. Base is the default. Supported values are:
|
|
49
|
+
|
|
50
|
+
`ethereum` · `optimism` · `arbitrum` · `avalanche` · `base` · `polygon` · `bsc` · `zora` · `unichain` · `robinhood` · `sepolia` · `base-sepolia`
|
|
51
|
+
|
|
52
|
+
Blast is unsupported by this integration.
|
|
53
|
+
|
|
54
|
+
## ZapV2 inputs
|
|
55
|
+
|
|
56
|
+
`zap_buy` requires:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"chain": "arbitrum",
|
|
61
|
+
"token": "0xMINT_CLUB_TOKEN",
|
|
62
|
+
"inputToken": "USDT",
|
|
63
|
+
"inputAmount": "10",
|
|
64
|
+
"slippage": "1"
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Optional `minTokens` is denominated in the Mint Club token. `inputAmount` is exact.
|
|
69
|
+
|
|
70
|
+
`zap_sell` requires:
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"chain": "unichain",
|
|
75
|
+
"token": "0xMINT_CLUB_TOKEN",
|
|
76
|
+
"amount": "100",
|
|
77
|
+
"outputToken": "USDC",
|
|
78
|
+
"slippage": "1"
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Optional `minOutput` is denominated in the output asset. `amount` is the exact Mint Club token burn amount.
|
|
83
|
+
|
|
84
|
+
The Mint Club token passed to `zap_buy` or `zap_sell` may be ERC-20 or ERC-1155; ERC-1155 amounts must be whole numbers. Routed input and output assets must be native currency or ERC-20 tokens.
|
|
85
|
+
|
|
86
|
+
The CLI enumerates direct and one-intermediary homogeneous V2/V3/V4 candidates where configured, selects the greatest exact-input output among those candidates, and encodes it with the Universal Router SDK. It does not call an external routing API and does not claim global route optimality.
|
|
87
|
+
|
|
88
|
+
ZapV2 is deployed on every supported chain listed above. Deployment addresses are maintained by `@mint.club/v2-cli`; see the [CLI contract table](../cli/README.md#mint-club-contract-configuration).
|
|
89
|
+
|
|
90
|
+
## Example requests
|
|
91
|
+
|
|
92
|
+
- “Get token info for SIGNET on Base.” → `token_info`
|
|
93
|
+
- “Mint 100 TOKEN on Robinhood with its USDG reserve.” → `buy_token`
|
|
94
|
+
- “Buy TOKEN with exactly 10 USDT on Arbitrum.” → `zap_buy`
|
|
95
|
+
- “Sell 50 TOKEN for USDC on Unichain.” → `zap_sell`
|
|
96
|
+
- “Create token My Token (MYT), backed by USDG on Robinhood, with maximum supply 1,000,000 and a linear curve from 0.01 to 1 USDG.” → `create_token`
|
|
97
|
+
|
|
98
|
+
## Safe CLI execution
|
|
99
|
+
|
|
100
|
+
Tool arguments are passed to `mc` with `execFileSync` argv arrays. User values are not interpolated into a shell command.
|
|
101
|
+
|
|
102
|
+
Set `MINTCLUB_CLI` to override the CLI executable path.
|
|
103
|
+
|
|
104
|
+
## Development
|
|
105
|
+
|
|
106
|
+
From the repository root:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
npm ci
|
|
110
|
+
npm --prefix mcp run check
|
|
111
|
+
npm --prefix mcp test
|
|
112
|
+
npm --prefix mcp run build
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## License
|
|
116
|
+
|
|
117
|
+
MIT
|