@candledottv/mcp 0.10.10 → 0.10.11

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
@@ -1,7 +1,7 @@
1
1
  # @candledottv/mcp
2
2
 
3
3
  An MCP (Model Context Protocol) server for the Candle agent rail. It exposes Candle's REST API as
4
- twenty-nine tools over stdio, so an MCP-capable agent can launch tokens (optionally seeded with a dev
4
+ thirty-one tools over stdio, so an MCP-capable agent can launch tokens (optionally seeded with a dev
5
5
  buy in the same call), trade, convert between base assets (including across chains), read market
6
6
  and feed data, report on-chain activity, and check an agent profile without hand-rolling HTTP
7
7
  calls.
@@ -31,7 +31,7 @@ Environment below -- or skip env editing entirely: install the Candle CLI
31
31
  environment.
32
32
 
33
33
  `CANDLE_MCP_TOOLS` (optional) is a comma-separated allowlist of tool names; only those register.
34
- Unset means all twenty-nine. An unknown name fails startup with the valid names in the message, rather
34
+ Unset means all thirty-one. An unknown name fails startup with the valid names in the message, rather
35
35
  than silently registering the wrong surface. `candle mcp --read-only` / `--tools` set this for
36
36
  you.
37
37
 
@@ -109,6 +109,8 @@ tools, getting a key, funding the embedded wallet, and idempotent retries, see
109
109
  | `candle_get_portfolio` | What the account's embedded and TEE wallets hold on Solana and Hood (Hood in `hood`), with prices; unpriced holdings say why, never zero | `GET /api/v1/agent/portfolio` | `CANDLE_AGENT_API_KEY` (`account:read`) |
110
110
  | `candle_execution_status` | One call before trading: wallets to spend from, tier, and whether trading is possible | Composes the wallet and tier reads | `CANDLE_AGENT_API_KEY` |
111
111
  | `candle_get_operation` | Look up a trade or launch by the id its write used, and whether it landed | `GET /api/v1/trade/agent/jobs/:clientId` or `/api/v1/launch/headless/jobs/:clientId` | `CANDLE_AGENT_API_KEY` |
112
+ | `candle_get_fees` | The creator fees the account's launched tokens can pay: raw amounts from chain reads, and the reason a token cannot be claimed | `GET /api/v1/agent/fees` | `CANDLE_AGENT_API_KEY` (`account:read`) |
113
+ | `candle_claim_fees` | Collect one token's creator fees to the wallet fixed at launch (no destination argument); `dryRun` sends nothing. Answers `LAUNCH_DISABLED` until the server enables agent claims | `POST /api/v1/agent/fees/:mint/claim` | `CANDLE_AGENT_API_KEY` (`launch:write`) |
112
114
  | `candle_perps_setup` | Approve Candle's Hyperliquid builder fee once; report the account's mode and balance | `POST /api/v1/agent/perps/setup`, then relay sign and Hyperliquid submit | `CANDLE_AGENT_API_KEY` (`perps:write`), `CANDLE_KEY_SIGNER_PEM_FILE` |
113
115
  | `candle_perps_open` | Open or add to a perps position, with optional take-profit and stop-loss | `POST /api/v1/agent/perps/open`, checked here, relay-signed, submitted to Hyperliquid | `CANDLE_AGENT_API_KEY` (`perps:write`), `CANDLE_KEY_SIGNER_PEM_FILE` |
114
116
  | `candle_perps_close` | Close all or part of a perps position, reduce-only | `POST /api/v1/agent/perps/close`, the same | `CANDLE_AGENT_API_KEY` (`perps:write`), `CANDLE_KEY_SIGNER_PEM_FILE` |
@@ -133,7 +135,7 @@ explicitly. Assets with nothing spendable report `empty`; a failed asset never s
133
135
  ## Errors
134
136
 
135
137
  This package never reinterprets an error body, and that body is not one uniform shape across all
136
- twenty-nine tools:
138
+ thirty-one tools:
137
139
 
138
140
  - `candle_launch_token`, `candle_get_market`, and `candle_get_feed` hit endpoints that use the
139
141
  structured envelope `{ success: false, error: { code, message, ... } }`. Branch on `error.code`.
package/dist/index.js CHANGED
@@ -109,7 +109,7 @@ function percentOfBalance(balanceRaw, percent) {
109
109
  import { randomUUID } from "node:crypto";
110
110
 
111
111
  // src/version.ts
112
- var SERVER_VERSION = "0.10.10";
112
+ var SERVER_VERSION = "0.10.11";
113
113
 
114
114
  // src/update-notice.ts
115
115
  var PLAIN_VERSION = /^\d+\.\d+\.\d+$/;
@@ -1450,6 +1450,8 @@ var TOOL_NAMES = [
1450
1450
  "candle_resolve_token",
1451
1451
  "candle_execution_status",
1452
1452
  "candle_get_operation",
1453
+ "candle_get_fees",
1454
+ "candle_claim_fees",
1453
1455
  "candle_perps_setup",
1454
1456
  "candle_perps_open",
1455
1457
  "candle_perps_close",
@@ -1572,6 +1574,27 @@ function buildRequest(name, args, cfg) {
1572
1574
  const path = kind === "launch" ? `/api/v1/launch/headless/jobs/${encodeURIComponent(clientId)}` : `/api/v1/trade/agent/jobs/${encodeURIComponent(clientId)}`;
1573
1575
  return { url: `${base2}${path}`, init: { method: "GET", headers: jsonHeaders(apiKey) } };
1574
1576
  }
1577
+ case "candle_get_fees": {
1578
+ const apiKey = requireApiKey2(cfg);
1579
+ const { cursor, limit } = args;
1580
+ const params = new URLSearchParams;
1581
+ if (cursor !== undefined)
1582
+ params.set("cursor", cursor);
1583
+ if (limit !== undefined)
1584
+ params.set("limit", String(limit));
1585
+ return {
1586
+ url: `${base2}/api/v1/agent/fees${params.size ? `?${params}` : ""}`,
1587
+ init: { method: "GET", headers: jsonHeaders(apiKey) }
1588
+ };
1589
+ }
1590
+ case "candle_claim_fees": {
1591
+ const apiKey = requireApiKey2(cfg);
1592
+ const { mint, dryRun } = args;
1593
+ return {
1594
+ url: `${base2}/api/v1/agent/fees/${encodeURIComponent(mint)}/claim`,
1595
+ init: { method: "POST", headers: jsonHeaders(apiKey), body: JSON.stringify({ dryRun: dryRun === true }) }
1596
+ };
1597
+ }
1575
1598
  case "candle_get_wallets": {
1576
1599
  const apiKey = requireApiKey2(cfg);
1577
1600
  return {
@@ -1707,6 +1730,14 @@ var getOperationShape = {
1707
1730
  clientId: z2.string().describe("The clientTradeId or clientLaunchId the write used, or that the tool echoed back to you"),
1708
1731
  kind: z2.enum(["trade", "launch"]).describe("Which rail the id belongs to. Required: ids are caller-chosen strings with no shape to dispatch on")
1709
1732
  };
1733
+ var getFeesShape = {
1734
+ cursor: z2.string().optional().describe("The previous page's continueCursor, verbatim"),
1735
+ limit: z2.number().optional().describe("Tokens per page, 1 to 50 (default 20). Each one costs chain reads")
1736
+ };
1737
+ var claimFeesShape = {
1738
+ mint: z2.string().describe("The launched token: a Solana mint or a Hood token address, as candle_get_fees lists it"),
1739
+ dryRun: z2.boolean().optional().describe("Check and read only. Sends nothing and writes nothing. Use it first to see what would be claimed")
1740
+ };
1710
1741
  var resolveTokenShape = {
1711
1742
  mint: z2.string().describe("Token mint (Solana, base58) or contract address (Hood, 0x-prefixed)")
1712
1743
  };
@@ -1846,6 +1877,16 @@ MARKET_NOT_FOUND means Candle has no market for that token and this could not ru
1846
1877
  ` + "Amounts come back RAW, deliberately: the answer you need after a timeout is the outcome, " + "and you already know what you asked for.",
1847
1878
  inputSchema: getOperationShape
1848
1879
  }, async (args) => callAndRelay("candle_get_operation", args, getConfig(), doFetch));
1880
+ register("candle_get_fees", {
1881
+ title: "Read the creator fees this account's tokens can pay",
1882
+ description: "The tokens launched by the account's own wallets, with what each could pay now in creator fees " + "(raw units from direct chain reads) and `claimable: true` or the `reason` it is not. Reads only; " + "moves nothing. It returns no earned or paid-out totals. An unreadable token is marked, never " + "shown as zero. Paged: pass `continueCursor` back as `cursor`.",
1883
+ inputSchema: getFeesShape
1884
+ }, async (args) => callAndRelay("candle_get_fees", args, getConfig(), doFetch));
1885
+ register("candle_claim_fees", {
1886
+ title: "Claim a token's creator fees",
1887
+ description: "Collect one token's creator fees and pay them to the wallet fixed at launch. There is no destination " + "argument and the tool cannot send funds anywhere else. Candle signs with the embedded wallet, which " + "pays the network fee. Needs launch:write, and the server keeps it off until it is enabled (LAUNCH_DISABLED). " + "Call it with dryRun: true first; a real claim moves real funds into the recipient wallet, which may be " + "the wallet this agent trades from. Not idempotent by id: if the result is lost, read candle_get_fees " + "before claiming again.",
1888
+ inputSchema: claimFeesShape
1889
+ }, async (args) => callAndRelay("candle_claim_fees", args, getConfig(), doFetch));
1849
1890
  register("candle_get_wallets", {
1850
1891
  title: "List the wallets Candle executes with",
1851
1892
  description: "The account's EMBEDDED wallets, one per chain, with their delegation state. These are " + "the wallets candle_trade, candle_swap and candle_transfer spend from, so this is how an " + "agent finds its own funding addresses. Reads only; moves nothing. Not the same as the " + "account's LINKED wallets, which are the owner's own wallets and are not spent from here. " + "Balances are not included: read a specific one with the market and balance endpoints.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candledottv/mcp",
3
- "version": "0.10.10",
3
+ "version": "0.10.11",
4
4
  "description": "MCP server for the Candle agent rail: launch tokens, read markets, report activity",
5
5
  "type": "module",
6
6
  "license": "MIT",