@parabolicfamily/mcp 0.1.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/LICENSE +21 -0
- package/README.md +195 -0
- package/abi/ParabolicBondingCurve.json +1223 -0
- package/abi/ParabolicLaunchFactory.json +2212 -0
- package/abi/ParabolicLauncherToken.json +577 -0
- package/abi/ParabolicMemoRouter.json +950 -0
- package/dist/abi.d.ts +17 -0
- package/dist/abi.js +37 -0
- package/dist/abi.js.map +1 -0
- package/dist/chain.d.ts +32 -0
- package/dist/chain.js +48 -0
- package/dist/chain.js.map +1 -0
- package/dist/coins.d.ts +52 -0
- package/dist/coins.js +75 -0
- package/dist/coins.js.map +1 -0
- package/dist/config.d.ts +55 -0
- package/dist/config.js +86 -0
- package/dist/config.js.map +1 -0
- package/dist/curve.d.ts +92 -0
- package/dist/curve.js +127 -0
- package/dist/curve.js.map +1 -0
- package/dist/docs.d.ts +3 -0
- package/dist/docs.js +63 -0
- package/dist/docs.js.map +1 -0
- package/dist/format.d.ts +19 -0
- package/dist/format.js +30 -0
- package/dist/format.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/parabolic.d.ts +780 -0
- package/dist/parabolic.js +710 -0
- package/dist/parabolic.js.map +1 -0
- package/dist/server.d.ts +32 -0
- package/dist/server.js +149 -0
- package/dist/server.js.map +1 -0
- package/dist/subgraph.d.ts +85 -0
- package/dist/subgraph.js +43 -0
- package/dist/subgraph.js.map +1 -0
- package/dist/tx.d.ts +115 -0
- package/dist/tx.js +105 -0
- package/dist/tx.js.map +1 -0
- package/package.json +64 -0
- package/src/abi.ts +41 -0
- package/src/chain.ts +60 -0
- package/src/coins.ts +118 -0
- package/src/config.ts +123 -0
- package/src/curve.ts +171 -0
- package/src/docs.ts +63 -0
- package/src/format.ts +34 -0
- package/src/index.ts +14 -0
- package/src/parabolic.ts +753 -0
- package/src/server.ts +229 -0
- package/src/subgraph.ts +61 -0
- package/src/tx.ts +146 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Parabolic
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# Parabolic MCP server
|
|
2
|
+
|
|
3
|
+
A small [Model Context Protocol](https://modelcontextprotocol.io) server for **Parabolic**, the dollar-native token launchpad on Arc. It lets AI agents (Claude Code, Cursor, custom ERC-8004 agents) discover coins, quote curve trades with the contract's exact math, and build **unsigned** transactions, without a browser.
|
|
4
|
+
|
|
5
|
+
**What it never does:** hold keys, sign, send or broadcast transactions, custody funds, or accept private keys, seed phrases or session tokens as input. Every `build_*` tool returns `{ to, data, value, chainId }` for the caller's own wallet to sign. Quotes are read from chain at call time and can move before a transaction lands.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
Requires Node 22+. Nothing to build: point your MCP client at it with `npx`.
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npx -y @parabolicfamily/mcp # starts the server on stdio
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The ABIs ship with the package, so it works offline against any Arc RPC you point it at.
|
|
16
|
+
|
|
17
|
+
## Configure
|
|
18
|
+
|
|
19
|
+
Nothing is required. Out of the box the server talks to **Arc Testnet** with the deployed Parabolic
|
|
20
|
+
addresses already built in, so `npx -y @parabolicfamily/mcp` is a working install.
|
|
21
|
+
|
|
22
|
+
Set `PARABOLIC_CHAIN_ID` and the RPC and contract addresses for that chain follow it. Arc mainnet
|
|
23
|
+
(5042) opens on **16 September 2026**; its addresses ship in the release right after the deployment.
|
|
24
|
+
|
|
25
|
+
| Variable | Meaning | Default |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| `PARABOLIC_CHAIN_ID` | 5042002 Arc Testnet, 5042 Arc mainnet | `5042002` |
|
|
28
|
+
| `PARABOLIC_RPC_URL` | Arc JSON-RPC endpoint | the public endpoint for the chain id |
|
|
29
|
+
| `PARABOLIC_FACTORY` | `ParabolicLaunchFactory`: coin lookups, launch transactions, log-scan listing | the deployment for the chain id |
|
|
30
|
+
| `PARABOLIC_MEMO_ROUTER` | `ParabolicMemoRouter`: the atomic launch-and-buy and the referral-carrying buy | the deployment for the chain id |
|
|
31
|
+
| `PARABOLIC_EURC` | EURC address, only for EURC-quoted coins | the deployment for the chain id |
|
|
32
|
+
| `PARABOLIC_SUBGRAPH_URL` | Subgraph endpoint: richer listings, holders, 24h volume, protocol stats | unset (falls back to a log scan) |
|
|
33
|
+
| `PARABOLIC_HOOK` | `ParabolicHook` address | read from `factory.memeHook()` |
|
|
34
|
+
| `PARABOLIC_ARC_MEMO` | Arc `Memo` system contract | `0x5294E9927c3306DcBaDb03fe70b92e01cCede505` |
|
|
35
|
+
| `PARABOLIC_LAUNCH_CONFIG_ID` | Factory launch-config index (0 = the $5K open / $12,500 graduation curve) | `0` |
|
|
36
|
+
| `PARABOLIC_FACTORY_START_BLOCK` | First block of the `TokenLaunched` scan used when there is no subgraph | `0` |
|
|
37
|
+
|
|
38
|
+
Every deployed address is published at <https://www.parabolic.family/docs#contracts> and verified on
|
|
39
|
+
Arcscan, so you can check the built-in defaults against the site before you sign anything.
|
|
40
|
+
|
|
41
|
+
### Claude Code
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
claude mcp add parabolic -- npx -y @parabolicfamily/mcp
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
That is enough to browse coins and quote trades on Arc Testnet. For mainnet, or to use a subgraph for
|
|
48
|
+
richer listings, add the environment:
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
claude mcp add parabolic \
|
|
52
|
+
-e PARABOLIC_CHAIN_ID=5042 \
|
|
53
|
+
-e PARABOLIC_SUBGRAPH_URL=https://your-subgraph/gn \
|
|
54
|
+
-- npx -y @parabolicfamily/mcp
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Generic JSON (Cursor, Claude Desktop, other MCP clients)
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"mcpServers": {
|
|
62
|
+
"parabolic": {
|
|
63
|
+
"command": "npx",
|
|
64
|
+
"args": ["-y", "@parabolicfamily/mcp"],
|
|
65
|
+
"env": {
|
|
66
|
+
"PARABOLIC_CHAIN_ID": "5042002"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Hosting over HTTP later
|
|
74
|
+
|
|
75
|
+
`createServer()` (the package's main export) builds the `McpServer` without a transport, so the same tools can be served over Streamable HTTP:
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
79
|
+
import { createServer } from "@parabolicfamily/mcp";
|
|
80
|
+
|
|
81
|
+
const server = createServer(); // reads PARABOLIC_* from process.env
|
|
82
|
+
const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: undefined });
|
|
83
|
+
await server.connect(transport);
|
|
84
|
+
// then hand transport.handleRequest(req, res, body) to your HTTP framework
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`createServer({ config, env, rpc, fetch })` also accepts overrides, which is how the tests inject an in-memory RPC and a fake subgraph.
|
|
88
|
+
|
|
89
|
+
## Tools
|
|
90
|
+
|
|
91
|
+
Amounts go in as whole units (`"25"` or `25` = 25 USDC; tokens likewise) and come back as `{ amount, raw }` pairs (whole units and raw 18-decimal, or 6-decimal for EURC, integers). Addresses are checksummed. Every tool returns JSON text plus `structuredContent`; errors come back as `isError` results with a plain message.
|
|
92
|
+
|
|
93
|
+
| Tool | Purpose |
|
|
94
|
+
|---|---|
|
|
95
|
+
| `parabolic.list_coins` | `{ status?: "climbing" \| "graduated", sort?: "trending" \| "new" \| "near_graduation" \| "market_cap", limit? }`. Subgraph when configured (adds holders, 24h volume/change), otherwise a `TokenLaunched` log scan of the factory (newest 50). |
|
|
96
|
+
| `parabolic.get_coin` | `{ address }` (token or curve). Name, ticker, creator, curve, status/phase, raised/threshold/progress, price, market cap, holders, pool id, fee terms and 50/30/20 split, snipe-tax window and `currentSnipeTaxBps()`. |
|
|
97
|
+
| `parabolic.quote_buy` | `{ address, quoteIn, buyer?, slippageBps? }`. Exact curve math on live reserves: fee, creator tax and snipe tax legs, spot vs effective price, price impact, whether the buy graduates the coin, suggested `minTokensOut`. `buyer` checks the snipe-tax exemption. |
|
|
98
|
+
| `parabolic.quote_sell` | `{ address, tokensIn, slippageBps? }`. Gross, fee, creator tax, effective price, price impact, suggested `minQuoteOut`. |
|
|
99
|
+
| `parabolic.build_buy_tx` | `{ address, quoteIn, minTokensOut?, recipient, buyer?, slippageBps?, memo? }` → unsigned `curve.buy(...)` (value = quote on native-USDC curves; an approval step for EURC pairs). `memo: { referral, note? }` returns the memo-routed variant instead (see below). |
|
|
100
|
+
| `parabolic.build_sell_tx` | `{ address, tokensIn, minQuoteOut?, recipient, slippageBps? }` → unsigned ERC-20 approval + `curve.sell(...)`. |
|
|
101
|
+
| `parabolic.build_launch_tx` | `{ name, ticker, image?, description?, socials?, pair?, devBuy?, creatorTaxBps?, creator, buybackEnabled? }`. The `TokenParams` are built exactly like the web Create form (economics pinned with `previewLaunchEconomics`, random salt). With `devBuy` and `PARABOLIC_MEMO_ROUTER` set: one unsigned `ParabolicMemoRouter.launchAndBuy` (value = launch fee + dev buy, `creatorFeeRecipient` zero, `minTokensOut` from the curve math on the launch config; `launchAndBuyWithToken` plus an approval for EURC). Otherwise: unsigned `factory.launchToken(...)` with the launch fee as value and, for a `devBuy`, the follow-up buy calldata to send to the curve from the `TokenLaunched` event. |
|
|
102
|
+
| `parabolic.protocol_stats` | Subgraph totals (launches, graduations, trades, volume, fees, daily series) plus the factory's live launch fee, curve preset, snipe-tax terms and contract addresses. |
|
|
103
|
+
| `parabolic.docs` | The adopted parameters, curve mechanics, verified Arc facts and this server's configuration, as text. |
|
|
104
|
+
|
|
105
|
+
Resources: `parabolic://docs/parameters` (same text as `parabolic.docs`) and `parabolic://coins/{address}` (same JSON as `parabolic.get_coin`).
|
|
106
|
+
|
|
107
|
+
### Examples
|
|
108
|
+
|
|
109
|
+
Quote a $50 buy on a freshly opened curve (result abbreviated; the numbers are what the ported math returns for the adopted parameters):
|
|
110
|
+
|
|
111
|
+
```json
|
|
112
|
+
{ "name": "parabolic.quote_buy", "arguments": { "address": "0x1000…0001", "quoteIn": "50" } }
|
|
113
|
+
```
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"side": "buy", "pair": "USDC",
|
|
117
|
+
"quoteIn": { "amount": "50", "raw": "50000000000000000000" },
|
|
118
|
+
"tokensOut": { "amount": "9802950.787206654124170709", "raw": "9802950787206654124170709" },
|
|
119
|
+
"minTokensOut": { "amount": "9704921.279334587582929001", "raw": "9704921279334587582929001", "slippageBps": 100 },
|
|
120
|
+
"fees": { "totalBps": 100, "fee": { "bps": 100, "amount": "0.5" }, "creatorTax": { "bps": 0, "amount": "0" }, "snipeTax": { "bps": 0, "amount": "0", "windowOpen": false, "buyerExempt": false } },
|
|
121
|
+
"spotPrice": 0.000005, "effectivePrice": 0.0000051005, "priceImpactPct": 2.0101, "graduatesCoin": false
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Build the same buy for a wallet to sign:
|
|
126
|
+
|
|
127
|
+
```json
|
|
128
|
+
{ "name": "parabolic.build_buy_tx", "arguments": { "address": "0x1000…0001", "quoteIn": "50", "recipient": "0xYourWallet" } }
|
|
129
|
+
```
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"kind": "buy",
|
|
133
|
+
"tx": { "to": "0x2000…0002", "data": "0x…", "value": "0x2b5e3af16b1880000", "valueWei": "50000000000000000000", "chainId": 5042002 },
|
|
134
|
+
"quote": { "expectedTokensOut": { "…": "…" }, "minTokensOut": { "…": "…" }, "graduatesCoin": false },
|
|
135
|
+
"gas": { "note": "estimate then multiply by 1.25 …" }
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Launch a coin with a $200 dev buy:
|
|
140
|
+
|
|
141
|
+
```json
|
|
142
|
+
{ "name": "parabolic.build_launch_tx", "arguments": { "name": "Orange Pill", "ticker": "PILL", "image": "ipfs://…", "description": "a frog", "socials": { "twitter": "@robin" }, "creatorTaxBps": 250, "devBuy": "200", "creator": "0xYourWallet" } }
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
With `PARABOLIC_MEMO_ROUTER` set the result is `kind: "launch_and_buy"`: one `tx` to the router (`value` = $1 launch fee + $200), the encoded `params` (`creatorFeeRecipient` zero, as the router requires), the curve `terms` (opening and fully diluted graduation market caps, reserved / pool-seed / locked token shares, snipe-tax window) and `devBuy` (expected and minimum tokens, snipe-tax exempt). Without the router it is `kind: "launch"`: `tx` to the factory (value = the launch fee) and `devBuy` with the calldata for the second, snipe-tax-exempt transaction to the new curve. There is no exemption list: only the creator's own address is exempt from the snipe tax.
|
|
146
|
+
|
|
147
|
+
## Notes on the mechanics
|
|
148
|
+
|
|
149
|
+
- Curve math is a port of `ParabolicBondingCurve` / `ParabolicBondingCurveMath` (and of `web/lib/curve.ts`): fee legs are taken off the buy input separately, the constant product is priced on `getReserves()`, and a buy that would take more than `sellableTokens()` is clamped to the last sellable tokens, charged the grossed-up price and refunded the rest; that buy graduates the coin, so give it extra gas. Sells take the fee off the gross quote output and close once the curve is ready to graduate.
|
|
150
|
+
- `minTokensOut` on the curve is a price bound (`spent × minTokensOut ≤ received × tokensOut`), so a clamped fill still honours the caller's terms.
|
|
151
|
+
- The snipe tax decays per second along `remaining² / window²`; a quote in the launch window overstates the tax a later block charges. Pass `buyer` to have the exemption checked.
|
|
152
|
+
- At graduation the curve still holds the reserved 28.57% of supply: ≈ 20.4% seeds the Uniswap v4 full-range position with the $12,500 raised at the same terminal price, and ≈ 8.2% is permanently locked. Fully diluted graduation market cap: $61,250.
|
|
153
|
+
- Fair launch: `ParabolicMemoRouter.launchAndBuy` / `launchAndBuyWithToken` put the creator's opening buy inside the launch transaction (snipe-tax exempt, before anyone else can trade). Called directly they work from any wallet; the router forwards no exemption list and rejects a `creatorFeeRecipient` other than zero or the signer.
|
|
154
|
+
- A memo-routed buy (`memo: { referral }`) wraps `ParabolicMemoRouter.buy` inside Arc's `Memo.memo(...)` so the referral code is attributed on-chain. It is **EOA-only** (the Memo contract's caller must be `tx.origin`) and forwards no value, so the router pulls whole 6-decimal USDC units through the ERC-20 view (`0x3600…0000`) and needs a one-time approval; smart-account wallets should use the direct buy. Memo-wrapped launches (referral on a launch) are not built here.
|
|
155
|
+
- The factory has no enumeration function (only `getLaunchedToken(address)`), so listing needs the subgraph; without it the server scans `TokenLaunched` logs from `PARABOLIC_FACTORY_START_BLOCK` and reads the newest 50 launches.
|
|
156
|
+
|
|
157
|
+
## Development
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
src/
|
|
161
|
+
index.ts stdio entry point (bin: parabolic-mcp)
|
|
162
|
+
server.ts createServer(): tools + resources on @modelcontextprotocol/sdk McpServer
|
|
163
|
+
parabolic.ts the service: reads (RPC + subgraph) and unsigned tx builders
|
|
164
|
+
curve.ts ported curve math
|
|
165
|
+
tx.ts viem encodeFunctionData builders (buy, sell, approve, launchToken, memo buy)
|
|
166
|
+
chain.ts viem RPC wrapper (batched HTTP) behind a small Rpc interface
|
|
167
|
+
subgraph.ts GraphQL client and Coin/Protocol shapes
|
|
168
|
+
coins.ts coin summaries, sorting
|
|
169
|
+
config.ts PARABOLIC_* environment
|
|
170
|
+
abi.ts loads abi/*.json
|
|
171
|
+
docs.ts parameters + Arc facts text
|
|
172
|
+
test/ vitest (curve parity, calldata decode, tools over an in-memory MCP transport)
|
|
173
|
+
scripts/ sync-abis.mjs, smoke.mjs
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Scripts: `npm run build`, `npm test`, `npm start` (stdio), `npm run smoke`, `npm run sync-abis`, `npm run typecheck`.
|
|
177
|
+
|
|
178
|
+
## Working on the server itself
|
|
179
|
+
|
|
180
|
+
The source lives in a private repository; the published package ships `src/` alongside `dist/` so the
|
|
181
|
+
code is readable from `node_modules`. If you have the repository checked out:
|
|
182
|
+
|
|
183
|
+
```sh
|
|
184
|
+
npm install # reads .npmrc (legacy-peer-deps) to skip a vitest peer-resolution bug on Node 23
|
|
185
|
+
npm run build # -> dist/
|
|
186
|
+
npm test # vitest: curve math, tx builders, tools against a mocked subgraph and RPC
|
|
187
|
+
npm run smoke # starts dist/index.js over stdio, initialize + tools/list
|
|
188
|
+
npm run sync-abis # re-copy abi/*.json from ../contracts/out after a forge build
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Links
|
|
192
|
+
|
|
193
|
+
- Parabolic — <https://www.parabolic.family>
|
|
194
|
+
- Protocol parameters, deployed addresses and the public read API — <https://www.parabolic.family/docs>
|
|
195
|
+
- Questions and bug reports — contact@parabolic.family
|