Build
Developers
MCP, the SDK and the CLI bridge, with limits and errors.
Pick a way in#
| Use | When |
|---|---|
| MCP server | Your AI tool speaks MCP. Paste one link; it signs in with OAuth or a personal link. |
| @elysiumkit/sdk | You write TypeScript or JavaScript: scripts, bots, dashboards, back-ends. |
| @elysiumkit/mcp | Your AI tool can only start local (stdio) MCP servers. |
All three reach the same tools, as you, with the permissions you gave. None of them can move funds, change your wallet or start real money: those always need you in the dashboard.
Authentication#
Create a personal token in the dashboard: Connect AI → Create personal link. The link ends in your token (ek_…). It is shown once.
export ELYSIUMKIT_TOKEN=ek_…The SDK also accepts the whole personal link, or an OAuth access token.
TypeScript SDK#
npm install @elysiumkit/sdkQuick start
import { ElysiumKit } from "@elysiumkit/sdk";
// Reads ELYSIUMKIT_TOKEN from the environment when no token is passed.
const ek = new ElysiumKit({ token: process.env.ELYSIUMKIT_TOKEN });
const overview = await ek.getOverview();
console.log(overview.totals.equityUsd, overview.strategies.active);Build, test and run a strategy
const spec = {
version: 1,
name: "Steady movers",
kind: "momentum",
universe: { quoteAssets: ["HYPE"], minTokenAgeMinutes: 1440 },
filters: { minLiquidityUsd: 100_000, minPriceChangePct5m: 2 },
entry: { sizeUsd: 10 },
exits: {
stopLossPct: 6,
takeProfits: [{ atGainPct: 8, sellPctOfRemaining: 50 }],
trailingStopPct: 4,
maxHoldMinutes: 240,
},
risk: { capitalUsd: 200, maxPerTradeUsd: 10, maxDailyLossUsd: 30, maxExposurePerTokenUsd: 10 },
reporting: { everyHours: 12 },
} as const;
// 1. Read the exact rules the engine will follow. Saves nothing.
const preview = await ek.previewStrategy(spec);
if (!preview.valid) throw new Error(preview.problems.join("; "));
console.log(preview.rules);
// 2. Replay it over the last 24 hours of recorded market data.
const test = await ek.testStrategy({ spec, test: "replay", hours: 24 });
console.log(test.result);
// 3. Save it with practice money and start it.
const strategy = await ek.createStrategy(spec, { startPaperTrading: true });
console.log(strategy.url); // opens in the dashboardAsk for real money
// Real money is never started from code. This files a request;
// the owner approves or rejects it in the dashboard.
const request = await ek.requestLiveTrading(strategy.id, { note: "24h replay was positive" });
console.log(request.status, request.approveUrl);Methods
| Method | Does |
|---|---|
| getOverview() | Value, profit and loss, strategies, positions, wallet, pending requests. |
| listPresets() | The built-in strategies with their full specs. |
| listCatalog() | The strategy catalog: risk, default limits, backtest numbers (not a forecast), whether you run it. |
| getPerformance(id, range?) | Value over 24h, 7d, 30d or all time, with P&L, win rate, trades and limits in use. |
| listStrategies() · getStrategy(id) | Your strategies; one strategy with rules, results, positions, trades and report. |
| listPositions({ strategyId?, status? }) · listTrades({ strategyId?, limit? }) | Positions and trades. |
| getReports({ strategyId? }) | Reports with suggestions. |
| scanMarket({ limit? }) | Tokens the engine is watching, with check results. |
| getWallet() | Your agent wallet's status, address, caps and gas sponsorship. |
| previewStrategy(spec) · draftStrategy(text) | Validate a spec and read its rules; turn plain words into a spec. Save nothing. |
| testStrategy({ strategyId | spec, test, hours? }) | "check": what it would buy now. "replay": run it over recorded history (1 to 168 hours). |
| createStrategy(spec, { startPaperTrading? }) · updateStrategy(id, spec) | Save with practice money; replace a paused or draft strategy's rules. |
| startPaperTrading(id) · pauseStrategy(id) | Run with practice money; pause any strategy. |
| requestLiveTrading(id, { note? }) | Ask the owner to approve real money. |
| listTools() | The raw MCP tool list. |
Options: token, baseUrl (https only; http only for localhost), timeoutMs (30 s, 120 s for tests), maxRetries (2, for reads only; writes are never retried) and fetch. Every method takes an optional { signal, timeoutMs }.
Strategy spec#
A strategy is one JSON object. The engine follows it exactly. Always run it through previewStrategy first to read the rules.
| Part | Fields |
|---|---|
| universe | launchpads (any, montra, ascend), quoteAssets (HYPE, USDC, KNTQ), minTokenAgeMinutes, maxTokenAgeMinutes |
| filters | requireVerifiedContract, requireOwnershipRenounced, requireLiquidityLockedOrBurned, minLiquidityUsd, maxBuyFeeBps, maxSellFeeBps, minVolumeUsd5m, minVolumeGrowthPct, minPriceChangePct5m, minHolders, maxTopHolderPct. The buy, sell and transfer test is always on. |
| entry | sizeUsd, maxSlippageBps |
| exits | stopLossPct (1 to 95), takeProfits (up to 6 rising steps of atGainPct and sellPctOfRemaining), trailingStopPct, maxHoldMinutes |
| risk | capitalUsd, maxPerTradeUsd, maxDailyLossUsd, maxOpenPositions, maxExposurePerTokenUsd |
| reporting | everyHours (1 to 168) |
Missing optional fields get safe defaults, and the preview tells you which. listPresets() returns complete examples.
MCP package#
For AI tools that can only launch a local MCP server, @elysiumkit/mcp runs one on your computer and forwards it to ElysiumKit with your token.
{
"mcpServers": {
"elysiumkit": {
"command": "npx",
"args": [
"-y",
"@elysiumkit/mcp"
],
"env": {
"ELYSIUMKIT_TOKEN": "ek_…"
}
}
}
}[mcp_servers.elysiumkit]
command = "npx"
args = ["-y", "@elysiumkit/mcp"]
env = { ELYSIUMKIT_TOKEN = "ek_…" }ELYSIUMKIT_TOKEN: your personal token or link. Required. It is read from the environment only, never from a command-line flag (other programs can read command lines), and never printed.ELYSIUMKIT_API_URLor--api-url: the API origin, https only. Defaulthttps://api.elysiumkit.com.- It mirrors the hosted server exactly: same tools, same checks, results passed through untouched. Logs go to stderr.
Tools that support remote MCP don't need it: use the link directly and sign in with OAuth. See Connect your AI.
MCP reference#
- Endpoint:
https://api.elysiumkit.com/mcp, MCP over Streamable HTTP, stateless (POST only). Protocol version2025-06-18. - Auth:
Authorization: Bearer <token>, or the personal link/mcp/k/ek_…for tools that can't send headers. - OAuth 2.1 for tools that sign in: discovery at
/.well-known/oauth-protected-resourceand/.well-known/oauth-authorization-server, dynamic client registration, authorization code with PKCE (S256 only), 1-hour access tokens and refresh tokens. - Tools and permissions: see What your AI can do.
POST https://api.elysiumkit.com/mcp
Authorization: Bearer ek_…
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2025-06-18
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_overview","arguments":{}}}Limits#
- 120 MCP requests per minute per token.
- Replays cover 1 to 168 hours of recorded market data.
- Practice and real strategies follow the same limits as in the dashboard; see Your four limits.
Errors#
| Error | When |
|---|---|
| AuthenticationError | The token is missing, invalid, expired or revoked (401). |
| PermissionError | The token is valid but lacks the permission (403). |
| RateLimitError | Too many requests. Wait retryAfterSeconds, then retry. |
| ValidationError | The input or strategy spec was rejected. Nothing changed. |
| ToolError | The request was refused for a reason written for people, e.g. a live strategy can only be started in the dashboard. |
| ServerError | A problem on our side (5xx). Reads are safe to retry later. |
| TimeoutError | No answer in time. A write may or may not have happened: check before retrying. |
| NetworkError | The request never arrived (offline, DNS, TLS). |
All of them extend ElysiumKitError, and no message ever contains your token.
import { ElysiumKitError, RateLimitError, ToolError } from "@elysiumkit/sdk";
try {
await ek.startPaperTrading(id);
} catch (err) {
if (err instanceof RateLimitError) await sleep((err.retryAfterSeconds ?? 5) * 1000);
else if (err instanceof ToolError) console.log(err.message); // written for people
else if (err instanceof ElysiumKitError) throw err;
}