Spaces:
Runtime error
Runtime error
feature/climateqa-mcp-first-tools
#32
by tompoulenard - opened
Add MCP Server for ClimateQA
This PR exposes ClimateQA's retrieval capabilities via MCP (Model Context Protocol), allowing AI agents to query climate documents programmatically.
What's New
MCP Service (mcp_service.py)
Two MCP tools exposed via Gradio's MCP server:
| Tool | Description |
|---|---|
retrieve_data_mcp |
Query IPCC/IPBES/IPOS documents and figures |
retrieve_graphs_mcp |
Query OWID graphs and visualizations |
App Integration (app.py)
- Added
mcp_server()function to register MCP tools - MCP server runs on port 7960 (configurable via
MCP_PORTenv var) - Main UI and MCP server run independently
Test Script (sandbox/mcp/)
CLI tool to test the MCP server:
pip install openai-agents
List tools
python sandbox/mcp/mcp_client.py list-tools
Query
python sandbox/mcp/mcp_client.py query "What causes climate change?"
tompoulenard changed pull request status to open
Hi Tom!
Thanks for the great contribution!
Because of organizational constraints, I have put your MCP server on a separate huggingface space.
It is available at https://huggingface.co/spaces/Ekimetrics/ClimateQA-MCP
timeki changed pull request status to closed