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 MCPwhat's the current USD to TRY exchange rate?"
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
Production-ready MCP (Model Context Protocol) server for Turkish Central Bank (TCMB) exchange rates.
Features
Current Rates: Get today's exchange rates from TCMB
Historical Rates: Query rates for any date since 1996
Currency Conversion: Convert between any currencies (including TRY)
Rate History: Get rate history with statistics (min, max, avg, change %)
Multi-Currency Comparison: Compare multiple currencies over time
Smart Caching: SQLite-based cache with configurable TTL
Holiday Support: Automatic fallback to previous business day
Turkish Holidays: Includes all official and religious holidays
Related MCP server: FX Currency MCP Server
Installation
Using Smithery (Recommended)
Install directly via Smithery:
npx -y @smithery/cli install @ofurkanuygur/tcmb_mcp --client claudeUsing uv (Local Development)
git clone https://github.com/ofurkanuygur/tcmb_mcp.git
cd tcmb_mcp
uv venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
uv pip install -e .Using pip
pip install tcmb-mcpUsage
Claude Desktop Configuration
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"tcmb": {
"command": "python",
"args": ["-m", "tcmb_mcp"],
"env": {
"TCMB_CACHE_ENABLED": "true",
"TCMB_DEBUG": "false"
}
}
}
}Running Manually
# stdio mode (default, for Claude Desktop)
python -m tcmb_mcp
# HTTP mode (for Smithery deployment)
MCP_TRANSPORT=http python -m tcmb_mcpTesting with MCP Inspector
npx @modelcontextprotocol/inspector python -m tcmb_mcpAvailable Tools
1. tcmb_get_current_rates
Get current exchange rates from TCMB.
Dolar ve Euro kurunu göster
→ tcmb_get_current_rates(currencies=["USD", "EUR"])2. tcmb_get_historical_rates
Get exchange rates for a specific date.
15 Ocak 2024 kurlarını getir
→ tcmb_get_historical_rates(date="2024-01-15")3. tcmb_list_currencies
List all available currencies.
Hangi para birimleri var?
→ tcmb_list_currencies()4. tcmb_convert_currency
Convert between currencies.
1000 Dolar kaç TL?
→ tcmb_convert_currency(amount=1000, from_currency="USD", to_currency="TRY")5. tcmb_get_rate_history
Get rate history with statistics.
Son 30 günde Dolar nasıl değişti?
→ tcmb_get_rate_history(currency="USD", start_date="2024-11-01", end_date="2024-11-30")6. tcmb_compare_currencies
Compare multiple currencies.
Dolar, Euro ve Sterlin'i karşılaştır
→ tcmb_compare_currencies(target_currencies=["USD", "EUR", "GBP"])Configuration
Environment Variables
Variable | Default | Description |
|
| Enable SQLite caching |
|
| Cache database path |
|
| Cache TTL for today (seconds) |
|
| Cache TTL for historical (seconds) |
|
| API timeout (seconds) |
|
| Maximum retry attempts |
|
| Enable debug logging |
|
| Log level |
|
| Transport mode ( |
|
| HTTP server port (when using HTTP transport) |
Development
Setup
git clone https://github.com/ofurkanuygur/tcmb_mcp.git
cd tcmb_mcp
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"Running Tests
# All tests
pytest
# With coverage
pytest --cov=src/tcmb_mcp --cov-report=term-missing
# Unit tests only
pytest tests/unit/Code Quality
# Linting
ruff check src/
# Type checking
mypy src/Local HTTP Server Testing
# Start server in HTTP mode
MCP_TRANSPORT=http python -m tcmb_mcp
# Test with Smithery playground
npx -y @smithery/cli playground --port 8080Docker
Build
docker build -t tcmb-mcp .Run
docker run -p 8080:8080 tcmb-mcpAPI Reference
TCMB URL Format
Today's rates:
https://www.tcmb.gov.tr/kurlar/today.xmlHistorical:
https://www.tcmb.gov.tr/kurlar/YYYYMM/DDMMYYYY.xmlExample: January 15, 2024 →
/kurlar/202401/15012024.xml
Rate Types
Type | Turkish | Description |
| Döviz Alış | Electronic transfer buying rate |
| Döviz Satış | Electronic transfer selling rate |
| Efektif Alış | Cash buying rate |
| Efektif Satış | Cash selling rate |
Author
Oktay Furkan Uygur
GitHub: @ofurkanuygur
Acknowledgments
Available Tools
6 toolstcmb_compare_currenciesCRead-onlyIdempotent
Birden fazla para birimini karşılaştırır.
| Name | Required | Description | Default |
|---|---|---|---|
| target_currencies | Yes | Karşılaştırılacak para birimleri | |
| base_currency | No | Baz para birimi | TRY |
| days | No | Geriye bakılacak gün sayısı |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations cover key behavioral traits (read-only, open-world, idempotent, non-destructive), so the description doesn't need to repeat these. It adds minimal context by implying a comparison operation, but doesn't disclose additional details like rate limits, authentication needs, or what the comparison entails (e.g., returns data vs. analysis). No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence in Turkish that directly states the tool's purpose without unnecessary words. It's appropriately sized for a simple tool, though it could be more informative without losing conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (comparing currencies with historical data), lack of output schema, and rich annotations, the description is insufficient. It doesn't explain what the comparison outputs (e.g., rates, trends, differences) or how it relates to sibling tools, leaving gaps for the agent to understand the tool's full context and usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with clear parameter descriptions in Turkish. The tool description doesn't add any meaning beyond the schema, such as explaining how target_currencies and base_currency interact or what the days parameter affects. Baseline 3 is appropriate since the schema handles parameter documentation adequately.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Birden fazla para birimini karşılaştırır' (Compares multiple currencies) states a clear verb+resource combination but lacks specificity about what is being compared (e.g., exchange rates, historical trends) and doesn't distinguish it from sibling tools like tcmb_get_current_rates or tcmb_get_historical_rates. It's vague about the comparison scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, context, or exclusions, leaving the agent to infer usage from the tool name and parameters alone, with no explicit comparison to siblings like tcmb_convert_currency.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
tcmb_convert_currencyBRead-onlyIdempotent
Para birimlerini çevirir (TRY dahil).
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Çevrilecek miktar | |
| from_currency | Yes | Kaynak para birimi (örn: USD, EUR, TRY) | |
| to_currency | Yes | Hedef para birimi | |
| rate_type | No | Kur tipi (alış veya satış) | selling |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate this is a read-only, idempotent, non-destructive operation with open-world data. The description adds minimal value by specifying TRY inclusion, but it doesn't disclose behavioral traits like rate source (e.g., TCMB), update frequency, or error handling. No contradiction with annotations exists.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with no wasted words. It's front-loaded and appropriately sized for its purpose, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the annotations cover safety and idempotency, and the schema fully documents parameters, the description is minimally adequate. However, it lacks output details (no output schema) and doesn't explain conversion logic or limitations, leaving gaps for a tool with 4 parameters and sibling alternatives.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so parameters are fully documented in the schema. The description adds no additional meaning beyond implying TRY support, which is partially covered by the schema's examples. Baseline 3 is appropriate as the schema carries the burden.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool 'converts currencies (including TRY)', which provides a basic verb+resource but lacks specificity about scope or data source. It doesn't distinguish from sibling tools like tcmb_get_current_rates or tcmb_compare_currencies, leaving ambiguity about what makes this conversion tool unique.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, context, or exclusions, and it fails to reference sibling tools that might handle related tasks like getting rates or comparing currencies.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
tcmb_get_current_ratesBRead-onlyIdempotent
Güncel döviz kurlarını TCMB'den getirir.
| Name | Required | Description | Default |
|---|---|---|---|
| currencies | No | Para birimi kodları (örn: ['USD', 'EUR']). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover key behavioral traits (read-only, open-world, idempotent, non-destructive). The description adds minimal context by specifying the data source (TCMB) and that rates are 'current', but doesn't disclose additional behaviors like rate limits, authentication needs, or response format. No contradiction with annotations exists.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence in Turkish that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action and resource, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (1 optional parameter), rich annotations (covering safety and idempotency), and no output schema, the description is minimally adequate. It specifies the source and temporal scope ('current'), but lacks details on return values (e.g., structure, units) or error handling, which could be useful despite annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with the parameter 'currencies' well-documented in the schema. The description adds no parameter-specific information beyond what the schema provides, such as examples of currency codes or default behavior if no currencies are specified. Baseline 3 is appropriate given high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('getirir' - fetches/retrieves) and resource ('güncel döviz kurlarını' - current exchange rates) from a specific source ('TCMB'den' - from TCMB). It distinguishes itself from siblings like 'tcmb_get_historical_rates' by specifying 'current' rates, but doesn't explicitly contrast with all siblings (e.g., 'tcmb_list_currencies' might also retrieve current data).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. It doesn't mention scenarios where it's preferred over siblings like 'tcmb_compare_currencies' or 'tcmb_convert_currency', nor does it specify prerequisites or exclusions. The description implies usage for current rates but lacks explicit comparison.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
tcmb_get_historical_ratesBRead-onlyIdempotent
Belirli bir tarih için geçmiş döviz kurlarını getirir.
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Tarih (YYYY-MM-DD, DD.MM.YYYY veya 'dün') | |
| currencies | No | Filtrelenecek para birimi kodları |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide comprehensive behavioral hints (readOnlyHint: true, openWorldHint: true, idempotentHint: true, destructiveHint: false), covering safety and idempotency. The description adds minimal context beyond this, only stating the basic fetch operation without details like rate limits, authentication needs, or data freshness. No contradiction with annotations exists.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and efficiently communicates the core functionality, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (fetching historical data with filtering), annotations cover behavioral aspects well, and the schema fully documents parameters. However, there's no output schema, and the description doesn't explain return values (e.g., rate format or structure). This leaves a gap in completeness, though annotations mitigate some risks.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, fully documenting both parameters (date with format options and currencies as an array). The description doesn't add any semantic details beyond what the schema provides, such as explaining currency code formats or date constraints. With high schema coverage, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Belirli bir tarih için geçmiş döviz kurlarını getirir' (Fetches historical exchange rates for a specific date). It specifies the verb 'getirir' (fetches) and resource 'geçmiş döviz kurları' (historical exchange rates), but doesn't explicitly differentiate from sibling tools like tcmb_get_current_rates or tcmb_get_rate_history, which appear to have overlapping functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like tcmb_get_current_rates (for current rates) or tcmb_get_rate_history (which might cover multiple dates), leaving the agent to infer usage context without explicit direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
tcmb_get_rate_historyBRead-onlyIdempotent
Para birimi kur geçmişi ve istatistikleri.
| Name | Required | Description | Default |
|---|---|---|---|
| currency | Yes | Para birimi kodu (örn: USD, EUR) | |
| start_date | Yes | Başlangıç tarihi (YYYY-MM-DD) | |
| end_date | Yes | Bitiş tarihi (YYYY-MM-DD) | |
| rate_type | No | Kur tipi | selling |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover key behavioral traits (read-only, open-world, idempotent, non-destructive), so the bar is lower. The description adds minimal context about retrieving 'history and statistics', but doesn't disclose additional behaviors like rate limits, authentication needs, or what 'statistics' entails. It doesn't contradict annotations, but adds little value beyond them.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence in Turkish that directly states the tool's function. It's front-loaded with the core purpose and contains no unnecessary words, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (4 parameters, no output schema) and rich annotations, the description is minimally adequate. It covers the basic purpose but lacks details on output format, error handling, or sibling tool differentiation. With annotations handling safety and idempotency, the description meets a baseline level of completeness but could be more informative.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all parameters (currency, start_date, end_date, rate_type). The description doesn't add any meaning beyond this, such as explaining parameter interactions or constraints. With high schema coverage, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Para birimi kur geçmişi ve istatistikleri' clearly states the tool's purpose as retrieving exchange rate history and statistics for a currency. It specifies the verb 'get' (implied) and resource 'rate history', but doesn't explicitly distinguish it from sibling tools like 'tcmb_get_historical_rates' or 'tcmb_get_current_rates', which likely serve similar functions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools or specify contexts where this tool is preferred over others like 'tcmb_get_historical_rates' or 'tcmb_compare_currencies', leaving the agent without usage direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
tcmb_list_currenciesBRead-onlyIdempotent
TCMB'de mevcut tüm para birimlerini listeler.
| Name | Required | Description | Default |
|---|---|---|---|
| include_rates | No | Güncel kur bilgisi eklensin mi? |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=true, and idempotentHint=true, covering safety and idempotency. The description adds no behavioral context beyond what annotations provide, such as rate limits, authentication needs, or what 'open world' means in this context. No contradiction with annotations exists.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence in Turkish that directly states the tool's purpose without unnecessary words. It's appropriately sized for a simple list operation and front-loaded with the core functionality.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (1 optional parameter), rich annotations covering safety and behavior, and no output schema, the description is minimally adequate. However, it lacks context on output format (e.g., list structure, currency codes vs. names) and doesn't leverage annotations to explain implications like 'open world' for currency data.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with the parameter 'include_rates' clearly documented in the schema. The description mentions no parameters, so it adds no semantic value beyond the schema. With high schema coverage, the baseline score of 3 is appropriate as the schema carries the parameter documentation burden.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('listeler' - lists) and resource ('TCMB'de mevcut tüm para birimleri' - all available currencies at TCMB). It distinguishes from siblings by focusing on listing currencies rather than comparing, converting, or getting rates. However, it doesn't explicitly differentiate from tcmb_get_current_rates which might also list currencies with rates.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus its siblings. It doesn't mention alternatives like tcmb_get_current_rates for currencies with rates, or when to choose between listing currencies versus getting historical/comparison data. The agent must infer usage from tool names alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v1.0.0- First observed
tcmb_compare_currencies - First observed
tcmb_convert_currency - First observed
tcmb_get_current_rates - First observed
tcmb_get_historical_rates - First observed
tcmb_get_rate_history - First observed
tcmb_list_currencies
TDQS
Scored across 6 tools
Most tools have distinct purposes, such as comparing currencies, converting, getting current rates, historical rates, rate history, and listing currencies. However, 'tcmb_get_historical_rates' and 'tcmb_get_rate_history' could be slightly confusing as both involve historical data, though their descriptions suggest different focuses (specific date vs. history and statistics).
All tool names follow a consistent 'tcmb_verb_noun' pattern with snake_case, using clear verbs like 'compare', 'convert', 'get', and 'list'. This predictability makes it easy for agents to understand and select tools.
With 6 tools, the server is well-scoped for currency and exchange rate operations, covering key functions like conversion, rate retrieval, and historical data without being overwhelming or too sparse.
The tool set provides comprehensive coverage for currency exchange rate tasks, including listing, current and historical rates, conversion, and comparison. A minor gap might be the lack of tools for more advanced analytics or alerts, but core operations are well-covered.
Maintenance
Related MCP Connectors
Convert currencies, get FX rates, and query historical ECB exchange rate data.
Fetch latest and historical currency exchange rates from Frankfurter. Convert amounts between curr…
Live FX + official central-bank rates, 110+ sources. Hosted, keyless, nothing to install.
Convert currencies on the daily European Central Bank reference rates. No API key, no signup.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides access to currency exchange rates and conversion tools using the Frankfurter API, including latest rates, historical data, and time series from sources like the European Central Bank.5MIT
- FlicenseNot gradedqualityDmaintenanceProvides real-time and historical foreign exchange rates for 31+ currencies, enabling currency conversion, historical rate lookups, and time series analysis using data from the Frankfurter API.-
- AlicenseAqualityCmaintenanceProvides currency conversion using the Wise API, supporting real-time and historical rates with caching and cross-rate calculation.2MIT
- AlicenseAqualityDmaintenanceFetches official currency exchange rates from the National Bank of Kazakhstan, supports conversion and rate dynamics tracking.515 npmMIT