HDX MCP Server provides access to humanitarian data through the Humanitarian Data Exchange (HDX) API - https://data.humdata.org/hapi. This server offers 33 specialized tools for retrieving humanitarian information including affected populations (refugees, IDPs, returnees), baseline demographics, food security indicators, conflict data, funding information, and operational presence across hundreds of countries and territories. See repository for instructions on getting a free HDX_APP_INDENTIFIER for access.
223
29 Tools
Version 4.43 or later needs to be installed to add the server automatically
Tools
Name | Description |
---|---|
affected_people_returnees_get | Get returnees data šÆ **CRITICAL - Data Coverage Warning**: Data coverage is only determined by the metadata_data_availability_get tool. Just because a country is in the system doesn't mean it has data. ALWAYS verify data availability before making data queries. šÆ **CRITICAL - Administrative Level Efficiency**: Before making aggregate queries (totals, country-wide statistics), ALWAYS check data availability using metadata_data_availability_get for the target country. Use the LOWEST available admin level (0=country, 1=state, 2=district) to avoid downloading excessive granular data. For country totals, use admin level 0 if available, otherwise level 1. Never query admin level 2 for simple aggregations when level 0/1 is sufficient. š **Pagination**: You can page through results using `limit` and `offset` parameters (limit=records per page, offset=starting position). ā ļø **CRITICAL - Never Manually Aggregate Data**: IMPORTANT: Never sum data yourself, only take the data verbatim from the tool. NEVER aggregate totals yourself to answer a question if you do not have the values already aggregated from the tool. Do NOT sum up individual records, calculate country-wide statistics from subnational data, or aggregate across time periods/demographics yourself. If data is not pre-aggregated, inform the user that aggregate data is not available. Always use the most appropriate administrative level that has pre-aggregated data. **Query Parameters:** - **app_identifier** (Required): base64 encoded application name and email, as in `base64("app_name:email")`. This value can also be passed in the `X-HDX-HAPI-APP-IDENTIFIER` header. See the *encoded_app_identifier* endpoint. - **population_group**: Filter the response by the population group, available values are described <a href="https://hdx-hapi.readthedocs.io/en/latest/data_usage_guides/enums/#population-group">here.</a> - **gender**: Filter the response by the gender, available values are described <a href="https://hdx-hapi.readthedocs.io/en/latest/data_usage_guides/enums/#gender">here.</a> - **age_range**: Filter the response by the age range. These are expressed as [start age]-[end age], or [start age]+ for an age range starting at [start age] or above. The end age is assumed to be inclusive, though that is not always explicit in the source data. - **min_age**: The minimum age from `age_range`, set to `null` if `age_range` is "all" and there is no age disaggregation - **max_age**: The maximum age from `age_range`, set to `null` if `age_range` is "all" and there is no age disaggregation, or if there is no upper limit to the age range - **origin_location_code**: Filter the response by a location (typically a country). The location codes use the ISO-3 (ISO 3166 alpha-3) codes. Use the metadata_location_get tool to get available location codes and names. - **origin_location_name**: Filter the response by a location (typically a country). The location names are based on the "short name" from the <a href="https://unstats.un.org/unsd/methodology/m49/#fn2">UN M49 Standard</a>. Use the metadata_location_get tool to get available location codes and names. - **origin_has_hrp**: Filter the response by the has_hrp flag. The has_hrp flag indicates whether a country has a Humanitarian Response Plan. - **origin_in_gho**: Filter the response by the in_gho flag. The in_gho flag indicates whether a country is in the <a href="https://humanitarianaction.info/">Global Humanitarian Overview</a>. - **asylum_location_code**: Filter the response by a location (typically a country). The location codes use the ISO-3 (ISO 3166 alpha-3) codes. Use the metadata_location_get tool to get available location codes and names. - **asylum_location_name**: Filter the response by a location (typically a country). The location names are based on the "short name" from the <a href="https://unstats.un.org/unsd/methodology/m49/#fn2">UN M49 Standard</a>. Use the metadata_location_get tool to get available location codes and names. - **asylum_has_hrp**: Filter the response by the has_hrp flag. The has_hrp flag indicates whether a country has a Humanitarian Response Plan. - **asylum_in_gho**: Filter the response by the in_gho flag. The in_gho flag indicates whether a country is in the <a href="https://humanitarianaction.info/">Global Humanitarian Overview</a>. - **start_date**: Filter entries to include rows where the reference period overlaps with or extends beyond this date, e.g. 2020, 2020-01, 2020-01-01 or 2020-01-01T00:00:00 - **end_date**: Filter entries to include rows where the reference period overlaps with or begins prior to this date, e.g. 2020, 2020-01, 2020-01-01, 2020-01-01 or 2020-01-01T23:59:59 - **output_format**: No description. - **limit**: Maximum number of records to return. The system will not return more than 10,000 records. - **offset**: Number of records to skip in the response. Use in conjunction with the limit parameter to paginate. **Responses:** - **200** (Success): Successful Response - Content-Type: `application/json` - **Response Properties:** - **Example:** ```json { "data": [ { "resource_hdx_id": "string", "population_group": "REF", "gender": "f", "population": 1, "max_age": "unknown_type", "min_age": "unknown_type", "reference_period_end": "unknown_type", "origin_location_code": "string", "age_range": "string", "asylum_location_code": "string", "asylum_location_name": "string", "origin_location_name": "string", "reference_period_start": "2024-01-01T12:00:00Z" } ] } ``` - **400**: Bad Request - Content-Type: `application/json` - **Response Properties:** - **Example:** ```json { "detail": "string" } ``` - **422**: Validation Error - Content-Type: `application/json` - **Response Properties:** - **Example:** ```json { "detail": [ { "loc": [ "unknown_type" ], "msg": "string", "type": "string" } ] } ``` - **500**: Internal Server Error - Content-Type: `application/json` - **Response Properties:** - **Example:** ```json { "error_sample_list": [ "unknown" ], "error": "string" } ``` |
Manual installation
You can install the MCP server using:
Installation for