Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d57a3939f | ||
|
|
50c6963eee | ||
|
|
def7e7d65e |
@@ -4,6 +4,28 @@
|
|||||||
|
|
||||||
Bu proje, çeşitli Türk hukuk kaynaklarına (Yargıtay, Danıştay, Emsal Kararlar, Uyuşmazlık Mahkemesi, Anayasa Mahkemesi - Norm Denetimi ile Bireysel Başvuru Kararları, Kamu İhale Kurulu Kararları, Rekabet Kurumu Kararları, Sayıştay Kararları, KVKK Kararları ve BDDK Kararları) erişimi kolaylaştıran bir [FastMCP](https://gofastmcp.com/) sunucusu oluşturur. Bu sayede, bu kaynaklardan veri arama ve belge getirme işlemleri, Model Context Protocol (MCP) destekleyen LLM (Büyük Dil Modeli) uygulamaları (örneğin Claude Desktop veya [5ire](https://5ire.app)) ve diğer istemciler tarafından araç (tool) olarak kullanılabilir hale gelir.
|
Bu proje, çeşitli Türk hukuk kaynaklarına (Yargıtay, Danıştay, Emsal Kararlar, Uyuşmazlık Mahkemesi, Anayasa Mahkemesi - Norm Denetimi ile Bireysel Başvuru Kararları, Kamu İhale Kurulu Kararları, Rekabet Kurumu Kararları, Sayıştay Kararları, KVKK Kararları ve BDDK Kararları) erişimi kolaylaştıran bir [FastMCP](https://gofastmcp.com/) sunucusu oluşturur. Bu sayede, bu kaynaklardan veri arama ve belge getirme işlemleri, Model Context Protocol (MCP) destekleyen LLM (Büyük Dil Modeli) uygulamaları (örneğin Claude Desktop veya [5ire](https://5ire.app)) ve diğer istemciler tarafından araç (tool) olarak kullanılabilir hale gelir.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🚀 5 Dakikada Başla (Remote MCP)
|
||||||
|
|
||||||
|
### ✅ Kurulum Gerektirmez! Hemen Kullan!
|
||||||
|
|
||||||
|
🔗 **Remote MCP Adresi:** `https://yargimcp.fastmcp.app/mcp`
|
||||||
|
|
||||||
|
### Claude Desktop ile Kullanım
|
||||||
|
|
||||||
|
1. **Claude Desktop'ı açın**
|
||||||
|
2. **Settings → Connectors → Add Custom Connector**
|
||||||
|
3. **Bilgileri girin:**
|
||||||
|
- **Name:** `Yargı MCP`
|
||||||
|
- **URL:** `https://yargimcp.fastmcp.app/mcp`
|
||||||
|
4. **Add** butonuna tıklayın
|
||||||
|
5. **Hemen kullanmaya başlayın!** 🎉
|
||||||
|
|
||||||
|
> 💡 **İpucu:** Remote MCP sayesinde Python, uv veya herhangi bir kurulum yapmadan doğrudan Claude Desktop üzerinden Türk hukuk kaynaklarına erişebilirsiniz!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
🎯 **Temel Özellikler**
|
🎯 **Temel Özellikler**
|
||||||
|
|||||||
@@ -362,6 +362,9 @@ sayistay_unified_client_instance = SayistayUnifiedClient()
|
|||||||
kvkk_client_instance = KvkkApiClient()
|
kvkk_client_instance = KvkkApiClient()
|
||||||
bddk_client_instance = BddkApiClient()
|
bddk_client_instance = BddkApiClient()
|
||||||
|
|
||||||
|
# Health check client (singleton for reuse)
|
||||||
|
_health_check_client: Optional[httpx.AsyncClient] = None
|
||||||
|
|
||||||
|
|
||||||
KARAR_TURU_ADI_TO_GUID_ENUM_MAP = {
|
KARAR_TURU_ADI_TO_GUID_ENUM_MAP = {
|
||||||
"": RekabetKararTuruGuidEnum.TUMU, # Keep for backward compatibility
|
"": RekabetKararTuruGuidEnum.TUMU, # Keep for backward compatibility
|
||||||
@@ -1465,6 +1468,11 @@ def perform_cleanup():
|
|||||||
if client_instance and hasattr(client_instance, 'close_client_session') and callable(client_instance.close_client_session):
|
if client_instance and hasattr(client_instance, 'close_client_session') and callable(client_instance.close_client_session):
|
||||||
logger.info(f"Scheduling close for client session: {client_instance.__class__.__name__}")
|
logger.info(f"Scheduling close for client session: {client_instance.__class__.__name__}")
|
||||||
tasks.append(client_instance.close_client_session())
|
tasks.append(client_instance.close_client_session())
|
||||||
|
# Close health check client if it was created
|
||||||
|
global _health_check_client
|
||||||
|
if _health_check_client is not None:
|
||||||
|
logger.info("Closing health check HTTP client")
|
||||||
|
tasks.append(_health_check_client.aclose())
|
||||||
if tasks:
|
if tasks:
|
||||||
results = await asyncio.gather(*tasks, return_exceptions=True)
|
results = await asyncio.gather(*tasks, return_exceptions=True)
|
||||||
for i, result in enumerate(results):
|
for i, result in enumerate(results):
|
||||||
@@ -1486,6 +1494,19 @@ def perform_cleanup():
|
|||||||
|
|
||||||
atexit.register(perform_cleanup)
|
atexit.register(perform_cleanup)
|
||||||
|
|
||||||
|
|
||||||
|
def get_or_create_health_check_client() -> httpx.AsyncClient:
|
||||||
|
"""Get or create a reusable HTTP client for health checks."""
|
||||||
|
global _health_check_client
|
||||||
|
if _health_check_client is None:
|
||||||
|
_health_check_client = httpx.AsyncClient(
|
||||||
|
timeout=10.0,
|
||||||
|
verify=False,
|
||||||
|
follow_redirects=True
|
||||||
|
)
|
||||||
|
return _health_check_client
|
||||||
|
|
||||||
|
|
||||||
# --- Health Check Tools ---
|
# --- Health Check Tools ---
|
||||||
@app.tool(
|
@app.tool(
|
||||||
description="Check if Turkish government legal database servers are operational",
|
description="Check if Turkish government legal database servers are operational",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "yargi-mcp"
|
name = "yargi-mcp"
|
||||||
version = "0.1.8"
|
version = "0.1.9"
|
||||||
description = "MCP Server For Turkish Legal Databases"
|
description = "MCP Server For Turkish Legal Databases"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.11"
|
requires-python = ">=3.11"
|
||||||
|
|||||||
Reference in New Issue
Block a user