pyon-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pyon-mcpCreate a breakout strategy for AAPL and run a backtest"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pyon-mcp
MCP (Model Context Protocol) server for the Pyon trading platform. It lets AI agents - Claude Code, Claude Desktop, Codex, or any MCP client - drive Pyon end to end: search markets, generate research, build and edit node-graph strategies with AI, run backtests, diagnose problems, and optimize parameters with 2-D sweeps.
Runs over stdio, talks to api.pyon.io, and needs only Node 18+.
Getting an API key
Sign in at app.pyon.io.
Open Account > API Access.
Create a personal access token. It looks like
pyk_....
Set it as the PYON_API_KEY environment variable wherever the server runs.
Variable | Required | Default | Purpose |
| yes | - | Personal access token ( |
| no |
| API base URL override |
Related MCP server: FinClaw
Setup
Claude Code
claude mcp add pyon -e PYON_API_KEY=pyk_... -- npx -y pyon-mcpOr, from a local checkout:
npm install && npm run build
claude mcp add pyon -e PYON_API_KEY=pyk_... -- node /path/to/pyon-mcp/dist/index.jsClaude Desktop
Add to claude_desktop_config.json (Settings > Developer > Edit Config):
{
"mcpServers": {
"pyon": {
"command": "npx",
"args": ["-y", "pyon-mcp"],
"env": {
"PYON_API_KEY": "pyk_..."
}
}
}
}Codex
Add to ~/.codex/config.toml:
[mcp_servers.pyon]
command = "npx"
args = ["-y", "pyon-mcp"]
env = { PYON_API_KEY = "pyk_..." }Start here: get_capabilities
Pyon turns a strategy description into a node graph literally. An indicator name the engine does not
know, or a threshold outside an indicator's range, produces a strategy that backtests to zero trades
and looks broken for no visible reason - an RSI > 120 entry can never fire, because RSI is bounded
0-100.
So call get_capabilities before writing any strategy description, edit instruction, or sweep
bound. It returns the real catalog: 61 market indicators with their value ranges and indicatorParams,
9 portfolio indicators, 8 operators, 8 trigger types, 13 action types, the 5 supported timeframes, the
3 quantityType modes, 7 option strategyType values, and the 47 tradable tickers.
The catalog is fetched from GET /api/capabilities and falls back to a copy bundled with this server
if that endpoint is unavailable. Every response names which source it used. The same catalog is
readable as markdown in the pyon://capabilities resource.
Tools
Every input schema is strict: an unknown or misspelled parameter (timeFrame, start_date,
limit) is rejected with an explicit error rather than silently ignored. Every rejection message
states what IS allowed.
Tool | Parameter | Type | Allowed values | Default |
|
| enum, optional |
|
|
|
| string, required | 1-100 chars; ticker or name fragment | - |
| - | - | no parameters | - |
|
| string, required | UUID from | - |
|
| string, required | at least 10 chars after trimming, max 8000 | - |
| string, optional | UUID from | none | |
|
| string, required | UUID | - |
| string, required | at least 10 chars after trimming, max 8000 | - | |
|
| string, required | UUID | - |
| string, optional |
| 365 days ago | |
| string, optional |
| today | |
| enum, optional |
| the strategy's native timeframe | |
| number, optional | 100 to 100000000 |
| |
|
| string, required | UUID | - |
| string, optional | at least 10 chars when given, max 2000 | general health check | |
|
| string, required | UUID | - |
| string, required | a node id from | - | |
| string, required | a numeric config key on that node | - | |
| number, required | finite; | - | |
| string, required | a node id from | - | |
| string, required | a numeric config key; the two axes must not be the same node and field | - | |
| number, required | finite; | - | |
| integer, optional | 3 to 10 (runs |
| |
| enum, optional |
| server's choice | |
|
| string, required | at least 10 chars after trimming, max 8000 | - |
|
| string, required | UUID from | - |
| - | - | no parameters | - |
|
| string, required | non-empty; a job id or a backtest id from a timeout message | - |
What each tool does
Tool | Summary | Wait |
| The indicator / operator / action / ticker catalog, with API fetch and bundled fallback | none |
| Resolve tickers and names against Pyon's market database | none |
| Saved strategies with id, name, nodeCount, updatedAt | none |
| Per-node id, type, label, and flattened config (feeds | none |
| AI-build a new strategy, optionally grounded in research | up to 300s |
| AI-edit a strategy; returns a before/after verification verdict | up to 300s |
| Metrics plus verbatim diagnostics; flags 0-trade causes and short daily windows | up to 180s |
| AI debugger with sample-backtest evidence; message, issues, suggested fix | up to 300s |
| 2-D parameter sweep; best cell, current cell, sharpe grid | up to 600s |
| Generate a saved research report; returns analysisId plus executive summary | up to 300s |
| Fetch a saved report: score, view, truncated narratives | none |
| List saved research reports | none |
| Escape hatch when a wait timed out; also accepts backtest ids | none |
Validation rules worth knowing
Ids are UUIDs. A strategy name will be rejected; the message points at
list_strategies.Dates are
YYYY-MM-DDreal calendar dates, never in the future.2025-02-30,2024-1-5,01/02/2024and full timestamps are all rejected.Backtest windows need
endDateafterstartDateand at least 7 days between them. A 1d strategy tested over fewer than 300 days still runs, but the result carries awarningexplaining that the window, not the strategy, may be what the metrics are measuring.Timeframes are exactly
1m,5m,15m,1h,1d.1D,daily,1wand30mare rejected - these are the five bar sizes the engine resolves.Sweep axes must describe a real range (
xMax > xMin,yMax > yMin) and must not point at the same node id and config field, which would test one dimension twice.Prompts for
create_strategy,edit_strategy,create_researchand the optionaldiagnose_strategyquestion need at least 10 characters, because a vague prompt produces a vague strategy.
Resources
URI | Contents |
| Auth setup, the typical agent workflow, enforced input rules, plan limits |
| The full capability catalog as readable markdown |
Errors you may see
401 - invalid or revoked API key. Create a new one in Account > API Access at app.pyon.io.
402 - a plan limit was hit; the message explains which. Upgrade at app.pyon.io/app/account/billing.
Timeouts - long AI jobs keep running server-side; the timeout message includes the job id to check with
get_job_status.Invalid arguments - the message names the parameter and the allowed values. Fix and retry; these never reach the API.
Development
npm install
npm run build # tsc -> dist/
npm run smoke # offline, keyless: tools/list, JSON Schema completeness, and the validation tables
npm run check # build + smokeThe compiler runs at the strictest settings the code satisfies: strict, noUncheckedIndexedAccess,
exactOptionalPropertyTypes, verbatimModuleSyntax, isolatedModules, noImplicitOverride,
noImplicitReturns, noFallthroughCasesInSwitch, noUnusedLocals, noUnusedParameters,
allowUnreachableCode: false and allowUnusedLabels: false. noPropertyAccessFromIndexSignature is
deliberately left off: it only forces process.env["PYON_API_KEY"] bracket syntax and catches nothing
here. Wire payloads are read through the case-insensitive helpers in src/format.ts, which return
unknown, so every tool has to narrow a value before putting it in one of the interfaces in
src/types.ts - a backend field rename surfaces as a compile error rather than a missing JSON key.
scripts/smoke.mjs runs entirely offline. It asserts the 13 tools and 2 resources are registered,
that every published JSON Schema names its parameters and sets additionalProperties: false, and it
drives every tool's zod schema with a table of bad inputs that must be rejected and good inputs that
must parse. It exits non-zero on any failure.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceFull-lifecycle algorithmic trading MCP server. AI strategy generation from plain English, backtesting, live bot deployment to 10+ brokers, portfolio monitoring, and prediction markets. Stocks, options, crypto, futures. 32 tools. Free tier.
- Alicense-qualityDmaintenanceMCP server that provides AI agents with financial tools including real-time quotes, backtesting, technical analysis, and multi-exchange data via a simple CLI interface.1MIT
- Flicense-qualityCmaintenanceEnables quant research, strategy generation, backtesting, and paper trading from natural language prompts, integrating with AI agents via an MCP server.61
- AlicenseAqualityBmaintenanceAn MCP server that enables autonomous AI agents to connect to Tastytrade for market scanning, option strategies, account management, and optionally placing trades with built-in safety controls.9MIT
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for Gainium — manage trading bots, deals, and balances via AI assistants
Hosted MCP for stocks, options, Greeks, brokers, order previews, alerts, and workflows.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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