turkiye-mcp
<div align="center">
# 🇹🇷 turkiye-mcp
**Türkiye-specific live data for AI assistants — exchange rates, earthquakes, prayer times, weather and places to visit — via the Model Context Protocol.**
[](https://github.com/OmerP14/turkiye-mcp/actions/workflows/ci.yml)
[](https://www.npmjs.com/package/turkiye-mcp)
[](LICENSE)
[](https://nodejs.org)
[](https://modelcontextprotocol.io)
[English](#english) · [Türkçe](#türkçe)
<!--
DEMO GIF: Kaydettiğin GIF'i docs/demo.gif olarak ekle ve aşağıdaki satırın yorumunu kaldır.
Add your recording as docs/demo.gif and uncomment the line below.
<img src="docs/demo.gif" alt="turkiye-mcp demo in Claude Desktop" width="720">
-->
_🎬 Demo GIF coming soon_
</div>
---
## English
`turkiye-mcp` is an open-source [MCP](https://modelcontextprotocol.io) server that gives AI assistants such as **Claude Desktop** and **Cursor** access to up-to-date, Türkiye-specific public data. Ask _"How much is the dollar today?"_, _"Any recent earthquakes in Konya?"_ or _"I'm in Sivas, what should I see?"_ and the assistant answers with live data from official and open sources, anywhere in Türkiye's 81 provinces.
- 🔑 **No API keys, no paid services.** Every data source is free and public.
- 🛟 **Resilient.** Timeouts, clear error messages and automatic fallback sources.
- 🇹🇷 **Turkish-aware.** `istanbul`, `İSTANBUL` and `Istanbul` all work; times are in Türkiye time.
- ✅ **Tested.** Unit and end-to-end tests with mocked network calls; CI on Linux and Windows.
### Tools
| Tool | What it does | Parameters | Source |
| ------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------- | ------------------------------------------ |
| `doviz_kurlari` | Official exchange rates (forex & banknote buying/selling) | `kodlar?` — e.g. `["USD","EUR"]` | TCMB (Central Bank) |
| `doviz_cevir` | Converts between two currencies, TRY included (cross rates via TRY) | `miktar`, `kaynak`, `hedef`, `kur_turu?` | TCMB |
| `son_depremler` | Recent earthquakes in and around Türkiye | `min_buyukluk?`, `il?`, `adet?` (1-100), `gun?` (1-30), `kaynak?` (`afad`/`kandilli`) | AFAD, fallback: Kandilli Observatory |
| `namaz_vakitleri` | Daily prayer times for a province/district | `il`, `ilce?`, `tarih?` (`YYYY-MM-DD`) | Diyanet (via ezanvakti), fallback: Aladhan |
| `hava_durumu` | Current weather and up to 7-day forecast | `il`, `ilce?`, `gun?` (1-7) | Open-Meteo |
| `gezilecek_yerler` | Places to visit nearby (museums, historic sites, mosques/churches, nature), best-known first, with map links | `il`, `ilce?`, `kategori?` (`muze`/`tarihi`/`ibadet`/`doga`), `adet?`, `yaricap_km?` | Wikidata, fallback: Wikipedia |
Tool names and parameters are in Turkish (snake_case); descriptions are in Turkish with a short English summary, so assistants understand them in either language.
### Quick start
Requires [Node.js](https://nodejs.org) 22 or newer.
#### Claude Desktop
Open **Settings → Developer → Edit Config** (or edit the file directly) and add:
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"turkiye": {
"command": "npx",
"args": ["-y", "turkiye-mcp"]
}
}
}
```
Restart Claude Desktop. The tools appear under the 🔨 icon.
#### Cursor
Add the following to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (per project):
```json
{
"mcpServers": {
"turkiye": {
"command": "npx",
"args": ["-y", "turkiye-mcp"]
}
}
}
```
#### Other MCP clients
Any client that supports stdio servers works. The command is `npx -y turkiye-mcp`.
<details>
<summary>Running from source instead of npm</summary>
```bash
git clone https://github.com/OmerP14/turkiye-mcp.git
cd turkiye-mcp
npm install
npm run build
```
Then point your client at the built file, using an absolute path:
```json
{
"mcpServers": {
"turkiye": {
"command": "node",
"args": ["/absolute/path/to/turkiye-mcp/build/index.js"]
}
}
}
```
</details>
### Example prompts
- "How much is the dollar today?" → `doviz_kurlari`
- "Convert 250 euros to Turkish lira." → `doviz_cevir`
- "Were there any earthquakes above magnitude 3 in Muğla this week?" → `son_depremler`
- "What time is the evening (akşam) prayer in Kadıköy today?" → `namaz_vakitleri`
- "Will it rain in İzmir this weekend?" → `hava_durumu`
- "I'm in Kadıköy, what's worth seeing nearby?" → `gezilecek_yerler`
- "Any waterfalls or nature spots around Çamlıhemşin?" → `gezilecek_yerler` (`kategori: doga`)
### Troubleshooting
<details>
<summary><b>The tools don't show up in Claude Desktop</b></summary>
Closing the window is not enough, because Claude keeps running in the background. Right-click the Claude icon in the system tray (Windows) or menu bar (macOS) and choose **Quit**, then reopen it and start a **new** chat. **Settings → Developer** shows each server's status.
</details>
<details>
<summary><b>I can't find <code>claude_desktop_config.json</code> (Windows / Microsoft Store)</b></summary>
Use **Settings → Developer → Edit Config** so that Claude opens the right file. Some Microsoft Store builds keep it under `%LOCALAPPDATA%\Claude-Data\<folder>\` instead of `%APPDATA%\Claude\`. If you edit it by hand, keep the existing keys and only add `mcpServers`.
</details>
<details>
<summary><b>"node" or "npx" is not found</b></summary>
Apps installed from a store may not see your `PATH`. On Windows, either run `npx` through `cmd`:
```json
{ "command": "cmd", "args": ["/c", "npx", "-y", "turkiye-mcp"] }
```
or use the absolute path to Node.js (find it with `where node` / `which node`):
```json
{ "command": "C:\\Program Files\\nodejs\\node.exe", "args": ["C:\\path\\to\\turkiye-mcp\\build\\index.js"] }
```
</details>
<details>
<summary><b>Claude answers with a web search instead of the tools</b></summary>
The server tells the assistant to prefer its tools, but the final choice is the model's. Mention the data you want (_"use TCMB rates"_, _"from AFAD"_), and allow the tools when Claude asks for permission. If a tool was used, the answer shows a tool call labelled **turkiye** above it.
</details>
### Data sources
| Data | Source | Notes |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Exchange rates | [TCMB](https://www.tcmb.gov.tr/kurlar/today.xml) | Published once per business day (~15:30). Indicative; banks apply their own rates. |
| Earthquakes | [AFAD](https://deprem.afad.gov.tr) · [Kandilli Observatory (KOERI)](http://www.koeri.boun.edu.tr/scripts/lst0.asp) | AFAD times are UTC and converted to Türkiye time. Kandilli lists the last 500 events. |
| Prayer times | [Diyanet](https://namazvakitleri.diyanet.gov.tr) via [ezanvakti.emushaf.net](https://ezanvakti.emushaf.net) · [Aladhan](https://aladhan.com) | Aladhan uses the Diyanet calculation method (`method=13`), within ±1-2 min of official times. |
| Weather | [Open-Meteo](https://open-meteo.com) | [CC BY 4.0](https://open-meteo.com/en/license). Free for non-commercial use. |
| Places to visit | [Wikidata](https://www.wikidata.org) · [Wikipedia (tr)](https://tr.wikipedia.org) | Wikidata is [CC0](https://www.wikidata.org/wiki/Wikidata:Licensing); Wikipedia text is [CC BY-SA](https://creativecommons.org/licenses/by-sa/4.0/). Ranked by how many language editions cover a place. Coverage is richer in big cities. |
| Locations | [Open-Meteo Geocoding](https://open-meteo.com/en/docs/geocoding-api) (GeoNames) | Turns province/district names into coordinates for weather and places. |
> **Disclaimer:** This is an independent project and is not affiliated with any of the institutions above. Earthquake data is for information only. In an emergency, follow official AFAD announcements.
### Development
```bash
npm install
npm run build # compile TypeScript to build/
npm test # run tests (network is mocked)
npm run lint # ESLint
npm run format # Prettier
npm run inspector # try the server in MCP Inspector
```
Project layout:
```
src/
├── index.ts # entry point: starts the stdio transport
├── server.ts # creates the server and registers all tools
├── lib/ # shared helpers: HTTP (timeouts, Turkish errors), cache, geocoding, text, time
└── tools/ # one file per data source: doviz, deprem, namaz, hava, gezi
tests/
├── fixtures/ # trimmed real responses from each source
└── ... # unit tests + end-to-end tool tests via an in-memory MCP client
```
> **Important:** stdout is reserved for MCP messages. Log only with `console.error` (ESLint enforces this).
### Roadmap
- [x] TCMB exchange rates and currency conversion
- [x] Earthquakes (AFAD + Kandilli)
- [x] Prayer times (Diyanet)
- [x] Weather
- [x] Places to visit
- [ ] 🚌 **Public transport: nearest stops and the bus lines that serve them, planned.** OpenStreetMap has this data for all of Türkiye, but its public query servers are not reliable enough yet. Real-time arrivals are out of scope (every city runs its own closed system).
- [ ] Public holidays (`resmi_tatiller`)
- [ ] Publish to npm
- [ ] HTTP (Streamable HTTP) transport
Have an idea or know a good free data source? [Open an issue](https://github.com/OmerP14/turkiye-mcp/issues).
### Contributing
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for how to add a new tool, the coding rules and the pull request checklist. Release notes are in [CHANGELOG.md](CHANGELOG.md).
### License
[MIT](LICENSE) © 2026 Ömer Pehriz
---
## Türkçe
`turkiye-mcp`, **Claude Desktop** ve **Cursor** gibi yapay zekâ asistanlarına Türkiye'ye özel güncel verileri sunan açık kaynaklı bir [MCP](https://modelcontextprotocol.io) sunucusudur. _"Bugün dolar kaç?"_, _"Konya'da son depremler?"_ ya da _"Sivas'tayım, nereleri gezeyim?"_ diye sorduğunda asistan, 81 ilin hepsinde resmî ve açık kaynaklardan anlık veriyle yanıt verir.
- 🔑 **API anahtarı yok, ücretli servis yok.** Tüm kaynaklar ücretsiz ve herkese açık.
- 🛟 **Dayanıklı.** Zaman aşımı, anlaşılır Türkçe hata mesajları ve otomatik yedek kaynaklar.
- 🇹🇷 **Türkçeye duyarlı.** `istanbul`, `İSTANBUL`, `Istanbul` hepsi çalışır; saatler Türkiye saatidir.
### Araçlar
| Araç | Ne yapar | Kaynak |
| ------------------ | -------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| `doviz_kurlari` | TCMB döviz kurları (döviz/efektif alış-satış) | TCMB |
| `doviz_cevir` | İki para birimi arasında çeviri (TRY dahil) | TCMB |
| `son_depremler` | Son depremler; büyüklük, il, adet ve gün filtresi | AFAD, yedek: Kandilli Rasathanesi |
| `namaz_vakitleri` | İl/ilçe için günlük namaz vakitleri | Diyanet (ezanvakti üzerinden), yedek: Aladhan |
| `hava_durumu` | Anlık hava durumu ve 7 güne kadar tahmin | Open-Meteo |
| `gezilecek_yerler` | Çevredeki gezilecek yerler (müze, tarihi yapı, cami/kilise, doğa); en bilinenler önce, harita bağlantılı | Wikidata, yedek: Vikipedi |
### Kurulum
[Node.js](https://nodejs.org) 22 veya üstü gerekir.
**Claude Desktop:** Ayarlar → Geliştirici → Yapılandırmayı Düzenle (Windows'ta `%APPDATA%\Claude\claude_desktop_config.json`, macOS'ta `~/Library/Application Support/Claude/claude_desktop_config.json`):
```json
{
"mcpServers": {
"turkiye": {
"command": "npx",
"args": ["-y", "turkiye-mcp"]
}
}
}
```
**Cursor:** Aynı JSON'u `~/.cursor/mcp.json` (tüm projeler) veya `.cursor/mcp.json` (tek proje) dosyasına ekle.
Ardından uygulamayı yeniden başlat. Kaynak koddan çalıştırmak için yukarıdaki _"Running from source"_ bölümüne bak.
### Sorun giderme
- **Araçlar görünmüyor:** Pencereyi kapatmak yetmez, Claude arka planda çalışmaya devam eder. Sistem tepsisindeki Claude simgesine sağ tıklayıp **Çıkış** de, yeniden aç ve **yeni** bir sohbet başlat. Sunucunun durumu **Ayarlar → Geliştirici** bölümünde görünür.
- **`claude_desktop_config.json` bulunamıyor (Windows / Microsoft Store):** Doğru dosyayı açmak için **Ayarlar → Geliştirici → Yapılandırmayı Düzenle** seçeneğini kullan. Bazı Store sürümleri bu dosyayı `%APPDATA%\Claude\` yerine `%LOCALAPPDATA%\Claude-Data\<klasör>\` altında tutar. Elle düzenlersen mevcut ayarları silme, sadece `mcpServers` bölümünü ekle.
- **"node" veya "npx" bulunamıyor:** `"command": "cmd", "args": ["/c", "npx", "-y", "turkiye-mcp"]` kullan ya da Node'un tam yolunu yaz (`where node` komutuyla bulabilirsin).
- **Claude araç yerine web'de arıyor:** Sunucu, asistana bu araçları tercih etmesini söyler ama son karar modelindir. İstediğin kaynağı belirt (_"TCMB kuruyla"_, _"AFAD'a göre"_) ve izin istendiğinde araca izin ver. Cevabın üstünde **"Kullanıldı: Turkiye"** yazıyorsa araç kullanılmıştır.
### Örnek sorular
- "Bugün dolar kaç?"
- "250 euro kaç TL eder?"
- "Konya'da son depremler?"
- "Bu hafta Muğla'da 3'ün üzerinde deprem oldu mu?"
- "Bugün Kadıköy'de akşam ezanı kaçta?"
- "Hafta sonu İzmir'de yağmur var mı?"
- "Kadıköy'deyim, yakınlarda nereleri gezebilirim?"
- "Çamlıhemşin civarında şelale var mı?"
### Yol haritası
- [x] TCMB döviz kurları ve çevirici
- [x] Depremler (AFAD + Kandilli)
- [x] Namaz vakitleri (Diyanet)
- [x] Hava durumu
- [x] Gezilecek yerler
- [ ] 🚌 **Toplu taşıma: en yakın duraklar ve oradan geçen otobüs hatları, planlanan.** Veri OpenStreetMap'te tüm Türkiye için var, ancak herkese açık sorgu sunucuları henüz yeterince güvenilir değil. Otobüsün kaç dakikada geleceği kapsam dışı (her belediyenin kendi kapalı sistemi var).
- [ ] Resmî tatiller (`resmi_tatiller`)
- [ ] npm'de yayımlama
### Katkı
Katkılarını bekliyoruz! Yeni araç ekleme rehberi ve kurallar için [CONTRIBUTING.md](CONTRIBUTING.md), sürüm notları için [CHANGELOG.md](CHANGELOG.md) dosyasına bak.
> **Uyarı:** Bu bağımsız bir projedir; yukarıdaki kurumlarla bağlantısı yoktur. Deprem verileri bilgi amaçlıdır. Acil durumlarda AFAD'ın resmî duyurularını takip edin.
**Lisans:** [MIT](LICENSE) © 2026 Ömer Pehriz
TDQS
Scored across 6 tools
Each tool targets a clearly distinct domain: exchange rates, currency conversion, earthquakes, prayer times, weather, and tourist attractions. The two currency tools are easily distinguished as rates lookup vs. amount conversion.
All names use lowercase snake_case Turkish phrasing, which is predictable and consistent. However, the set is noun-phrase oriented rather than a strict verb_noun convention, with doviz_cevir slightly differing in form.
Six tools is well within the ideal range and each covers a distinct, useful Turkish information need. There is no redundancy or unnecessary bloat.
The tools cover several common Turkey-related information needs and provide both exchange rates and conversion for the currency domain. Broader Turkey utility coverage remains limited, but the chosen domains are adequately served.