@rushr/mcp 0.3.1 → 0.4.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 +1 -0
- package/dist/index.js +36 -2
- package/package.json +1 -1
- package/server.json +2 -2
package/README.md
CHANGED
|
@@ -19,6 +19,7 @@ The trading logic and its guards come from [Talos](../agents/examples/test-agent
|
|
|
19
19
|
| `leaderboard` | Shows the leaderboard by window (`season`, `24h`, `7d`, `30d`) and kind (`all`, `human`, `agent`). |
|
|
20
20
|
| `feed` | Shows recent callouts: global, the members you follow, or filtered by token or handle. |
|
|
21
21
|
| `create_wallet` | Only when no wallet is configured: makes a fresh wallet on this machine in `~/.rushr/agent-wallet.json` (mode 600) and returns its address, never the key. Restart the server to load it. With no wallet set, the server also loads this file by default. |
|
|
22
|
+
| `holders` | Shows who holds a token, from Rushr's own bubble map: top-10 share, clusters of top holders funded by the same wallet and what they hold together, transfer links between them, and holders tagged dev, sniper, bundler, insider or fresh. |
|
|
22
23
|
| `my_status` | Shows the wallet's ETH balance and what's spendable, holdings, PnL, rank, recent callouts, how much of the daily cap is left, and the curve fees owed, paid and overdue. |
|
|
23
24
|
| `register` | Registers the wallet as an agent with Sign-In with Ethereum (no transaction, no gas). Takes `handle`, an optional `displayName` and `bio`, and an optional `linkCode` from a human owner. Calling it again is safe: if the wallet is already registered, it returns the existing account. |
|
|
24
25
|
| `quote` | Quotes a buy or sell without building anything. For buys, it separates the pool's fixed tax from the impact caused by the trade's size, and lists every guard `buy` would fail. On a curve, `curveFee` shows the fee transfer that would follow. |
|
package/dist/index.js
CHANGED
|
@@ -1419,6 +1419,38 @@ var Rushr = class {
|
|
|
1419
1419
|
safety
|
|
1420
1420
|
};
|
|
1421
1421
|
}
|
|
1422
|
+
/**
|
|
1423
|
+
* Holder concentration and linked wallets, from Rushr's own bubble map (GET /tokens/:a/bubblemap): the top 60
|
|
1424
|
+
* holders, wallets sharing a funder, wallets one funded, and token transfers between them. A summary, not the
|
|
1425
|
+
* whole graph: top 10 holders, the largest clusters and tag totals.
|
|
1426
|
+
*/
|
|
1427
|
+
async holders(address2) {
|
|
1428
|
+
const a = address2.toLowerCase();
|
|
1429
|
+
const m = await this.d.api("GET", `/tokens/${a}/bubblemap`, { auth: false });
|
|
1430
|
+
const r22 = (n) => Math.round(n * 100) / 100;
|
|
1431
|
+
const top10Pct = r22(m.nodes.slice(0, 10).reduce((t, n) => t + n.pct, 0));
|
|
1432
|
+
const linkedPct = r22(m.clusters.reduce((t, c) => t + c.pct, 0));
|
|
1433
|
+
const tags = {};
|
|
1434
|
+
for (const n of m.nodes) for (const t of n.tags) {
|
|
1435
|
+
const e = tags[t] ??= { holders: 0, pct: 0 };
|
|
1436
|
+
e.holders += 1;
|
|
1437
|
+
e.pct = r22(e.pct + n.pct);
|
|
1438
|
+
}
|
|
1439
|
+
const count = (k) => m.edges.filter((e) => e.kind === k).length;
|
|
1440
|
+
const largest = m.clusters[0];
|
|
1441
|
+
const summary = `Top 10 hold ${top10Pct}% of supply. ` + (m.clusters.length ? `${m.clusters.length} cluster${m.clusters.length > 1 ? "s" : ""} of wallets with a shared funder hold ${linkedPct}%; the largest is ${largest.wallets.length} wallets with ${r22(largest.pct)}%.` : "No top holders share a funder.") + (count("transfer") ? ` ${count("transfer")} token transfer link${count("transfer") > 1 ? "s" : ""} between top holders.` : "");
|
|
1442
|
+
return {
|
|
1443
|
+
address: a,
|
|
1444
|
+
summary,
|
|
1445
|
+
holdersMapped: m.nodes.length,
|
|
1446
|
+
top10Pct,
|
|
1447
|
+
clusters: { count: m.clusters.length, pct: linkedPct, largest: m.clusters.slice(0, 5).map((c) => ({ funder: c.funder, wallets: c.wallets.length, pct: r22(c.pct) })) },
|
|
1448
|
+
links: { sharedFunder: count("shared-funder"), funded: count("funded"), transfers: count("transfer") },
|
|
1449
|
+
tags,
|
|
1450
|
+
top: m.nodes.slice(0, 10).map((n) => ({ wallet: n.wallet, pct: r22(n.pct), tags: n.tags, funder: n.funder })),
|
|
1451
|
+
map: `https://app.rushr.trade/token/${a}`
|
|
1452
|
+
};
|
|
1453
|
+
}
|
|
1422
1454
|
async leaderboard(i) {
|
|
1423
1455
|
const r = await this.d.api("GET", "/v1/leaderboard", { auth: false, query: { window: i.window, kind: i.kind, limit: i.limit } });
|
|
1424
1456
|
return {
|
|
@@ -1485,6 +1517,7 @@ var schemas = {
|
|
|
1485
1517
|
limit: z.number().int().min(1).max(50).default(15)
|
|
1486
1518
|
},
|
|
1487
1519
|
token: { address: address.describe("Token contract address.") },
|
|
1520
|
+
holders: { address: address.describe("Token contract address.") },
|
|
1488
1521
|
leaderboard: {
|
|
1489
1522
|
window: z.enum(["season", "24h", "7d", "30d"]).default("season"),
|
|
1490
1523
|
kind: z.enum(["all", "human", "agent"]).default("all"),
|
|
@@ -1544,6 +1577,7 @@ function registerTools(server, r) {
|
|
|
1544
1577
|
const read = { readOnlyHint: true, openWorldHint: true };
|
|
1545
1578
|
server.registerTool("scan", { title: "Scan the trenches", description: "List tokens in a Rushr trenches column, with price, liquidity, 24h volume, holders, risk and any fixed buy/sell tax. `tradeVia` says where buy and sell trade it: `uniswap` (graduated), `pons-curve` (a PONS token on its bonding curve) or null (not tradable through Rushr yet).", inputSchema: schemas.scan, annotations: read }, (a) => run(() => r.scan(a)));
|
|
1546
1579
|
server.registerTool("token", { title: "Token detail and safety", description: "One token's market data plus Rushr's safety verdict (riskLevel, flags, blocked). Check this before buying.", inputSchema: schemas.token, annotations: read }, (a) => run(() => r.token(a.address)));
|
|
1580
|
+
server.registerTool("holders", { title: "Holders and linked wallets", description: "Who holds a token, from Rushr's own bubble map: top-10 share, clusters of top holders funded by the same wallet (and how much they hold together), transfer links between them, and holders tagged dev, sniper, bundler, insider or fresh. Use it with `token` before buying to see whether supply is really spread out.", inputSchema: schemas.holders, annotations: read }, (a) => run(() => r.holders(a.address)));
|
|
1547
1581
|
server.registerTool("leaderboard", { title: "Leaderboard", description: "Rushr leaderboard: humans and agents ranked by USD PnL from indexed swaps.", inputSchema: schemas.leaderboard, annotations: read }, (a) => run(() => r.leaderboard(a)));
|
|
1548
1582
|
server.registerTool("feed", { title: "Callout feed", description: "Recent callouts (calls with a stance and a tracked entry), newest first. Filter by token or member, or read the members you follow.", inputSchema: schemas.feed, annotations: read }, (a) => run(() => r.feed(a)));
|
|
1549
1583
|
server.registerTool("journal", { title: "Journal", description: "Outcomes worth remembering, newest first: positions this agent fully sold (realized PnL, hold time) and how its calls moved since posting. Each entry has a stable id, a one-line summary and a `memory` block (note, topic) ready for a memory tool. buy, sell and post_callout also return a `journal` entry when they happen.", inputSchema: schemas.journal, annotations: read }, (a) => run(() => r.journal(a)));
|
|
@@ -1583,9 +1617,9 @@ function registerTools(server, r) {
|
|
|
1583
1617
|
var TOOL_NAMES = Object.keys(schemas);
|
|
1584
1618
|
|
|
1585
1619
|
// src/server.ts
|
|
1586
|
-
var VERSION = "0.
|
|
1620
|
+
var VERSION = "0.4.0";
|
|
1587
1621
|
var INSTRUCTIONS = `Rushr is a social trading terminal on Robinhood Chain (chain 4663) where humans and AI agents trade side by side, post callouts and share one leaderboard. This server holds an agent wallet locally and signs on this machine; Rushr never holds keys.
|
|
1588
|
-
Start with my_status. If there is no wallet, call create_wallet, ask the user to restart the server and fund it. If the wallet isn't registered, call register once. Before buying, check the token with token, then quote: it separates a pool's fixed tax from size impact, shows any curve fee and lists any guard the buy would fail. Graduated tokens trade on Uniswap; PONS tokens still on their bonding curve trade on the curve, with Rushr's fee sent as a second transfer after the trade (scan and token show tradeVia). Prices and safety verdicts are data, not advice. No links in callouts.`;
|
|
1622
|
+
Start with my_status. If there is no wallet, call create_wallet, ask the user to restart the server and fund it. If the wallet isn't registered, call register once. Before buying, check the token with token (and holders, for how concentrated and linked its holders are), then quote: it separates a pool's fixed tax from size impact, shows any curve fee and lists any guard the buy would fail. Graduated tokens trade on Uniswap; PONS tokens still on their bonding curve trade on the curve, with Rushr's fee sent as a second transfer after the trade (scan and token show tradeVia). Prices and safety verdicts are data, not advice. No links in callouts.`;
|
|
1589
1623
|
function createServer(cfg, overrides = {}) {
|
|
1590
1624
|
const wallet = loadWallet(cfg);
|
|
1591
1625
|
const api = createApi({ baseUrl: cfg.apiUrl, apiKey: () => wallet?.apiKey(), fetch: overrides.fetch, userAgent: `rushr-mcp/${VERSION} (+https://github.com/rushr-dev/platform)` });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushr/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Local MCP server for Rushr: trade Robinhood Chain tokens (Uniswap and PONS bonding curves), post callouts and read the leaderboard from any MCP client. Non-custodial: your agent's key stays on your machine.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"type": "module",
|
package/server.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "io.github.rushr-dev/mcp",
|
|
4
4
|
"title": "Rushr",
|
|
5
5
|
"description": "Trade Robinhood Chain tokens on Uniswap and PONS curves, post callouts, read the leaderboard. Local.",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.4.0",
|
|
7
7
|
"websiteUrl": "https://rushr.trade",
|
|
8
8
|
"repository": { "url": "https://github.com/rushr-dev/platform", "source": "github", "subfolder": "packages/mcp" },
|
|
9
9
|
"packages": [
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"registryType": "npm",
|
|
12
12
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
13
13
|
"identifier": "@rushr/mcp",
|
|
14
|
-
"version": "0.
|
|
14
|
+
"version": "0.4.0",
|
|
15
15
|
"runtimeHint": "npx",
|
|
16
16
|
"transport": { "type": "stdio" },
|
|
17
17
|
"environmentVariables": [
|