Skip to main content
Glama
K4L-EL

pyon-mcp

by K4L-EL

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PYON_API_KEYYesPersonal access token (pyk_...)
PYON_API_URLNoAPI base URL overridehttps://api.pyon.io

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_capabilitiesA

Return the catalog of everything Pyon's strategy engine understands: market indicators (with their value ranges and indicatorParams), portfolio indicators, comparison operators, trigger types, action types, backtest timeframes, order sizing modes, option strategy types, and the tradable ticker universe. CALL THIS BEFORE writing a create_strategy description, an edit_strategy instruction, or choosing optimize_strategy sweep bounds. Strategy text is turned into a node graph literally, so an indicator name the engine does not know, or a threshold outside an indicator's range, silently produces a strategy that backtests to zero trades and looks broken for no visible reason - RSI, STOCH_K, STOCH_D, ADX and MFI are bounded 0-100, so an RSI threshold above 100 can never fire; WILLR is -100 to 0 (oversold is about -80, not +20); BB is %B on a 0-100 scale, not a price. Parameters: section (optional, one of: indicators, portfolio_indicators, operators, triggers, actions, timeframes, tickers, all; default "all"). Timeframes are always 1m, 5m, 15m, 1h, 1d. The catalog is fetched from the Pyon API and falls back to a copy bundled with this server if the endpoint is unavailable; the response always names which source was used. Results are cached for the session, so calling it repeatedly is cheap.

search_symbolsA

Search Pyon's market database for tradable instruments by ticker or company name fragment. Use this first whenever you need an exact symbol to mention in a research prompt or strategy description, for example resolving 'Apple' to AAPL or checking whether Pyon covers a given asset. Parameters: query (string, 1-100 characters, required) - a ticker or name fragment. Returns up to 20 matches as compact JSON with symbol, name, exchange, and assetClass. Note that Pyon only trades a fixed universe: call get_capabilities(section='tickers') for the definitive tradable list.

list_strategiesA

List the user's saved trading strategies on Pyon. Use this to find an existing strategy's id before calling get_strategy, run_backtest, edit_strategy, diagnose_strategy, or optimize_strategy, or to check what already exists before building something new with create_strategy. Parameters: none - the arguments object may be empty or omitted entirely. Returns id (UUID), name, nodeCount, and updatedAt for up to 100 strategies; call get_strategy for the native timeframe and node-level detail.

get_strategyA

Fetch a single strategy's structure: name, description, native timeframe, and a per-node summary with each node's id, type, label, and flattened numeric/string config values. Use this before optimize_strategy - the node ids and config field names shown here are exactly what optimize_strategy needs as xNodeId/xField and yNodeId/yField - or to understand what a strategy actually does before editing it. Parameters: strategyId (UUID, required; find it with list_strategies). Returns compact JSON; the raw graph is never dumped.

create_strategyA

Build a brand new trading strategy from a natural-language description using Pyon's AI builder, waiting up to 300s for the build to finish. Use this when the user wants a new strategy; pass analysisId to ground the build in a saved research report from create_research. Parameters: description (string, 10 to 8000 characters, required) - name the instrument, entry rule, exit rule and position size; analysisId (UUID, optional) from create_research or list_research. Call get_capabilities FIRST so the indicator names, operators, action types and tickers you write into the description are ones the engine supports, and so thresholds stay inside each indicator's range (an RSI entry above 100 can never fire). Returns the new strategyId, name, a summary of what was built, and a nextSteps hint. Always evaluate the result with run_backtest before editing or optimizing. If the wait times out, the error includes a jobId for get_job_status.

edit_strategyA

Modify an existing strategy with a natural-language instruction using Pyon's AI editor, waiting up to 300s. Use this to change entry/exit logic, thresholds, position sizing, symbols, or to fix issues found by diagnose_strategy. Parameters: strategyId (UUID, required; from list_strategies); instruction (string, 10 to 8000 characters, required) stating exactly what to change and to what - diagnose_strategy's agentRequest can be pasted here verbatim. Use get_capabilities to check indicator names and ranges before writing the instruction. Returns a verification verdict comparing a sample backtest before and after the edit, with before/after trade counts and return percentages, plus revertToVersion for undoing a bad edit. Verdict values: improved (better), unchanged (no measurable change), degraded (worse), broke (errored or stopped trading - revert), still_zero (zero trades before and after - root cause not fixed). If the wait times out, the error includes a jobId to check with get_job_status.

diagnose_strategyA

Ask Pyon's AI debugger to analyze a strategy, running a fresh sample backtest as evidence; waits up to 300s. Use this when run_backtest shows zero trades, poor returns, or confusing diagnostics and you need a causal explanation before editing. Parameters: strategyId (UUID, required); question (string, 10 to 2000 characters, optional) - ask something specific such as 'why did this take zero trades in 2025?', or omit it entirely for a general health check. Returns a diagnosis message, a structured list of up to 10 issues, and, when available, a ready-to-use edit request (agentRequest) that can be passed directly to edit_strategy as the instruction. If the wait times out, the error includes a jobId to check with get_job_status.

run_backtestA

Backtest a strategy over a historical window and wait up to 180s for it to finish. Use this after create_strategy or edit_strategy to measure real performance, and before optimize_strategy to establish a baseline. Parameters: strategyId (UUID, required); startDate and endDate (YYYY-MM-DD, optional, must be real past dates with endDate after startDate and at least 7 days between them - default is the last 365 days); timeframe: one of 1m, 5m, 15m, 1h, 1d - defaults to the strategy's native timeframe, fetched automatically; initialCapital in USD (number 100 to 100000000, default 50000). Returns metrics (totalTrades, totalOrders, totalReturnPct, sharpeRatio, maxDrawdownPct, winRate) plus up to 8 diagnostic messages verbatim - read these, they carry gate pass-rate evidence explaining WHY the strategy did or did not trade - and an explicit note when 0 trades closed but orders were opened (the strategy entered and is still holding, which is not the same as a dead strategy). A warning is added when a 1d strategy is tested over fewer than 300 days, since that is too few bars to judge it. On timeout the error names the backtest id, which get_job_status accepts as a fallback.

optimize_strategyA

Run a 2-D parameter sweep over two numeric config fields of a strategy's nodes, backtesting a steps x steps grid of value combinations; waits up to 600s. Use this after a strategy already trades sensibly (verify with run_backtest) to tune thresholds, periods, or sizes. Call get_strategy FIRST to obtain the exact node ids and config field names, and get_capabilities to keep the bounds inside the indicator's real range (sweeping an RSI threshold from 80 to 140 wastes half the grid on cells that can never fire). Parameters: strategyId (UUID, required); xNodeId and xField, yNodeId and yField (strings from get_strategy, required) - the two axes must not be the same node id AND field; xMin/xMax and yMin/yMax (finite numbers, required) with xMax > xMin and yMax > yMin - the steps values are spaced linearly and include both endpoints (xMin 10, xMax 30, steps 5 tests 10, 15, 20, 25, 30); steps (whole number 3 to 10, default 5); timeframe: one of 1m, 5m, 15m, 1h, 1d - optional override, defaults to what the server picks. Returns the best cell (highest sharpe, preferring cells that actually traded), the strategy's current cell, the sharpe grid as compact rows of numbers (rows = y values top to bottom, columns = x values left to right), the sweep window and timeframe, and a verbatim warning when every cell produced zero trades. If the wait times out, the error includes a jobId to check with get_job_status.

create_researchA

Generate a saved AI research report (thesis, risks, catalysts, scored overall view) for a company or asset from a natural-language prompt, waiting up to 300s. Use this when the user wants fundamental or thematic research, or as the first step before building a research-grounded strategy. Parameters: prompt (string, 10 to 8000 characters, required) - what to research and from which angle, e.g. 'deep dive on NVDA: AI capex cycle, risks, and valuation'. Resolve tickers with search_symbols first. Returns analysisId, title, symbol, overallScore, overallView, and a truncated executive summary. Pass the returned analysisId to create_strategy to build a strategy grounded in this research. If the wait times out, the error includes a jobId to check with get_job_status.

get_researchA

Fetch a saved research report by analysisId. Use this to re-read research created earlier (find ids with list_research) before building or editing strategies based on it. Parameters: analysisId (UUID, required; from create_research or list_research). Returns title, symbol, overall score and view, and truncated narrative sections: executive summary, thesis, risks, catalysts, and conclusion. Full layouts and raw data are never dumped.

list_researchA

List the user's saved research reports. Use this to find an analysisId for get_research or to check whether relevant research already exists before generating a new report with create_research. Parameters: none - the arguments object may be empty or omitted entirely. Returns a compact list of up to 25 reports with analysisId, title, symbol, and timestamps where available.

get_job_statusA

Check a Pyon async job directly - the escape hatch when a waiting tool timed out. create_strategy, edit_strategy, diagnose_strategy, optimize_strategy, and create_research keep running server-side after a client timeout, and their timeout errors include the jobId to pass here; run_backtest timeouts name a backtest id, which this tool also accepts (it falls back to the backtest endpoint when the id is not a job). Parameters: jobId (non-empty string, required) - copy it verbatim from the timeout error message; job ids stay resolvable indefinitely, so a not-found error means the id is wrong, not expired. Returns the job status plus, when completed, a compact view of the result, or the error message when failed. Call it again after a short wait if the job is still running.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
getting-startedTypical agent workflow (capabilities -> research -> strategy -> backtest -> diagnose -> edit -> optimize), auth setup, enforced input rules, and plan limits
capabilitiesEvery market and portfolio indicator (with value ranges and params), operator, trigger type, action type, backtest timeframe, quantityType, option strategyType and tradable ticker the Pyon engine accepts - read this before writing any strategy description or sweep bound

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/K4L-EL/pyon-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server