@romaco/mcp
OfficialThe @romaco/mcp server provides tools for financial market analysis, chart control, and paper trading via a compression-first approach.
Market Data & Analysis
Load OHLCV candle data from Yahoo Finance or raw input for stocks, ETFs, crypto, FX, or indices
One-command chart setup (
romaco_setup_chart) — load data + apply a professional preset + analyze in a single callFull technical analysis (
romaco_analyze_market) — trend, momentum (RSI, MACD, divergences), volatility (ATR, Bollinger Bands), support/resistance, and pattern detectionFind key price levels via K-means clustering on swing extremes + Volume Profile (POC, VAH, VAL)
Detect classical chart patterns: Head & Shoulders, Double/Triple Top/Bottom, Triangles, Flags, Wedges, Cup & Handle, Gaps, and Fibonacci harmonics (ABCD, Gartley, Bat, Butterfly, Crab)
Trade Thesis & Position Sizing
Generate a trade thesis (
romaco_thesis) — bull/bear debate → verdict (long/short/stand_aside) + confidence + entry/stop/target; avoids poor R/R signalsBatch-analyze up to 10 tickers (
romaco_thesis_batch), ranked by R/R × confidenceCalculate risk-based position size given account size, risk %, entry, and stop loss
Live Chart Control (requires <McpBridge /> in browser)
Add/remove indicators: EMA, SMA, RSI, MACD, Bollinger Bands, ATR, KDJ, OBV, and 20+ more
Add drawings: trendlines, Fibonacci retracements/extensions/fans, channels, rectangles, Elliott Waves, ABCD, Gann Box, arrows, text, and more (33 templates)
Annotate trade theses and detected pattern geometry directly on the chart
Clear all drawings; add, remove, or clear price alerts
Open simulated paper positions (long/short) with optional stop-loss and take-profit
Capture chart snapshots as base64 PNG/JPEG for vision-enabled LLMs
Control the viewport: zoom, reset to fit-all, or jump to a specific timestamp
Get chart context (compressed state), visible candle summaries, indicator values, and pane/subpanel listings
Guardrails
All tools return compressed outputs (<2 KB by default); high-cost operations (raw OHLCV, full chart state, snapshots, indicator series) require
acknowledgeHighTokenCost: trueto protect context windows
Provides integration with Polygon.io as a data source for market data, offering access to stocks, options, forex, and cryptocurrency data (planned for v1.1).
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., "@@romaco/mcpanalyze AAPL daily"
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.
@romaco/mcp
MCP server for romaco-charts. Control your trading chart from Claude, Cursor, or any MCP-compatible AI agent.
npx @romaco/mcp
Philosophy
Romaco MCP is compression-first. Tools return features and decisions, not raw OHLCV. Most default tool payloads stay under 2 KB; romaco_analyze_market is the deliberate exception at 2.4–4.1 KB across the eight recorded 400-bar fixtures. Large payloads such as snapshots, visible-candle arrays, and all-bar indicator series are gated behind acknowledgeHighTokenCost: true. Full raw chart-state export is disabled until an explicitly authorized host contract exists.
The rule: code computes; the agent queries and interprets. RSI, levels, and last price come from structured tool output. This reduces unsupported numeric claims; it cannot prevent an agent from misquoting evidence or reaching a wrong thesis. Grounding data is not grounding the conclusion. Compression also preserves more context than returning a large raw OHLCV dump by default.
Cost table
Tool | Default | Gated raw (with |
| 2.4–4.1 KB on recorded 400-bar fixtures | — |
| <2 KB computed bull/bear debate + verdict + setup | — |
| <500 B | — |
| <2 KB (trimmed hits) | full hits with anchor |
| <5 KB (setup log + summary) | — |
| <200 B ack | — |
| <1 KB | — |
| ~4.5 KB static catalog | — |
| <1 KB | — |
| ~1 KB snapshot | disabled; returns |
| <1 KB range summary | ~70 KB raw OHLCV |
| <500 B last/prev/delta/state | ~10 KB per-bar series |
| error (must ack) | 300–800 KB base64 image |
| <2 KB structured preview/challenge or receipt | — |
Other | <1 KB structured result or ack | — |
Related MCP server: tradingview-mcp
30-second start
# 1. Install
npm install -g @romaco/mcp
# 2. Wire it into Claude Code (run from your project root)
cat > .mcp.json <<'EOF'
{ "mcpServers": { "romaco": { "command": "romaco-mcp" } } }
EOFThen start Claude Code and prompt:
Use
romaco_setup_chartto analyze AAPL daily with thetrend_analysispreset.
That's it. The MCP server fetches yfinance data (with disk cache + cookie/crumb handshake), runs full technical analysis, and returns a compressed MarketSummary. No API key required; the cache reduces repeated upstream requests, but Yahoo can still rate-limit traffic and the server reports that failure explicitly.
Live chart control (optional)
To let Claude drive a real chart — drawings, indicators, alerts visible in your browser — mount <McpBridge /> next to your TradingTerminal:
import { TradingTerminal, McpBridge, type TradingTerminalRef } from 'romaco-charts/react';
import { useRef } from 'react';
function App() {
const ref = useRef<TradingTerminalRef | null>(null);
const bridgeToken = getBridgeTokenFromRuntime();
return (
<>
<TradingTerminal ref={ref} data={candles} symbol="AAPL" />
<McpBridge chartRef={ref} security={{ mode: 'paired', token: bridgeToken }} />
</>
);
}See examples/pro-volatility-scanner for a complete setup. With <McpBridge /> mounted, the chart-bridge tools (add_indicator, add_drawing, add_alert, capture_snapshot, …) become available. Atomic thesis/pattern annotation additionally requires the host action documented in Chart bridge compatibility; older hosts fail closed instead of falling back to sequential drawing writes. romaco_annotate also uses a two-step, one-time confirmation challenge: its first call performs zero writes and returns APPROVAL_REQUIRED; retry only after the user approves the exact analysisId.
Data cache
Every successful yfinance fetch is cached to ~/.romaco/cache/ with per-timeframe TTL (1m→1min, 1h→1h, 1d→24h, …). A grid of N widgets requesting the same symbol triggers one upstream fetch. Wipe the cache anytime with rm -rf ~/.romaco/cache, or override the location with ROMACO_CACHE_DIR=/tmp/cache.
What it does
Exposes 20+ MCP tools in two categories:
Headless tools — work without a browser, load data and run analysis server-side:
romaco_setup_chart— one-command setup: load + preset + analyze (recommended first call)romaco_load_candles— fetch OHLCV from Yahoo Finance (free) or pass your own arrayromaco_analyze_market— full technical analysis: trend, S/R levels, RSI/MACD/divergences, volatility, patternsromaco_thesis— computed bull/bear debate → verdict (long/short/stand_aside) + confidence + entry/stop/target setup; stands aside when R/R is poor (won't fake a signal)romaco_find_levels— support/resistance via K-means + Volume Profile (POC/VAH/VAL)romaco_detect_patterns— H&S, double top/bottom, triangles, flagsromaco_calculate_position_size— pure-math risk-based position sizing with R/R + breakeven win-rateromaco_list_templates— catalog of drawing templates (trendline, fib, channels, …)
Chart-bridge tools — control a live Romaco chart in the browser:
romaco_add_indicator— EMA, RSI, MACD, Bollinger, ATR, 29+ indicatorsromaco_add_drawing— agent-owned trendlines, Fibonacci, lines, channels, rectangles; omitted group defaults toromaco-mcp/manualromaco_add_alert— price alerts with direction (above/below/cross)romaco_clear_alerts— preview, approve, then remove exact alert IDs from one chart; never sends global clearromaco_capture_snapshot— PNG/JPEG base64 for vision LLMsromaco_open_paper_position— approval-gated simulated long/short with SL/TP and deterministic process-local idempotencyromaco_get_chart_context— concise live chart state; raw chart export is disabledromaco_get_visible_candles— OHLCV in current viewportromaco_set_zoom/romaco_reset_view— zoom controlromaco_clear_drawings— preview, approve, then remove onlyromaco-mcp/*groups; user drawings stay intactromaco_list_panes— enumerate main + subpanel panes (e.g. RSI subpanel id)romaco_get_indicator_values— read computed indicator series (by id or name)romaco_go_to_timestamp— scrub viewport to a given timestampromaco_annotate— atomically draw one exact thesis after a scoped, one-time confirmation challenge
Install
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"romaco": {
"command": "npx",
"args": ["-y", "@romaco/mcp"]
}
}
}Restart Claude Desktop.
Claude Code
claude mcp add romaco -- npx -y @romaco/mcpOr add to your project's .mcp.json:
{
"mcpServers": {
"romaco": {
"command": "npx",
"args": ["-y", "@romaco/mcp"]
}
}
}Cursor / other MCP clients
Any client that supports stdio MCP servers works. Point it at npx @romaco/mcp.
Usage
Headless analysis (no browser needed)
Load 500 candles of AAPL 1h from yfinance, then analyze the market.Claude will call:
romaco_load_candles→ fetches from Yahoo Financeromaco_analyze_market→ returns a compressed MarketSummary (2.4–4.1 KB on the recorded 400-bar fixture suite)romaco_find_levels→ S/R zones, POC, VAH, VALReasons over the features → tells you what it sees
Live chart control (with browser)
Add <McpBridge /> to your chart app:
import { TradingTerminal, McpBridge } from 'romaco-charts/react';
function App() {
const ref = useRef(null);
const bridgeToken = getBridgeTokenFromRuntime();
return (
<>
<TradingTerminal ref={ref} symbol="AAPL" timeframe="1h" datafeed={myDatafeed} />
<McpBridge chartRef={ref} security={{ mode: 'paired', token: bridgeToken }} />
</>
);
}Then from Claude:
Add EMA 20 and RSI 14 to the chart, draw a Fibonacci from the last swing low to swing high,
and capture a snapshot so I can see it.romaco_annotate, romaco_clear_drawings, romaco_clear_alerts, and
romaco_open_paper_position use two-step confirmation. First call returns a
scoped token and performs zero chart writes. MCP rejects missing, expired,
wrong-scope, and replayed tokens. Agent/client must send token only after
explicit user approval. Token proves completion of protocol; by itself it
cannot cryptographically prove human intent and never bypasses chart host's
actionPolicy.
Drawing clear scope binds exact chart identity plus current Romaco-managed group
plan. It never sends global clearDrawings; each reserved romaco-mcp/* group
is replaced with empty desired state, leaving user and unrelated groups intact.
Alert clear scope binds exact chart identity plus current stable alert IDs. It
never sends global clearAlerts; each approved alert is removed by ID with host
identity policy. Alert-plan drift consumes the token and performs zero writes.
Paper positions are visual simulation only: no broker, real order, or money.
Caller supplies stable idempotencyKey. Same completed key/payload returns same
stored receipt without another chart write; changed payload gets
IDEMPOTENCY_CONFLICT. Ambiguous bridge failure marks key indeterminate and
blocks automatic retry until user inspects chart state, reconciles outcome, and
uses a new key with fresh approval. Journal is memory-only for MCP process;
restart/crash does not provide durable exactly-once execution.
Evaluation status
npm run eval:offline validates 28 declared scenarios and currently executes 24
deterministic MCP conformance workflows; 4 remain explicitly planned. Reported
success rate uses executed runnable workflows as denominator and always reports
planned work plus concrete blockers separately. Runnable failures or missing runnable workflow/grader
implementations exit non-zero. Numeric agent-final-answer grading remains planned;
current evidence-conformance checks structured tool evidence, not model prose.
Data sources
Source | Auth | Coverage |
| None (default) | Stocks, ETFs, crypto, FX, indices — delayed data |
| None | Pass your own OHLCV array inline |
Bring your own key (BYOK) — Coming in v1.1: Alpaca, Polygon.io, FMP.
Configuration
Option | Default | How to set |
WebSocket port |
|
|
|
|
|
| (none) | Canonical base64url encoding of exactly 32 random bytes |
| (empty) | Reserved. Does not authorize or trigger candle egress today. |
| (unused) | Reserved for a future explicitly authorized remote-adapter contract. |
| (localhost + | Comma-separated exact HTTP(S) origins for |
| (off) | Set exactly |
Bridge security: paired v2 mutually authenticates server and browser with
HMAC-SHA-256 before chart traffic. Token never crosses WebSocket. Generate one
once, configure MCP process, inject same value into <McpBridge /> at runtime:
node -e "console.log(require('node:crypto').randomBytes(32).toString('base64url'))"
ROMACO_MCP_BRIDGE_AUTH=required \
ROMACO_MCP_BRIDGE_TOKEN="<generated-token>" \
ROMACO_MCP_ALLOWED_ORIGINS="https://myapp.com" \
npx @romaco/mcpNever put token in source, public bundle, URL, logs, or browser storage. Use
in-memory input for current page lifetime. auto selects paired v2 with valid
token; no token keeps legacy v1 with warning. Malformed configured token
disables only chart bridge. required never falls back to v1.
Legacy compatibility is unauthenticated and is not secure by default. Production
deployments should use required plus paired McpBridge; enable legacy only as
an explicit migration step.
Listener binds 127.0.0.1; exact origins add defense in depth. In paired mode,
localhost pages still need pairing token. Browser-to-server frames above 8 MiB
are rejected before JSON parsing, leaving more than 10x headroom over typical
documented chart snapshots. Frames are not encrypted. Never expose listener
remotely; use authenticated TLS gateway for non-loopback deployments.
# Custom port
npx @romaco/mcp --port 3200
# Or via env
ROMACO_MCP_PORT=3200 npx @romaco/mcpSet the same port in <McpBridge port={3200} />.
Local execution and remote egress
Current tools compute analysis locally in src/compression. Setting
ROMACO_TOKEN or ROMACO_API_URL does not authorize transmission of candles
to a remote analysis service. When a token is present, romaco_thesis returns a
structured REMOTE_EGRESS_DISABLED warning and uses the local artifact unless an
already validated gateway artifact was injected through an authorized host path.
A future remote adapter must add explicit authorization, validated boundary schemas, transport security, trace propagation, and user-facing egress docs before it can become callable. No automatic network fallback exists today.
Example prompts
Institutional analysis:
"Load TSLA 4h from yfinance, analyze the market, find key levels, detect any chart patterns, then draw the Fibonacci retracement of the last swing on the chart and add an alert at the 0.618 level."
Conditional automation:
"Load AAPL 15m, run full analysis. If RSI shows bullish divergence and price is near a support level, open a paper long 100 shares with stop loss at the VAL of the Volume Profile."
Pattern scanner:
"Load SPY 1d and detect patterns. For any head & shoulders found, tell me the target price and invalidation level."
Requirements
Node.js >= 20
For chart-bridge tools: romaco-charts >= 1.0.0-beta.6 with
<McpBridge />in your app
Links
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
- AlicenseBqualityCmaintenanceMCP server that lets AI agents directly control and interact with the TradingView desktop app via 88 chart-control tools, enabling automated chart reading, Pine Script compilation, strategy optimization, and replay control.10573736MIT
- AlicenseAqualityCmaintenanceA type-safe MCP server that enables AI agents to control TradingView Desktop via Chrome DevTools Protocol, allowing chart state reading, symbol/timeframe changes, and OHLCV data fetching.115521MIT

flox-mcpofficial
AlicenseAqualityAmaintenanceMCP server for the FLOX trading framework. About 30 tools to run backtests, scaffold strategies, validate for lookahead bias, compute indicators, place orders, and query PnL from Claude/Cursor.38222MIT- AlicenseAqualityCmaintenanceAn MCP server that lets Claude analyze your TradingView charts by reading the window and taking screenshots, with no write tools or trade execution.51MIT
Related MCP Connectors
MCP server for OpenMM — exposes market data, account, trading, and strategy tools to AI agents
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
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/romaco-labs/romaco-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server