mcp unhcr
Provides access to UNHCR refugee statistics through a standardized interface, allowing AI agents to query data by country of origin, country of asylum, and year.
Provides access to UNHCR refugee statistics through a standardized interface, allowing AI agents to query data by country of origin, country of asylum, and year.
This MCP (Model Context Protocol) server provides access to UNHCR population data through a standardized interface. It allows AI agents to query UNHCR’s Refugee Population Statistics Database by country of origin, country of asylum, and year(s).
Clone this repository:
Install dependencies:
pip install -r requirements.txt
To run the server locally in development mode:
python app.py
This will start the MCP server in development mode, allowing you to interact with it using the MCP Inspector or other MCP clients.
This server is configured for deployment on Smithery.ai, a platform for hosting MCP servers.
This server interacts with the UNHCR Population API:
https://api.unhcr.org/population/v1/population/
cf_type
: Always set to "ISO"coo
: Country of origin filter (ISO 3-letter country codes, comma-separated for multiple)coa
: Country of asylum filter (ISO 3-letter country codes, comma-separated for multiple)year
: Year filter (comma-separated for multiple years)get_population_data
Get raw population data from UNHCR with optional filtering.
Parameters:
- coo
(optional): Country of origin filter (ISO 3-letter code, comma-separated for multiple)
- coa
(optional): Country of asylum filter (ISO 3-letter code, comma-separated for multiple)
- year
(optional): Year filter (comma-separated for multiple years)
get_refugee_count
Get refugee count for a specific country of origin.
Parameters:
- coo
: Country of origin (ISO 3-letter code)
- coa
(optional): Country of asylum filter (ISO 3-letter code)
- year
(optional): Year filter
get_asylum_count
Get asylum statistics for a specific country of asylum.
Parameters:
- coa
: Country of asylum (ISO 3-letter code)
- year
(optional): Year filter
unhcr://countries
Get a list of countries with their ISO codes.
unhcr://stats/{year}
Get global refugee statistics for a specific year.
Parameters:
- year
: The year to get statistics for
unhcr://country/{country_code}
Get a profile for a specific country, showing both origin and asylum statistics.
Parameters:
- country_code
: ISO 3-letter country code
MIT
This project uses data from the UNHCR Refugee Population Statistics Database.