Spaces:
Running
Running
Commit History
15 days ago
-
better error handling
61d2b72
-
Gradio 6 (transport MCP Streamable HTTP + SSE), sorties JSON compactes, sources réparées, find_territory, page Space
- Gradio 5.29 → 6.15.2 : /gradio_api/mcp/ répondait 404 (SSE seul), d'où le 502 des connecteurs claude.ai / Claude Code ; noms d'outils corrigés (préfixe sans underscore). - Outils déclarés via gr.api() : schéma dérivé des docstrings, réponses en JSON compact (plus de repr pydantic « root={...} »), limites et troncature signalées, valeurs numériques. - get_indicator_details : les sources échouaient toujours (dimension « libelle » inexistante) ; seules les dimensions listées par /meta sont demandées. - Recherche insensible aux accents/pluriels avec score ; find_territory (nom → code INSEE/SIREN). - Interface : accueil, tableaux, bloc de connexion (URL réelle, snippets), exemples ; README carte HF. - Tests hors ligne sur un backend simulé construit à partir de réponses réelles (17 tests). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>febc39b
-
feat: Enhanced logging with session tracking and usage patterns
- Track sessions with unique IDs - Log call sequence (call#1, call#2, prev=...) - Log response size in bytes - Track indicators and geographic levels queried - Detect patterns (list→details→query) - Prepare for MCP optimization analysis Co-authored-by: Cursor <cursoragent@cursor.com>3fb80f4 -
feat: Add logging filter to suppress non-critical ASGI errors
- Filter uvicorn.error and starlette loggers - Suppress 'NoneType not callable' and 'Exception in ASGI' messages - These errors come from malformed external requests, not our code Co-authored-by: Cursor <cursoragent@cursor.com>67fee40 -
revert: Rollback to Gradio 5.29 - Gradio 6.x breaks Claude Desktop MCP
Co-authored-by: Cursor <cursoragent@cursor.com>24e859f -
feat: Upgrade to Gradio 6.5 with improved MCP support
- Better SSE handling - File upload support for MCP - Real-time progress notifications - Should fix TypeError: NoneType errors Co-authored-by: Cursor <cursoragent@cursor.com>2ebfacd -
feat: Add logging to track MCP tool usage
- Log each tool call with parameters - Log execution time in milliseconds - Log result count or error message - Use WARNING level for business errors Co-authored-by: Cursor <cursoragent@cursor.com>831a68e
-
fix: Include geocode in query_indicator_data response
Co-authored-by: Cursor <cursoragent@cursor.com>dbdc8a5 -
fix: Use Gradio 5.29.0 with mcp_server support
Co-authored-by: Cursor <cursoragent@cursor.com>5394581 -
fix: Use Gradio 5.x with MCP support
Co-authored-by: Cursor <cursoragent@cursor.com>69c91c4 -
fix: Pin Gradio 4.44.0 for HuggingFace Spaces compatibility
Co-authored-by: Cursor <cursoragent@cursor.com>ed661db -
feat: Implement MCP Server for Indicateurs Territoriaux API
Add complete MCP server exposing 4 tools for querying French territorial ecological indicators via the CGDD/Ministry Cube.js API. Tools implemented: - list_indicators: List all indicators with thematique/maille filters - get_indicator_details: Get full metadata and sources for an indicator - query_indicator_data: Query data values by geographic level and code - search_indicators: Full-text search in indicator names/descriptions Architecture: - Gradio SSE endpoint at /gradio_api/mcp/ for Claude.ai integration - CubeResolver for mapping indicator_id to data cubes via /meta parsing - Metadata cache with periodic refresh - Async httpx client with proper error handling Cube naming convention discovered: - Data cubes: {thematique}_{maille} (e.g., conso_enaf_com) - Measures: {cube}.id_{indicator_id} (e.g., conso_enaf_com.id_611) - Geo dimensions: geocode_*/libelle_* for all levels Co-authored-by: Cursor <cursoragent@cursor.com>bad6218 -
initial commit
Verified signatureb90d5d5