tcmb-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., "@tcmb-mcp How much is 1,000 euros in Turkish lira today?"
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.
tcmb-mcp
A Model Context Protocol server that gives AI assistants (Claude, Cursor, any MCP client) the official exchange rates of the Central Bank of the Republic of Türkiye (TCMB): daily rates, historical series and currency conversion, with correct handling of weekends, holidays and the 15:30 publication time.
You: How much is 1,000 euros in lira, and how has the dollar moved this past month?
Claude (calls
convert_currencyandget_rate_history): At TCMB's latest forex buying rate (bulletin 2026/193, 13 October 2026), €1,000 = ₺55,112.80. Over the past month the dollar rose 1.54% against the lira, from 48.5343 on 14 September to 49.2794. That is the high of the period; the low was the starting point.
Why
LLMs don't know today's exchange rate, and when they guess, they guess confidently. The TCMB feed is public, but using it correctly takes some care:
Rates are published once per business day around 15:30 Istanbul time. There is no bulletin on weekends, public holidays, or before 15:30, and the archive URL simply returns 404.
Some currencies are quoted per 100 units (JPY), so a naive conversion is off by 100×.
Cash (banknote) rates don't exist for many currencies (CNY, RUB, AED, …), and SDR has no selling rate.
This server handles all of that, and always tells the model which bulletin date the numbers come from, so the assistant says "as of Friday's bulletin" instead of presenting stale data as today's.
Related MCP server: mcp-turkiye
Tools
Tool | What it does |
| All ~22 currencies (or a subset) for a date or the latest bulletin |
| Any amount between TRY and foreign currencies, or cross rates (EUR→USD) via TRY |
| Daily, weekly or monthly series with first/last, min/max (with dates), mean and % change |
| Codes, names and quoting units in the latest bulletin |
Also a resource (tcmb://bulletin/latest, the raw bulletin as JSON) and a prompt
(fx_briefing: "brief me on TRY vs USD over the last 30 days").
Every tool is annotated read-only and idempotent, validates its input with zod, and returns both
human-readable text and structured output matching a declared outputSchema.
Real output
>>> get_rate_history {"currency":"USD","start_date":"2026-09-14","end_date":"2026-10-13"}
USD forex_buying, daily, 2026-09-14 → 2026-10-13 (22 bulletins):
first 48.5343 · last 49.2794 · change +1.54%
min 48.5343 on 2026-09-14 · max 49.2794 on 2026-10-13 · mean 48.87898
>>> get_exchange_rates {"date":"2026-10-11","currencies":["USD","EUR","GBP"]}
No TCMB bulletin exists for 2026-10-11 (weekend, public holiday, or not yet published - bulletins
appear around 15:30 Istanbul time). Showing the most recent earlier bulletin: 2026/191 of 2026-10-09.
| Code | Currency | Unit | Forex buying | Forex selling | Banknote buying | Banknote selling |
|---|---|---:|---:|---:|---:|---:|
| USD | US DOLLAR | 1 | 49.1274 | 49.2160 | 49.0931 | 49.2898 |
| EUR | EURO | 1 | 55.1112 | 55.2105 | 55.0726 | 55.2933 |
| GBP | POUND STERLING | 1 | 64.9046 | 65.2430 | 64.8592 | 65.3409 |Install
Requires Node.js 22.12+. No API key needed; TCMB's feed is public.
Claude Code
claude mcp add tcmb -- npx -y github:omergazi34/tcmb-mcpClaude Desktop / Cursor / other MCP hosts (claude_desktop_config.json, .cursor/mcp.json, …)
{
"mcpServers": {
"tcmb": {
"command": "npx",
"args": ["-y", "github:omergazi34/tcmb-mcp"]
}
}
}From source: npm ci && npm run build, then point the host at node /path/to/tcmb-mcp/dist/index.js.
How it works
MCP host ──stdio──► server.ts (tools · resource · prompt, zod schemas, isError on domain errors)
│
▼
tcmb.ts TcmbClient
├─ onOrBefore(date): skip weekends locally, walk back over 404s (holidays)
├─ LRU cache: past bulletins forever, "no bulletin" days, latest for 10 min
├─ in-flight de-duplication · bounded concurrency for history
└─ timeout + retries (5xx / network only) ──► tcmb.gov.tr/kurlar/YYYYMM/DDMMYYYY.xml
│
bulletin.ts (XML → typed rates) · convert.ts (via TRY, ÷ unit) · history.ts (stats)Design decisions and trade-offs are in DESIGN.md.
Development
npm ci
npm test # 39 tests, ~98% line coverage, no network
npm run check # typecheck + eslint (strict, type-aware) + prettier + tests
TCMB_LIVE=1 npx vitest run test/live.test.ts # end-to-end over stdio against the real TCMBUnit tests run against a real bulletin saved from tcmb.gov.tr (test/fixtures/13102026.xml).
A fake TCMB site serves it under any date and returns 404s, 5xx and network errors on demand. MCP
behaviour is tested with the SDK's own Client over an in-memory transport. The live test runs
the built server over stdio against the real feed; live.yml schedules it weekly.
Disclaimer
Not affiliated with TCMB. Rates are TCMB's published indicative rates. For legal, tax or accounting use, check the official bulletin and the rules that apply to you.
License
MIT
Available Tools
4 toolsconvert_currencyConvert currency at TCMB ratesARead-onlyIdempotent
Convert an amount between TRY and any TCMB currency, or between two foreign currencies (cross rate via TRY). Uses the bulletin for date, or the latest one.
Inputs: to (required), from (required), amount (required), date, +1 more. Returns: to, date, from, rate, +4 more
get_exchange_ratesGet TCMB exchange ratesARead-onlyIdempotent
Official TCMB exchange rates (TRY per unit of foreign currency) for a date. Omit date for the latest bulletin; omit currencies for all ~22 currencies.
Inputs: date, currencies. Returns: date, rates, bulletin_no, requested_date
get_rate_historyGet TCMB rate historyARead-onlyIdempotent
Time series of one currency's TCMB rate (TRY per 1 unit) with summary statistics: first/last, min/max with dates, mean and % change. Ranges: daily up to 93 days, weekly up to 731, monthly up to 3660.
Inputs: currency (required), start_date (required), end_date, interval, +1 more. Returns: stats, points, currency, interval, +1 more
list_currenciesList TCMB currenciesARead-onlyIdempotent
Currencies in the latest TCMB bulletin, with their quoting unit.
Inputs: no named parameters. Returns: date, currencies
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct operation: fetching rates by date, listing available currencies, converting amounts, and retrieving a historical time series. The only minor overlap is between get_exchange_rates and list_currencies, since the latter returns a subset of the same bulletin data, but the descriptions clarify the distinction.
All four names follow a clean verb_noun snake_case pattern (get_exchange_rates, list_currencies, convert_currency, get_rate_history). The verbs are semantically appropriate and used consistently across the set.
Four focused tools map cleanly to the core exchange-rate use cases (current rates, currency inventory, conversion, history) with no redundancy. The count is well within the ideal range and each tool earns its place.
The surface covers the full read lifecycle for TCMB rate data: rates by date, currency listing, cross-rate conversion, and historical series with stats. Minor gaps exist, such as bulk multi-currency historical queries or date-range rate retrieval beyond the single-currency history tool, but core workflows are supported.
Related MCP Connectors
Unofficial access to CBRT/TCMB daily exchange rates: latest, history since 1996, conversion.
Live & historical FX rates and currency conversion for AI agents. No API keys.
Live & historical FX rates and currency conversion for AI agents. No API keys.
Turkey data API for AI agents: 40 tools + search/call for 230+ endpoints. Addresses (provinces, districts, postal codes, boundaries), validation (IBAN, tax ID/VKN, TCKN, phone, barcode), tax and salary calculators, Official Gazette, exchange rates, gold, crypto, economic indicators, prayer times, holidays and business days, weather, air quality, earthquakes, dam levels, fuel prices, EV charging, power outages, tolls, pharmacies on duty, football standings. Turkish JSON, free plan.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides access to Turkish Central Bank (TCMB) exchange rates with current and historical data since 1996, currency conversion, rate history statistics, and multi-currency comparisons with smart caching.61MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to query Turkey's public data, including central-bank FX rates, earthquake catalog, weather forecasts, public holidays, and offline validation of Turkish ID, tax, and IBAN numbers, with sourced and timestamped responses.4498 npm1MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to retrieve current and historical TCMB exchange rates, list official and religious holidays, and calculate business-day additions while skipping weekends and holidays.31MIT
- AlicenseAqualityBmaintenanceEnables users to fetch official daily Turkish central bank exchange rates, convert amounts between lira and foreign currencies, determine invoice rates, and inspect historical currency movements and available currencies.5304 npmMIT