diff --git a/CLAUDE.md b/CLAUDE.md index 7f78672..c436a30 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1542,13 +1542,25 @@ This ASGI support transforms the Yargı MCP server into a versatile web service **Authentication**: ✅ **OAuth 2.0 + Bearer JWT** - Cross-origin authentication working **Last Updated**: 2025-01-21 - All critical issues resolved +**Free Deployment**: `https://yargi-mcp-free.fly.dev` - No authentication required +**Status**: ✅ **OPERATIONAL** - Authorization disabled for open access +**Use Case**: Development, testing, and open-source usage without OAuth setup + #### Live Production Endpoints + +**Authenticated Deployment (api.yargimcp.com)**: - **Health Check**: https://api.yargimcp.com/health - **OAuth Login**: https://api.yargimcp.com/auth/login - **MCP Endpoint (HTTP)**: https://api.yargimcp.com/mcp/ - **MCP Endpoint (SSE)**: https://api.yargimcp.com/sse/ - **OAuth Discovery**: https://api.yargimcp.com/.well-known/oauth-authorization-server +**Free Deployment (yargi-mcp-free.fly.dev)**: +- **Health Check**: https://yargi-mcp-free.fly.dev/health +- **MCP Endpoint (HTTP)**: https://yargi-mcp-free.fly.dev/mcp/ +- **MCP Endpoint (SSE)**: https://yargi-mcp-free.fly.dev/sse/ +- **Direct Access**: No authentication required - immediate usage + ### Redis Configuration (Fly.io Native Upstash) ✅ The server uses Fly.io's native Upstash Redis integration for OAuth session storage: @@ -1631,6 +1643,8 @@ ENABLE_AUTH=true ``` #### MCP Connection Details for Claude AI + +**Authenticated Production (api.yargimcp.com)**: ``` MCP Server URL (HTTP): https://api.yargimcp.com/mcp/ MCP Server URL (SSE): https://api.yargimcp.com/sse/ @@ -1640,6 +1654,15 @@ Authentication: OAuth 2.0 with PKCE + JWT tokens + Bearer JWT (optional) Transports: HTTP (Streamable) + SSE (Server-Sent Events) ``` +**Free Open Access (yargi-mcp-free.fly.dev)**: +``` +MCP Server URL (HTTP): https://yargi-mcp-free.fly.dev/mcp/ +MCP Server URL (SSE): https://yargi-mcp-free.fly.dev/sse/ +Authentication: None - Direct access +Transports: HTTP (Streamable) + SSE (Server-Sent Events) +Use Case: Development, testing, immediate usage without OAuth setup +``` + #### SSE Transport Implementation ✅ The server now supports **Server-Sent Events (SSE)** transport alongside HTTP: @@ -2069,6 +2092,17 @@ build-backend = "setuptools.build_meta" - ✅ Session management and tool discovery - **Claude AI**: Successfully connects and uses all Turkish legal database tools +#### ✅ Bedesten Tools Null Safety Fixes (Completed - Jul 23, 2025) +- **Issue**: TypeError "cannot convert undefined or null to object" in Bedesten search and document tools +- **Root Cause**: API responses containing null/undefined fields without proper validation +- **Fixes Applied**: + - ✅ **Search Function**: Added null safety checks for `response.data.emsalKararList` and `response.data.total` + - ✅ **Document Function**: Added comprehensive validation for `doc_response.data`, `content`, and `mimeType` fields + - ✅ **Error Handling**: Added descriptive error messages and graceful fallbacks + - ✅ **Base64 Decoding**: Protected base64 operations with try-catch blocks +- **Result**: Bedesten tools now handle API edge cases gracefully without crashing +- **Production Status**: Deployed and operational on api.yargimcp.com + ### Key Features - **FastMCP Framework**: Modern MCP server implementation - **Unified APIs**: Single interface for multiple court systems diff --git a/fly-no-auth.toml b/fly-no-auth.toml new file mode 100644 index 0000000..5205913 --- /dev/null +++ b/fly-no-auth.toml @@ -0,0 +1,46 @@ +# fly.toml app configuration file for yargi-mcp-noauth +# +# See https://fly.io/docs/reference/configuration/ for information about how to use this file. +# + +app = 'yargi-mcp-free' +primary_region = 'fra' + +[env] +ENABLE_AUTH = "false" +HOST = "0.0.0.0" +PORT = "8000" +LOG_LEVEL = "info" + +[build] + +[http_service] + internal_port = 8000 + force_https = true + auto_stop_machines = 'off' + auto_start_machines = true + min_machines_running = 1 + processes = ['app'] + + # Enable connection persistence for MCP sessions + [http_service.concurrency] + type = "connections" + hard_limit = 100 + soft_limit = 80 + +[[vm]] + memory = '1gb' + cpu_kind = 'shared' + cpus = 1 + +[deploy] + strategy = "immediate" + +[processes] + app = "python asgi_app.py" + +[checks.http_health] # keep MCP /health live + type = "http" + interval = "30s" + timeout = "10s" + path = "/health" \ No newline at end of file