@candledottv/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 +5 -3
- package/dist/index.js +18 -1
- package/package.json +1 -1
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
|
-
|
|
4
|
+
eleven 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.
|
|
@@ -9,7 +9,8 @@ calls.
|
|
|
9
9
|
## Try it without a key
|
|
10
10
|
|
|
11
11
|
Three tools are read-only and need nothing but `CANDLE_API_URL` (which already defaults to
|
|
12
|
-
production): `candle_get_market`, `candle_get_feed`,
|
|
12
|
+
production): `candle_get_market`, `candle_get_feed`, `candle_token_forensics`, and
|
|
13
|
+
`candle_get_agent_profile`. Install the
|
|
13
14
|
server with no `env` block at all and those three work immediately:
|
|
14
15
|
|
|
15
16
|
```json
|
|
@@ -77,6 +78,7 @@ tools, getting a key, funding the embedded wallet, and idempotent retries, see
|
|
|
77
78
|
| `candle_launch_token` | Launch a token on Candle | `POST /api/v1/launch/headless` (or `/dry-run` when `dryRun: true`) | `CANDLE_AGENT_API_KEY` |
|
|
78
79
|
| `candle_get_market` | Get market state | `GET /api/v1/markets/:chain/:mint` | none |
|
|
79
80
|
| `candle_get_feed` | Get a token feed | `GET /api/v1/markets/feed?bucket=...` | none |
|
|
81
|
+
| `candle_token_forensics` | Deployer history, deploy-window buyers, holder concentration, risk tier | `GET /api/v1/markets/:chain/:mint/forensics` | none |
|
|
80
82
|
| `candle_report_activity` | Report on-chain activity | `POST /api/v1/activity/report` | `CANDLE_AGENT_API_KEY` |
|
|
81
83
|
| `candle_get_agent_profile` | Get an agent profile | `GET /api/v1/users/:idOrWallet/agent` | none |
|
|
82
84
|
| `candle_trade` | Buy or sell a token | Reads the market for its decimals (or wallet balance, for a percent sell) then `POST /api/v1/trade/agent/build` | `CANDLE_AGENT_API_KEY` (`swap:write`) |
|
|
@@ -100,7 +102,7 @@ explicitly. Assets with nothing spendable report `empty`; a failed asset never s
|
|
|
100
102
|
## Errors
|
|
101
103
|
|
|
102
104
|
This package never reinterprets an error body, and that body is not one uniform shape across all
|
|
103
|
-
|
|
105
|
+
eleven tools:
|
|
104
106
|
|
|
105
107
|
- `candle_launch_token`, `candle_get_market`, and `candle_get_feed` hit endpoints that use the
|
|
106
108
|
structured envelope `{ success: false, error: { code, message, ... } }`. Branch on `error.code`.
|
package/dist/index.js
CHANGED
|
@@ -362,6 +362,7 @@ var TOOL_NAMES = [
|
|
|
362
362
|
"candle_launch_token",
|
|
363
363
|
"candle_get_market",
|
|
364
364
|
"candle_get_feed",
|
|
365
|
+
"candle_token_forensics",
|
|
365
366
|
"candle_report_activity",
|
|
366
367
|
"candle_get_agent_profile",
|
|
367
368
|
"candle_trade",
|
|
@@ -409,6 +410,13 @@ function buildRequest(name, args, cfg) {
|
|
|
409
410
|
const { chain, mint } = args;
|
|
410
411
|
return { url: `${base2}/api/v1/markets/${chain}/${mint}`, init: { method: "GET", headers: jsonHeaders() } };
|
|
411
412
|
}
|
|
413
|
+
case "candle_token_forensics": {
|
|
414
|
+
const { chain, mint } = args;
|
|
415
|
+
return {
|
|
416
|
+
url: `${base2}/api/v1/markets/${chain}/${mint}/forensics`,
|
|
417
|
+
init: { method: "GET", headers: jsonHeaders() }
|
|
418
|
+
};
|
|
419
|
+
}
|
|
412
420
|
case "candle_get_feed": {
|
|
413
421
|
const { bucket, chain } = args;
|
|
414
422
|
const query = new URLSearchParams({ bucket, ...chain ? { chain } : {} });
|
|
@@ -474,6 +482,10 @@ var getMarketShape = {
|
|
|
474
482
|
chain: z.string().describe('"solana" or "hood"'),
|
|
475
483
|
mint: z.string().describe("Token mint (solana) or contract address (hood)")
|
|
476
484
|
};
|
|
485
|
+
var tokenForensicsShape = {
|
|
486
|
+
chain: z.string().describe('"solana" or "hood"'),
|
|
487
|
+
mint: z.string().describe("Token mint (solana) or contract address (hood)")
|
|
488
|
+
};
|
|
477
489
|
var getFeedShape = {
|
|
478
490
|
bucket: z.enum(["new", "graduated", "onfire", "bluechip"]),
|
|
479
491
|
chain: z.string().optional().describe("Optional chain filter")
|
|
@@ -538,6 +550,11 @@ function registerTools(server, env = process.env) {
|
|
|
538
550
|
description: "Read the current market state for a token: lifecycle, pool address, whether buys are open.",
|
|
539
551
|
inputSchema: getMarketShape
|
|
540
552
|
}, async (args) => callAndRelay("candle_get_market", args, cfg));
|
|
553
|
+
register("candle_token_forensics", {
|
|
554
|
+
title: "Token forensics",
|
|
555
|
+
description: "Gate a buy before making it: deployer history, who bought in the deploy window (the creator's own wallets are marked disclosed; strangers in the same slot are the bundle signal), holder concentration, and a risk tier (LOW/MODERATE/HIGH/CRITICAL) with per-factor reasons. Every measurement carries a coverage note -- 'unavailable' is not 'clean'. No key needed.",
|
|
556
|
+
inputSchema: tokenForensicsShape
|
|
557
|
+
}, async (args) => callAndRelay("candle_token_forensics", args, cfg));
|
|
541
558
|
register("candle_get_feed", {
|
|
542
559
|
title: "Get a token feed",
|
|
543
560
|
description: "Read one of the trade page's public feeds: new, graduated, onfire, or bluechip.",
|
|
@@ -590,7 +607,7 @@ function registerTools(server, env = process.env) {
|
|
|
590
607
|
}
|
|
591
608
|
|
|
592
609
|
// src/version.ts
|
|
593
|
-
var SERVER_VERSION = "0.
|
|
610
|
+
var SERVER_VERSION = "0.4.0";
|
|
594
611
|
|
|
595
612
|
// src/index.ts
|
|
596
613
|
var server = new McpServer({ name: "candle-mcp", version: SERVER_VERSION });
|