@potswap_io/mcp 0.3.0 → 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 CHANGED
@@ -78,6 +78,7 @@ Use a dedicated agent wallet with only the funds you want the agent to control.
78
78
  | `get_positions {wallet?}` | Holdings with USD value, average cost, unrealised and realised PnL (from swap history) |
79
79
  | `get_points {wallet?}` | Season 1 points, POT allocated / claimable, next unlock |
80
80
  | `get_leaderboard` | Top wallets by fee paid |
81
+ | `get_launch_status` | Launch-pool meter (SOL / 500 target, from chain), season and day, fee split, unclaimed reward balances and the public claim ladder |
81
82
  | `get_price_history {mint, timeframe, limit}` | OHLCV candles from the token's top pool (`1m`…`1d`) |
82
83
 
83
84
  ### Wallet and operations (0.3.0)
@@ -119,7 +120,11 @@ State lives in `~/.potswap/strategies.json` (override with `POTSWAP_STATE_DIR`);
119
120
 
120
121
  ## Fees and rewards
121
122
 
122
- Each swap carries Potswap's 2.5% integrator fee via Jupiter's referral program; Jupiter keeps 20% of it, and 50% of what remains buys and burns POT each epoch. The fee basis is credited to the trading wallet as Season 1 points, split daily: 666,666 POT per epoch, by `fee^1.1`, capped at 10% per wallet. Points become POT tokens after the token launch; unlock 7 days after each epoch. Details: https://www.potswap.io
123
+ Each swap carries Potswap's 2.5% integrator fee via Jupiter's referral program (1% above $1,000; stakers get −1%); Jupiter keeps 20%.
124
+
125
+ **Season 0 (now, before the token):** 60% of the net fee fills the **launch pool**; when it reaches 500 SOL the POT token launches on its own liquidity pool. 20% of your net fee is set aside as your **reward balance** (in SOL): after launch it buys POT for you, when you say so (`claim now` at market, or a limit claim at your price). 20% runs the project. Every day you trade in Season 0 earns a slice of the **250M POT airdrop** (25% of supply), replayed day by day after launch: fee basis `fee^1.1`, capped at 10% of the day per wallet, round trips within 10 minutes count 25%.
126
+
127
+ **Seasons 1+ (30 days each):** `20M × 0.85^(n−1)` POT per season shared daily by fee basis; 30% of the net fee buys and burns POT, 20% keeps feeding reward balances, 50% team and operations. Levels (Larva → Bee → Queen, up to ×1.25) persist across seasons. `get_points` shows your balance, level and season; `get_launch_status` shows the meter. Only protocol fees enter the pool: nothing can be deposited. Details: https://www.potswap.io
123
128
 
124
129
  ## Development
125
130
 
@@ -154,6 +154,26 @@ export function registerAgentTools(server, deps) {
154
154
  const lst = (p) => (p === 'jito' ? JITOSOL_MINT : MSOL_MINT);
155
155
  stakeTool('stake_sol', 'Liquid-stake SOL', 'Swaps SOL into jitoSOL (Jito) or mSOL (Marinade) at the best route. Normal fee and points apply. Requires confirm=true.', () => SOL_MINT, lst);
156
156
  stakeTool('unstake_sol', 'Unstake liquid SOL', 'Swaps jitoSOL or mSOL back into SOL at the best route. Normal fee and points apply. Requires confirm=true.', lst, () => SOL_MINT);
157
+ // PRD P12.1 / P12.6a — launch meter, season, splits and the public claim pressure.
158
+ server.registerTool('get_launch_status', {
159
+ title: 'POT launch status',
160
+ description: 'Launch-pool meter (SOL collected / target, read from chain), current season and day, fee split in force, total unclaimed reward balances and the pending claim ladder. Only protocol fees fill the pool; nothing can be deposited.',
161
+ inputSchema: {},
162
+ }, async () => {
163
+ try {
164
+ const pool = await api.launchPool();
165
+ const stats = await api.stats().catch(() => ({}));
166
+ const season = pool.season;
167
+ const data = { ...pool, unclaimedSol: stats.unclaimedSol ?? null, claimLadder: stats.claimLadder ?? [], potDistributedMicro: stats.potDistributedMicro ?? null };
168
+ const line = pool.launch && Date.parse(String(pool.launch)) <= Date.now()
169
+ ? `POT launched ${pool.launch}. Season ${season?.n}${season?.dayIndex ? ` day ${season.dayIndex}/30` : ''}${season?.end ? `, ends ${season.end}` : ''}.`
170
+ : `Launch pool: ${pool.balanceSol} / ${pool.targetSol} SOL (${Math.round(Number(pool.pct))}%)${pool.enabled ? '' : ' — pool address not published yet'}. Season 0: 60% of every net fee fills the pool; 20% builds your reward balance.`;
171
+ return ok(data, `${line}${data.unclaimedSol !== null && data.unclaimedSol !== undefined ? ` Unclaimed reward balances: ${data.unclaimedSol} SOL.` : ''}`);
172
+ }
173
+ catch (e) {
174
+ return fail(e instanceof Error ? e.message : String(e));
175
+ }
176
+ });
157
177
  // Upgraded positions with PnL (P13.7): replaces the basic tool registered by the core server.
158
178
  server.registerTool('get_positions', {
159
179
  title: 'Positions with PnL',
package/dist/api.d.ts CHANGED
@@ -37,6 +37,8 @@ export declare class PotswapApi {
37
37
  list(kind: string): Promise<TerminalToken[]>;
38
38
  terminalToken(mint: string): Promise<TerminalToken>;
39
39
  points(wallet: string): Promise<Record<string, unknown>>;
40
+ launchPool(): Promise<Record<string, unknown>>;
41
+ stats(): Promise<Record<string, unknown>>;
40
42
  history(wallet: string, limit?: number): Promise<import("./history.js").HeliusTx[]>;
41
43
  ohlcv(mint: string, tf: string, limit?: number): Promise<{
42
44
  mint: string;
package/dist/api.js CHANGED
@@ -87,6 +87,8 @@ export class PotswapApi {
87
87
  list(kind) { return this.req(`/api/terminal/list/${kind}`); }
88
88
  terminalToken(mint) { return this.req(`/api/terminal/token/${mint}`); }
89
89
  points(wallet) { return this.req(`/api/points/${wallet}`); }
90
+ launchPool() { return this.req('/api/launch-pool'); }
91
+ stats() { return this.req('/api/stats'); }
90
92
  history(wallet, limit = 25) { return this.req(`/api/history/${wallet}?limit=${limit}`); }
91
93
  ohlcv(mint, tf, limit = 100) { return this.req(`/api/terminal/ohlcv/${mint}?tf=${tf}&limit=${limit}`); }
92
94
  leaderboard() { return this.req('/api/leaderboard'); }
package/dist/server.d.ts CHANGED
@@ -7,7 +7,7 @@ import { type TxRpc } from './agentTools.js';
7
7
  import type { Rpc } from './transfer.js';
8
8
  import type { StrategyStore } from './strategies/store.js';
9
9
  import type { Scheduler } from './strategies/scheduler.js';
10
- export declare const VERSION = "0.3.0";
10
+ export declare const VERSION = "0.4.0";
11
11
  export interface ServerDeps {
12
12
  config?: Config;
13
13
  signer?: Signer | null;
package/dist/server.js CHANGED
@@ -10,7 +10,7 @@ import { loadSigner } from './wallet.js';
10
10
  import { riskBadges, riskLevel } from './shared/risk.js';
11
11
  import { registerStrategyTools } from './strategies/tools.js';
12
12
  import { registerAgentTools } from './agentTools.js';
13
- export const VERSION = '0.3.0';
13
+ export const VERSION = '0.4.0';
14
14
  const ok = (data, summary) => ({
15
15
  content: [{ type: 'text', text: redact(summary ?? JSON.stringify(data, null, 2)) }], structuredContent: redactValue(data),
16
16
  });
@@ -117,7 +117,7 @@ export function createServer(deps = {}) {
117
117
  });
118
118
  server.registerTool('get_points', {
119
119
  title: 'POT points',
120
- description: "Season 1 points for a wallet: this epoch, all-time, POT allocated and claimable, next unlock. Defaults to the agent wallet.",
120
+ description: "Points and rewards for a wallet: this epoch, all-time, POT allocated and claimable, next unlock, reward balance (SOL, buys POT after launch), level and season. Defaults to the agent wallet.",
121
121
  inputSchema: { wallet: z.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/).optional() },
122
122
  }, async ({ wallet }) => {
123
123
  const w = walletOr(wallet);
package/package.json CHANGED
@@ -1,59 +1,59 @@
1
- {
2
- "name": "@potswap_io/mcp",
3
- "version": "0.3.0",
4
- "description": "Potswap MCP server: best-route Solana swaps, DCA / rebalance / take-profit strategies for AI agents, non-custodial, earns POT.",
5
- "license": "MIT",
6
- "type": "module",
7
- "bin": {
8
- "potswap-mcp": "dist/index.js"
9
- },
10
- "main": "dist/server.js",
11
- "types": "dist/server.d.ts",
12
- "files": [
13
- "dist",
14
- "README.md",
15
- "LICENSE"
16
- ],
17
- "engines": {
18
- "node": ">=20"
19
- },
20
- "scripts": {
21
- "build": "tsc -p tsconfig.json",
22
- "dev": "tsx src/index.ts",
23
- "test": "vitest run",
24
- "typecheck": "tsc -p tsconfig.json --noEmit",
25
- "sync-shared": "node scripts/sync-shared.mjs",
26
- "prepublishOnly": "npm run sync-shared && npm run build"
27
- },
28
- "repository": {
29
- "type": "git",
30
- "url": "git+https://github.com/potswap-io/mcp.git"
31
- },
32
- "homepage": "https://www.potswap.io",
33
- "keywords": [
34
- "mcp",
35
- "solana",
36
- "swap",
37
- "jupiter",
38
- "ai-agent",
39
- "potswap",
40
- "model-context-protocol"
41
- ],
42
- "dependencies": {
43
- "@modelcontextprotocol/sdk": "^1.32.2",
44
- "@solana/spl-token": "^0.4.15",
45
- "@solana/web3.js": "^1.99.0",
46
- "bs58": "^6.0.0",
47
- "zod": "^4.6.7"
48
- },
49
- "devDependencies": {
50
- "@types/node": "^26.6.5",
51
- "tsx": "^4.23.15",
52
- "typescript": "^7.0.2",
53
- "vite": "^8.3.5",
54
- "vitest": "^5.0.5"
55
- },
56
- "bugs": {
57
- "url": "https://github.com/potswap-io/mcp/issues"
58
- }
59
- }
1
+ {
2
+ "name": "@potswap_io/mcp",
3
+ "version": "0.4.0",
4
+ "description": "Potswap MCP server: best-route Solana swaps, DCA / rebalance / take-profit strategies for AI agents, non-custodial, earns POT.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "bin": {
8
+ "potswap-mcp": "dist/index.js"
9
+ },
10
+ "main": "dist/server.js",
11
+ "types": "dist/server.d.ts",
12
+ "files": [
13
+ "dist",
14
+ "README.md",
15
+ "LICENSE"
16
+ ],
17
+ "engines": {
18
+ "node": ">=20"
19
+ },
20
+ "scripts": {
21
+ "build": "tsc -p tsconfig.json",
22
+ "dev": "tsx src/index.ts",
23
+ "test": "vitest run",
24
+ "typecheck": "tsc -p tsconfig.json --noEmit",
25
+ "sync-shared": "node scripts/sync-shared.mjs",
26
+ "prepublishOnly": "npm run sync-shared && npm run build"
27
+ },
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/potswap-io/mcp.git"
31
+ },
32
+ "homepage": "https://www.potswap.io",
33
+ "keywords": [
34
+ "mcp",
35
+ "solana",
36
+ "swap",
37
+ "jupiter",
38
+ "ai-agent",
39
+ "potswap",
40
+ "model-context-protocol"
41
+ ],
42
+ "dependencies": {
43
+ "@modelcontextprotocol/sdk": "^1.32.2",
44
+ "@solana/spl-token": "^0.4.15",
45
+ "@solana/web3.js": "^1.99.0",
46
+ "bs58": "^6.0.0",
47
+ "zod": "^4.6.7"
48
+ },
49
+ "devDependencies": {
50
+ "@types/node": "^26.6.5",
51
+ "tsx": "^4.23.15",
52
+ "typescript": "^7.0.2",
53
+ "vite": "^8.3.5",
54
+ "vitest": "^5.0.5"
55
+ },
56
+ "bugs": {
57
+ "url": "https://github.com/potswap-io/mcp/issues"
58
+ }
59
+ }