Malja MCP
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MALJA_CACHE | No | Cache backend: 'memory' or 'sqlite'. Default: 'memory'. SQLite uses Node's built-in node:sqlite (Node >= 22.5) or falls back to memory automatically. | memory |
| MALJA_DIGITS | No | Set to 'arab' to use Arabic-Indic digits (٠–٩) in Arabic output. Default uses Western digits. | |
| MALJA_LOCALE | No | Set to 'ar' to make all tools respond in Arabic (Modern Standard Arabic) server-wide. Per-call locale parameter overrides. Default is English. | |
| MALJA_OFFLINE | No | Set to '1' to enable full offline mode, serving everything from a warmed cache. Requires MALJA_CACHE=sqlite and a previously warmed cache. | |
| MALJA_PROVIDERS | No | Comma-separated list of enabled data providers. Default: 'unhcr,worldbank'. Available: 'unhcr', 'worldbank', 'hdx', 'reliefweb'. | unhcr,worldbank |
| MALJA_HDX_APP_ID | No | Free HDX HAPI app identifier (base64 of app-name:email, not a secret) required when the 'hdx' provider is enabled. Generate with: curl 'https://hapi.humdata.org/api/v2/encode_app_identifier?application=<your-app>&email=<your-email>' | |
| MALJA_RELIEFWEB_APPNAME | No | Pre-approved ReliefWeb appname required when the 'reliefweb' provider is enabled. Request at https://apidoc.reliefweb.int/parameters#appname | |
| MALJA_HTTP_RATE_LIMIT_RPM | No | Rate limit for HTTP mode in requests per minute per client IP. Default: 120. | 120 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
| completions | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_countryA | Resolve a free-text country query ("egypt", "DRC", "syria") to canonical names and ISO3 codes. Use this first when unsure how a country is spelled in the data. |
| country_profileA | One-call humanitarian snapshot of a country: latest displaced population hosted (by category), population displaced FROM the country, and its top origin countries. |
| compare_countriesA | Compare a displacement metric across 2–5 countries over a year range. Defaults to refugees hosted (role "asylum") over the last 10 years. Set normalize_by to compare per 1,000 residents or per US$1bn GDP instead of absolute numbers. |
| refugee_populationA | Yearly displacement figures for a country: refugees, asylum-seekers, IDPs, stateless and others. role "asylum" (default) = hosted in the country; role "origin" = displaced from it. Optionally cross-filter by a second country (e.g. Syrians hosted in Egypt). Paginated. |
| demographicsA | Latest age/sex breakdown of displaced people connected to a country (role "asylum" = hosted there, default; "origin" = from there). UNHCR publishes demographics for recent years only. |
| latest_statisticsB | Most recent displacement figures. With a country: its latest hosted figures. Without: the latest global totals. |
| asylum_applicationsA | Individual asylum applications lodged per year. role "asylum" (default) = applications filed IN the country; "origin" = filed BY nationals of the country abroad. |
| asylum_decisionsB | Decisions on individual asylum applications per year — recognized, complementary protection, rejected, otherwise closed — plus the recognition rate. role "asylum" (default) = decided IN the country. |
| durable_solutionsA | UNHCR durable solutions per year: refugee returns, resettlement, naturalisation and IDP returns. These are FLOWS during each year (not end-year stocks), so a period total is reported. role "origin" (default) = solutions for people FROM the country (returns home, resettled/naturalised abroad); role "asylum" = refugees who left the country to return home, people resettled TO it, naturalised IN it. Optional other_country cross-filter and normalize_by ("population" → per 1,000 residents of the country). |
| conflict_eventsA | Annual conflict event counts and fatalities for a country (ACLED via HDX). Pairs with refugee_population/trend_analysis to relate violence and displacement. |
| food_securityA | Latest IPC food-insecurity phase breakdown for a country: people per phase 1–5, with phase 3+ ("crisis or worse") as the headline. Data: IPC via HDX. |
| humanitarian_fundingA | Humanitarian appeal requirements vs funding received per year for a country, with coverage percentage (OCHA FTS via HDX). |
| situation_reportsA | Situation reports published about a country: yearly counts plus the most recent report titles and links (ReliefWeb). Use it to ground trends and anomalies from other tools in what was actually reported at the time. |
| trend_analysisA | Analyse how a displacement metric evolved for a country: yearly series, year-over-year changes, linear trend (slope, R²), CAGR, statistically anomalous years (z-scores of yearly changes) and changepoints (structural breaks in level/slope, exact penalised segmentation). Default: refugees hosted, last 10 years — widen year_from for better changepoint power. |
| forecastA | Naive linear projection of a displacement metric 1–5 years ahead, based on the last 10 years, with 80% and 95% OLS prediction intervals. Structural breaks in the history are detected and reported; since_break=true fits only the data after the latest break. Optional chart (svg / chartjs / vega-lite) with the interval band. This is a statistical extrapolation, NOT a UNHCR planning figure — always present it with that caveat. |
| top_host_countriesA | Rank countries by a displacement metric for a year. by="asylum" (default) ranks host countries; by="origin" ranks countries people fled from. Set normalize_by="population" to rank per 1,000 residents (or "gdp" per US$1bn) — the ranking that shows Lebanon and Chad ahead of large economies. |
| monitor_changesA | Check a country's UNHCR displacement figures for changes worth attention: compares the latest year with the previous one (significant jumps, threshold crossings, record highs/lows) and, against an earlier snapshot, detects new data releases and revisions of past years. Returns alert-ready events with stable ids and severities plus a snapshot to compare against next time. Read-only: never contacts anyone; the snapshot is kept in the server cache and/or returned to the caller. |
| generate_chartA | Render a displacement metric for one or more countries as a chart specification. Formats: "chartjs" (Chart.js v4 config JSON), "vega-lite" (v5 spec), "mermaid" (xychart block), "svg" (standalone image markup). Set normalize_by to plot per 1,000 residents or per US$1bn GDP. show_changepoints=true marks detected structural breaks (svg, vega-lite; Chart.js via chartjs-plugin-annotation). |
| generate_mapA | GeoJSON FeatureCollection of country centroid points sized by a displacement metric — drop it into any GeoJSON viewer (geojson.io, Leaflet, Kepler). by="asylum" maps host countries, by="origin" maps origins. |
| generate_country_reportB | Compose a full markdown humanitarian situation report for a country: key figures, refugee trend with an embedded chart, origins of hosted refugees, asylum decisions and demographics. Reports progress while assembling. |
| export_reportA | Export a print-ready, self-contained document: the full country report (pass country) or any tool’s markdown output (pass markdown, e.g. from trend_analysis or durable_solutions). format "html" (default) = one file with embedded Arabic/Latin font, inline SVG charts, citations and the extraction manifest; "pdf" = the same rendered by a local headless Chrome/Chromium/Edge (falls back to HTML with an explanation if none is available). Arabic output (locale "ar") is right-to-left. Returns a resource link (export://…) unless inline is true. |
| export_dataA | Export normalized records from any dataset as csv, json, markdown or geojson (geojson only makes sense with group_by set, so rows map to countries). Use this when the user wants raw data to download or paste elsewhere. |
| get_metadataA | Describe the connected data providers: datasets served, metrics available, attribution and terms. Call this to learn what data exists before querying. |
| provider_healthA | Liveness check of every connected data provider (latency, reachability). Use when queries fail to distinguish upstream outages from bad parameters. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| summarize_situation | Concise overview of displacement in and from a country |
| compare_two_countries | Side-by-side displacement comparison of two countries |
| donor_briefing | Funding-oriented briefing for a country situation |
| explain_trends | Plain-language explanation of how and why displacement changed |
| find_anomalies | Hunt for statistically unusual years in a country’s displacement data |
| executive_report | Boardroom-ready report on a country situation |
| infographic_summary | Numbers and chart specs ready to hand to a designer |
| crisis_overview | Integrated displacement + conflict + hunger + funding picture for a country |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| providers-metadata | All enabled data providers with their datasets, attribution and terms |
| countries-metadata | All countries known to the primary provider, with ISO codes and regions |
| datasets-metadata | Every dataset served by any enabled provider, with metrics and citations |
| Forcibly displaced populations | End-year stocks of refugees, asylum-seekers, IDPs, stateless and other people of concern, by country of origin and country of asylum, 1951–present. |
| Demographics (age and sex) | Age/sex breakdown of people UNHCR protects or assists, by country. Recent years only. |
| Asylum applications | Individual asylum applications lodged, by year, origin and country of asylum. |
| Asylum decisions | Decisions on individual asylum applications: recognized, complementary protection, rejected, otherwise closed. |
| Durable solutions | Durable solutions recorded DURING each year (flows, not stocks): refugee returns (by origin and by the asylum country returned from), resettlement arrivals (by origin and resettlement country), naturalisations (by origin and naturalising country) and IDP returns. |
| Context indicators (World Bank) | National population, GDP (current US$), GDP per capita and extreme-poverty headcount ratio per country and year — denominator context for displacement figures. |
TDQS
Scored across 24 tools
Each tool targets a distinct dataset or operation, and descriptions clarify role parameters. Minor overlap between country_profile/latest_statistics and between generate_chart/generate_country_report/export_report could cause hesitation, but boundaries are generally clear.
All names use snake_case and are readable, but the set mixes verb-first (search_country, generate_chart) and noun-first (refugee_population, asylum_decisions) conventions without a single predictable pattern.
24 tools is heavy for a single server; while many are justified by distinct data sources and output formats, the surface is large enough to raise discovery burden and overlaps.
The surface covers country resolution, many displacement/context metrics, comparison/trend/forecast/monitoring, chart/map/report generation, export, metadata and health. Explicit list_countries or dataset-discovery helpers are missing, but get_metadata and search_country mostly compensate.