fxabsolute-mcp

fxabsolute-mcp

MCP server that connects coding agents to FXAbsolute's candle history, offering tools to query OHLC data, session scans, bucket stats, level touches, and a live chart bridge for backtesting collaboration.

Category
访问服务器

README

fxabsolute-mcp

Connects a coding agent directly to FXAbsolute's candle history over MCP.

The point is to stop the model looking at pictures of charts. A screenshot forces it to recover prices from pixels; these tools hand it the numbers, so "what does the New York open actually do" becomes a query instead of a guess.

Setup

From inside this repo, nothing to do — .mcp.json at the repo root already registers the server, so any agent started in /root/fxabsolute picks it up. Approve it once when prompted.

Anywhere else:

claude mcp add fxabsolute -- node /root/fxabsolute/mcp/src/index.js

Verify with claude mcp list, or run the checks directly:

cd mcp && npm run smoke      # every tool against real data
node test/proto.mjs          # stdio protocol round-trip

Where the data comes from

In order:

  1. FXA_DATA_DIR — an explicit directory of .bin files
  2. ../public/data — automatic when running inside the checkout
  3. FXA_ORIGIN (default https://www.fxabsolute.com) — fetched once per instrument and cached under ~/.cache/fxabsolute-mcp, so it works from any machine

~38 MB per instrument, downloaded lazily and only once.

Tools

Tool What it answers
fxa_instruments What's available, how many bars, what fields exist
fxa_candles Raw OHLC over a date range at any timeframe M1–W1
fxa_session_scan Specific bars of a trading session across months, summarised
fxa_bucket_stats Movement grouped by hour / weekday / month / year
fxa_level_touches Whether a price level actually held, and the reaction it produced

Live chart bridge

Tool Purpose
fxa_connect_chart Pair with an open chart using the code in its AI tab
fxa_wait_for_message Block until the trader types or speaks; returns their words + chart state
fxa_reply Answer into their chart panel
fxa_set_thinking Show the thinking indicator during a long lookup
fxa_disconnect_chart Leave the session

A trader opens the backtester, switches to the AI tab, and reads out the six-character code. Their agent calls fxa_connect_chart, then loops on fxa_wait_for_message → answer → fxa_reply. The site holds no API key and pays for no inference — every trader brings their own agent.

Each message carries a snapshot of the chart: instrument, timeframe, replay position, the current candle, every drawing as real geometry (height in pips, bars spanned, slope per bar, fib levels, whether price sits inside a box), open trades and running performance. The agent reads numbers, so it can check a claim with fxa_session_scan instead of guessing from an image.

Transport is a Supabase Realtime broadcast channel, so the browser and the agent need not be on the same machine — a chart on a phone pairs with a terminal on a laptop. Credentials come from /bridge-config.json on the site, which carries only the publishable key already present in every visitor's browser bundle, so pairing needs no setup.

The replay position is included with a note telling the agent not to reveal bars the trader has not reached. Backtesting is worthless if the assistant spoils the future.

The motivating query — the first 5-minute candle of the New York session, every day, for six months — is one call:

{ "instrument": "SPX500", "session": "nyse", "timeframe": "M5",
  "bars": [1], "from": "2024-01-01", "to": "2024-07-01" }

Two things worth knowing

There is no volume. The binary format is 20 bytes per candle: uint32 timestamp plus four float32 OHLC values. Volume was never stored, so no tool reports it and none invents a proxy silently — rangePips is offered instead, and every relevant response says so. Adding real volume means re-fetching all ~543 MB from Dukascopy into a wider record format.

Timeframes are bucketed on wall-clock time, not by array index. The browser chart aggregates every N bars, which is right for bar-by-bar replay but drifts for analysis: forex data has weekend and holiday gaps, so the Nth group of 60 M1 bars stops lining up with a real clock hour and an "H1 candle" can straddle a weekend. Here, bars are bucketed on floor(ts / period), so every bar sits on a true boundary and gaps produce no bar rather than a synthetic one.

Session windows are evaluated in exchange-local time with daylight saving resolved to the second, so "the 09:30 bar" is the 09:30 bar in both January and July rather than drifting an hour each spring.

fxa_session_scan also reports coverage: how many weekdays in the window produced no data at all. This matters more than it sounds — SPX500 is missing about 19% of weekdays in the first half of 2024, and without the warning a scan over that period returns clean-looking statistics built on a fifth less data than you asked for.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选