xe-mcp
Click on "Deploy 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., "@xe-mcp What's the current rate for NZD to USD?"
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.
xe-mcp
An MCP server for the Xe Currency Data API — brings live FX rates, historical analysis, and quant-flavored tools directly into Claude Code, Claude Desktop, and any MCP-compatible AI tool.
Works out of the box with zero credentials — falls back to Frankfurter (ECB data) automatically. Plug in Xe API keys to switch to Xe's live data. All 12 tools work without credentials.
Tools
Tool | What it does |
| Live mid-market rate between any two currencies |
| Convert an amount at the current rate |
| Common currencies (built-in); full Xe list (~170 currencies) with Xe key |
| Daily rates for a currency pair over N days |
| Daily std-dev + annualised vol — log-return methodology (FX options standard) |
| Percentile rank of today's rate in the N-day distribution + verdict |
| NZD snapshot across USD, AUD, EUR, GBP, JPY, SGD, CNY in one call |
| Pearson r of daily log-returns between two currency pairs |
| Check if a rate has crossed a threshold — returns triggered: YES/NO + distance |
| ASCII line chart of a currency pair's rate history in the terminal |
| SMA(20/50/200) with current rate and % distance from each average |
| One-call morning briefing: rate + range + vol + send verdict + SMA(20) |
Related MCP server: Realtime Exchange Rate MCP Server
Live output examples
All examples below use Frankfurter/ECB — no API key required.
> get_rate NZD USD
1 NZD = 0.564940 USD (Frankfurter/ECB, 2026-06-26)
> optimal_send_window NZD USD
NZD→USD send window (Frankfurter/ECB)
Current rate: 0.564940
30-day mean: 0.580598
30-day range: 0.563860 – 0.597400
Percentile: 14th (3/21 historical days were lower)
Verdict: UNFAVOURABLE — bottom quartile
Timestamp: 2026-06-26
> moving_average NZD USD
NZD/USD — moving averages (Frankfurter/ECB)
Current rate: 0.564940
SMA(20): 0.579758 (current is 2.56% below)
SMA(50): insufficient data (need 50 days, have 36)
> volatility_analysis NZD USD 30
NZD/USD — 30-day volatility (Frankfurter/ECB)
Current rate: 0.564940
Range (30d): 0.563860 – 0.597400
Daily volatility: 0.4023%
Annualised vol: 6.39%
Data points used: 21
> correlation_analysis NZD USD AUD USD 30
Correlation: NZD/USD vs AUD/USD (Frankfurter/ECB, 30d)
Pearson r: 0.8553
Interpretation: strong positive
Data points: 20 aligned trading days
> rate_chart NZD USD 30
NZD/USD — last 30 trading days (Frankfurter/ECB)
0.5974 │●●
│ ●●
│ ●●●
│ ●●
0.5806 │ ●●│ │
│ ●●│
│ ●│
│ ●│
0.5639 │ ●●●
└─────────────────────
05-29 06-12 06-26Setup
Zero-credential mode (Frankfurter/ECB)
All 11 tools work with no API keys using free ECB data via Frankfurter. list_currencies returns a built-in common currency list; with Xe credentials it returns the full ~170 currency list.
git clone https://github.com/CedricConday/xe-mcp
cd xe-mcp
npm install && npm run buildAdd to Claude Code:
claude mcp add xe-mcp node /path/to/xe-mcp/dist/index.jsWith Xe API (live rates)
Get credentials at xe.com/xecurrencydata, then:
claude mcp add xe-mcp node /path/to/xe-mcp/dist/index.js \
-e XE_ACCOUNT_ID=your_account_id \
-e XE_API_KEY=your_api_keyOr add to .claude/settings.json:
{
"mcpServers": {
"xe-mcp": {
"command": "node",
"args": ["/path/to/xe-mcp/dist/index.js"],
"env": {
"XE_ACCOUNT_ID": "your_account_id",
"XE_API_KEY": "your_api_key"
}
}
}
}Claude Code slash command
This repo ships a /fx command for quick analysis. Add it to your project:
cp -r .claude/commands /your-project/.claude/Then use /fx NZDUSD, /fx NZDUSD vol, /fx convert 1000 NZD USD.
Architecture
Local (MCP stdio server)
Claude Code ↔ stdio ↔ xe-mcp ──→ Xe XECD API (if credentialed)
└→ Frankfurter/ECB (free fallback)xe-mcp/
├── src/
│ ├── index.ts # MCP server (stdio transport)
│ ├── xe-client.ts # Xe XECD API wrapper (authenticated)
│ ├── frankfurter-client.ts # Frankfurter ECB API (free fallback)
│ ├── s3-cache.ts # S3-backed rate history cache (Lambda use)
│ └── tools/
│ ├── rates.ts # get_rate, convert, list_currencies
│ ├── analysis.ts # get_historical_rates, volatility_analysis, optimal_send_window
│ ├── nzd.ts # nzd_corridors
│ ├── correlation.ts # correlation_analysis
│ ├── alerts.ts # rate_alert_check
│ └── chart.ts # rate_chart (ASCII)
├── lambda/
│ ├── handler.ts # REST Lambda — all 10 tools via POST /tool/{name}
│ ├── alert-scheduler.ts # CloudWatch hourly → DynamoDB scan → SQS publish
│ └── alert-processor.ts # SQS consumer → SES email notification
├── src/__tests__/ # 49 unit tests (5 suites)
├── .github/workflows/
│ ├── ci.yml # Test → Build → verify on push
│ └── deploy.yml # Test → Build → SAM deploy to AWS (ap-southeast-2)
├── Dockerfile # Multi-stage Alpine — local & ECS/K8s deployments
└── template.yml # SAM: Lambda + API Gateway + SQS + DynamoDB + S3AWS deployment (sam deploy)
API Gateway → handler Lambda → Xe/Frankfurter → response
CloudWatch Events (hourly) → alert-scheduler Lambda → DynamoDB → SQS
↓
alert-processor Lambda → SES email
DynamoDB: alert configurations (userId, from, to, threshold, direction)
S3: rate-history cache bucket (scaffolded in src/s3-cache.ts; not yet wired into the handler)Credential detection: XE_ACCOUNT_ID + XE_API_KEY in env → Xe. Otherwise → Frankfurter. Same fallback in Lambda and locally.
Stack coverage
Built to match the full-stack requirements stated in Xe.com's developer role descriptions. Every item below is backed by code in this repo (S3 caching is scaffolded but not yet wired — noted below).
Requirement | Where it lives |
TypeScript |
|
MCP / agentic tooling |
|
AWS Lambda |
|
AWS SQS |
|
AWS DynamoDB |
|
AWS S3 |
|
SQLite (local) |
|
AWS SES |
|
AWS API Gateway |
|
CloudWatch Events |
|
SAM / IaC |
|
CI/CD (GitHub Actions) |
|
Docker |
|
FX domain knowledge |
|
Tests
npm test
# Test Suites: 5 passed
# Tests: 49 passedTests cover: zero-volatility edge cases, constant-return series, annualised vol formula (× √252), percentile distribution, Pearson r properties (perfect correlation, inverse, zero-variance), NZD/AUD co-movement sanity, SMA computation (period ordering, edge cases, distance from SMA), SQLite schema (PK constraints, upsert behavior, range query ordering, index verification), pair_summary math (percentile ranking, verdict labels, SMA(20) boundary).
Why
Xe's developer job posting requires "daily use of agentic coding tools (Claude Code or equivalent)." I built the tool I'd want if I were working on Xe's FX data pipeline — one that brings rate intelligence into the coding environment without tabbing out.
The quant tools (volatility_analysis, optimal_send_window, correlation_analysis) come from time in currency markets. They're not wrappers around a stock analytics library; the math is direct log-return methodology with test coverage.
Stack
TypeScript · Node.js · @modelcontextprotocol/sdk · Xe XECD API · Frankfurter API
License
MIT
Available Tools
12 toolsconvertB
Convert an amount from one currency to another at the current mid-market rate.
Inputs: to (required), from (required), amount (required).
correlation_analysisA
Compute the Pearson correlation of daily log-returns between two currency pairs over N days. Useful for understanding co-movement: NZD/USD vs AUD/USD typically correlate highly (~0.85). Range: -1 (inverse) to +1 (perfect).
Inputs: pair1_to (required), pair2_to (required), pair1_from (required), pair2_from (required), +1 more.
get_historical_ratesA
Fetch daily mid-market rates for a currency pair over the past N days. Uses Xe when credentials are set; falls back to Frankfurter (ECB) for free use.
Inputs: to (required), from (required), days.
get_rateA
Get the current mid-market exchange rate between two currencies. Uses Xe when credentials are set; falls back to Frankfurter (ECB) for free use.
Inputs: to (required), from (required).
list_currenciesA
List currency codes. Returns common currencies without credentials; the full Xe list (~170 currencies) requires Xe credentials.
Inputs: no named parameters.
moving_averageA
Calculate simple moving averages (SMA) for a currency pair. Returns 20, 50, and 200-day SMAs (or custom period), current rate, and distance from each MA — useful for trend assessment.
Inputs: to (required), from (required), periods.
nzd_corridorsA
Snapshot of NZD against all major trading pairs simultaneously (USD, AUD, EUR, GBP, JPY, SGD, CNY). Useful for a quick NZD strength overview.
Inputs: no named parameters.
optimal_send_windowB
Tells you where today's rate sits in the N-day distribution and whether now is statistically favourable to convert. Useful for FX timing decisions.
Inputs: to (required), from (required), days.
pair_summaryA
One-call morning briefing for a currency pair: current rate, N-day range, annualised volatility, send-window verdict, and SMA(20). Combines get_rate + volatility_analysis + optimal_send_window into a single tool.
Inputs: to (required), from (required), days.
rate_alert_checkA
Check whether a currency pair's current rate has crossed a threshold. Returns a boolean verdict and the current rate — designed for use in polling loops or CI checks that trigger alerts.
Inputs: to (required), from (required), direction (required), threshold (required).
rate_chartA
Render an ASCII line chart of a currency pair's rate history over N days. Shows trend visually in the terminal.
Inputs: to (required), from (required), days.
volatility_analysisA
Calculate annualised volatility of a currency pair over the past N days. Returns daily std-dev of log-returns and annualised figure — same methodology used in FX options pricing.
Inputs: to (required), from (required), days.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool serves a distinct purpose: convert, get_rate, get_historical_rates, and various analytical tools (correlation, moving average, volatility) have clear boundaries. Specialized tools like nzd_corridors and optimal_send_window further differentiate. No two tools overlap in functionality.
All tool names follow a consistent snake_case convention with informative verb_noun or noun patterns (e.g., get_rate, list_currencies, volatility_analysis). No naming style conflicts.
12 tools is well-scoped for a currency exchange server, covering core operations (rates, conversions, history) and analytical features (correlation, volatility, alerts). Not overwhelming or sparse.
The tool set covers the full FX workflow: querying rates, historical data, conversion, statistical analysis, trend visualization, alerting, and a summary tool (pair_summary). No obvious gaps for typical use cases.
Maintenance
Related MCP Connectors
Unofficial Exchange MCP — wraps the Frankfurter currency exchange API (free, no auth)
A MCP server for the Frankfurter API for currency exchange rates.
Unofficial Frankfurter MCP — wraps Frankfurter API (api.frankfurter.dev)
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
Related MCP Servers
- FlicenseBqualityDmaintenanceAn MCP server that provides currency rates, conversions, and historical exchange-rate data using the Frankfurter API. It enables users to retrieve latest rates, convert amounts between currencies, and access time-series data for currency pairs.3-
- AlicenseAqualityBmaintenanceProvides real-time foreign-exchange rates, historical data, and multi-currency lookups to MCP-compatible AI coding assistants like Claude Code and Cursor.4MIT
- AlicenseBqualityDmaintenanceMCP server that exposes QuantXData's institutional crypto market data APIs to AI assistants, enabling natural language queries for trades, order books, OHLCV, options, and more across 120+ exchanges.12MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for the Frankfurter exchange-rate API, enabling currency conversion and rate queries.6MIT