shahzadarain/unhcr-mcp-server
If you are the rightful owner of unhcr-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
An MCP server providing access to UNHCR data API for querying refugee statistics, demographics, asylum decisions, and other humanitarian data.
get_population_statistics
Retrieve population statistics for refugees, asylum seekers, and persons of concern.
get_demographics
Get demographic breakdown by age and gender for populations of concern.
search_countries
Search for countries and retrieve their ISO3 codes.
get_time_series
Retrieve time series data for population statistics across multiple years.
get_asylum_decisions
Get data on asylum application decisions.
UNHCR MCP Server
An MCP (Model Context Protocol) server that provides access to UNHCR (United Nations High Commissioner for Refugees) data API. This server enables AI assistants to query refugee statistics, demographics, asylum decisions, and other humanitarian data.
Features
The server provides the following tools:
1. get_population_statistics
Retrieve population statistics for refugees, asylum seekers, and persons of concern.
Parameters:
year
(required): Year for the statistics (e.g., 2023)country_code
: ISO3 country code (e.g., "SYR" for Syria)population_type
: Type of populationREF
: RefugeesASY
: Asylum seekersIDP
: Internally displaced personsSTA
: Stateless personsOOC
: Others of concernALL
: All types
limit
: Number of results (default: 100, max: 1000)
2. get_demographics
Get demographic breakdown by age and gender for populations of concern.
Parameters:
year
(required): Year for the demographics datacountry_code
: ISO3 country codepopulation_type
: Type of population (REF, ASY, IDP, STA, OOC)
3. search_countries
Search for countries and retrieve their ISO3 codes.
Parameters:
query
(required): Country name or partial name to search
4. get_time_series
Retrieve time series data for population statistics across multiple years.
Parameters:
start_year
(required): Start year for the time seriesend_year
(required): End year for the time seriescountry_code
: ISO3 country codepopulation_type
: Type of population
5. get_asylum_decisions
Get data on asylum application decisions.
Parameters:
year
(required): Year for the asylum decisionscountry_code
: ISO3 country code of asylum countryorigin_country_code
: ISO3 country code of origin country
Installation
- Clone this repository or save the files
- Install dependencies:
npm install
Usage
Running Locally
To run the server locally:
node index.js
Integrating with Claude Desktop
Add the following to your Claude Desktop configuration:
{
"mcpServers": {
"unhcr": {
"command": "node",
"args": ["/path/to/unhcr-mcp-server/index.js"]
}
}
}
Hosting on mcp.so
- Upload your server files to mcp.so
- Configure the server endpoint
- Share the server URL with users who want to access UNHCR data
Example Queries
Here are some example queries you can make using this server:
-
Get refugee statistics for 2023:
Use get_population_statistics with year 2023 and population_type REF
-
Search for Syria's country code:
Use search_countries with query "Syria"
-
Get demographic data for Syrian refugees:
Use get_demographics with year 2023, country_code "SYR", population_type "REF"
-
Get time series data for global refugee populations:
Use get_time_series with start_year 2020, end_year 2023, population_type "REF"
-
Get asylum decisions in Germany for 2023:
Use get_asylum_decisions with year 2023, country_code "DEU"
API Documentation
This server interfaces with the UNHCR API v2. For more detailed information about the underlying API, visit: https://data.unhcr.org/api/doc
Data Usage
Please note that UNHCR data should be used responsibly and in accordance with humanitarian principles. The data represents real people in vulnerable situations.
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests to improve the server functionality.