MCP server that exposes tools to interact with the CityCatalyst Global API.
-
Create and activate virtual environment:
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
-
Install MCP server in Cursor:
fastmcp install cursor globalapi_mcp_server.py
MCP_global_API/
├── gloablapi_mcp_server.py # Main MCP server with tool definitions
├── globalapi_api_client.py # API client functions
├── requirements.txt
└── README.md
- health_check() - Check the health of the CityCatalyst Global API service
- get_city_emissions(source, city, year, gpc_reference_number, gwp="ar5") - Get total CO2eq emissions for a city from CityCatalyst Global API
- Add API client function in
globalapi_client.py - Add MCP tool decorator in
globalapi_mcp_server.pythat calls the client function
- Check the health of the CityCatalyst Global API service
- Get city emissions for source SEEG, city BR SER, year 2022, and GPC reference number II.1.1
- Get the area for city with locode "BR SER"
- What GPC reference numbers are covered by the SEEG source?