{"_id":"@braynexservices/nigeria-mcp-un-sdg","_rev":"2-189fe28d1553cf6c99c894749d8429da","name":"@braynexservices/nigeria-mcp-un-sdg","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@braynexservices/nigeria-mcp-un-sdg","version":"0.1.0","keywords":["mcp","model-context-protocol","nigeria","sdg","united-nations","development","poverty","statistics"],"author":{"url":"Braynex Services Ltd — https://www.braynexservices.com","name":"Samuel Orie","email":"braynexservices@gmail.com"},"license":"MIT","_id":"@braynexservices/nigeria-mcp-un-sdg@0.1.0","maintainers":[{"name":"braynexservices","email":"braynexservices@gmail.com"}],"homepage":"https://www.braynexservices.com","bugs":{"url":"https://github.com/braynexservices/nigeria-mcp/issues"},"bin":{"nigeria-mcp-un-sdg":"dist/stdio.js"},"dist":{"shasum":"339183ab7f3fa69f20133eefb81e1c4d1d526588","tarball":"https://registry.npmjs.org/@braynexservices/nigeria-mcp-un-sdg/-/nigeria-mcp-un-sdg-0.1.0.tgz","fileCount":28,"integrity":"sha512-tn64pPXlYLNjbyzPrDtvxJ6i8cRl1O6VPzKZnEzWwgVwqvRJDhnultNMEPoPDEOLEeperPTTaTwTqiInJbkrkA==","signatures":[{"sig":"MEUCIALQ7AvhoxSjBT0ETvvUknu0/nApTQuqXIwNcwyo9d1DAiEApr0D/DHKfdmzCNd1KgkxtYtEhUoNhfg5uJ7ldQAQUq8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34773},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"gitHead":"a212543133ceacfdf5cbe48ba7be915222c9c004","mcpName":"io.github.Braynexservices/nigeria-un-sdg","private":false,"scripts":{"build":"tsc","smoke":"tsx scripts/smoke.ts","prepack":"tsc","smoke:live":"tsx scripts/live.ts","start:stdio":"tsx src/stdio.ts"},"_npmUser":{"name":"braynexservices","email":"braynexservices@gmail.com"},"repository":{"url":"git+https://github.com/braynexservices/nigeria-mcp.git","type":"git","directory":"lanes/un-sdg"},"_npmVersion":"11.6.1","description":"Nigeria's UN Sustainable Development Goals indicators (poverty, under-5 mortality, electricity and water access, primary-school completion) as MCP tools. Backed by the UN SDG Global Database API, keyless.","directories":{},"displayName":"Nigeria UN SDG MCP","_nodeVersion":"24.11.0","dependencies":{"zod":"^3.25.76","@braynexservices/nigeria-mcp-core":"^0.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@modelcontextprotocol/sdk":"^1.29.0"},"_npmOperationalInternal":{"tmp":"tmp/nigeria-mcp-un-sdg_0.1.0_1784437922999_0.0627877593551609","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@braynexservices/nigeria-mcp-un-sdg","displayName":"Nigeria UN SDG MCP","version":"0.1.1","description":"Nigeria's UN Sustainable Development Goals indicators (poverty, under-5 mortality, electricity and water access, primary-school completion) as MCP tools. Backed by the UN SDG Global Database API, keyless.","homepage":"https://www.braynexservices.com","repository":{"type":"git","url":"git+https://github.com/braynexservices/nigeria-mcp.git","directory":"lanes/un-sdg"},"bugs":{"url":"https://github.com/braynexservices/nigeria-mcp/issues"},"keywords":["mcp","model-context-protocol","nigeria","sdg","united-nations","development","poverty","statistics"],"private":false,"publishConfig":{"access":"public"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"tsc","prepack":"tsc","start:stdio":"tsx src/stdio.ts","smoke":"tsx scripts/smoke.ts","smoke:live":"tsx scripts/live.ts"},"dependencies":{"@braynexservices/nigeria-mcp-core":"^0.3.0","zod":"^3.25.76"},"devDependencies":{"@modelcontextprotocol/sdk":"^1.29.0"},"license":"MIT","author":{"name":"Samuel Orie","email":"braynexservices@gmail.com","url":"Braynex Services Ltd — https://www.braynexservices.com"},"engines":{"node":">=20"},"bin":{"nigeria-mcp-un-sdg":"dist/stdio.js"},"mcpName":"io.github.Braynexservices/nigeria-un-sdg","gitHead":"d90447b167e5d8821ca45aea6970f958fafae28e","_id":"@braynexservices/nigeria-mcp-un-sdg@0.1.1","_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-zMhQ/WWtZHZFIQpf4ZR9x8PwuUiSici6pes2kULFc6ctFAsWsQLXZQI/ZWry5TZcbj154WzRzsE3FBhtPq+Rkg==","shasum":"fcbf178be73978502bfe6dcaa528cdbe70ea3b02","tarball":"https://registry.npmjs.org/@braynexservices/nigeria-mcp-un-sdg/-/nigeria-mcp-un-sdg-0.1.1.tgz","fileCount":28,"unpackedSize":34814,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCJMTWGZIXLpPOegQ2yRNrLfGh6wtit+k8wY2BS7MSEWwIhANXrtCSwl4bxZ6hiWY3iTHoUr7nprj+6flKaScDjZ4B1"}]},"_npmUser":{"name":"braynexservices","email":"braynexservices@gmail.com"},"directories":{},"maintainers":[{"name":"braynexservices","email":"braynexservices@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nigeria-mcp-un-sdg_0.1.1_1784464132273_0.1033268774204601"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-19T05:12:02.823Z","modified":"2026-07-19T12:28:52.569Z","0.1.0":"2026-07-19T05:12:03.157Z","0.1.1":"2026-07-19T12:28:52.405Z"},"bugs":{"url":"https://github.com/braynexservices/nigeria-mcp/issues"},"author":{"name":"Samuel Orie","email":"braynexservices@gmail.com","url":"Braynex Services Ltd — https://www.braynexservices.com"},"license":"MIT","homepage":"https://www.braynexservices.com","keywords":["mcp","model-context-protocol","nigeria","sdg","united-nations","development","poverty","statistics"],"repository":{"type":"git","url":"git+https://github.com/braynexservices/nigeria-mcp.git","directory":"lanes/un-sdg"},"description":"Nigeria's UN Sustainable Development Goals indicators (poverty, under-5 mortality, electricity and water access, primary-school completion) as MCP tools. Backed by the UN SDG Global Database API, keyless.","maintainers":[{"name":"braynexservices","email":"braynexservices@gmail.com"}],"readme":"# Nigeria UN SDG MCP\n\n> Nigeria's UN Sustainable Development Goals indicators (poverty, health, energy & water access, education), exposed to AI agents as MCP tools.\n\n**Status:** 🌐 **LIVE + free (no API key)**\n**Package:** `@braynexservices/nigeria-mcp-un-sdg` v0.1.0 · depends on `@braynexservices/nigeria-mcp-core`\n**Author:** Samuel Orie (Founder) · **Owner:** [Braynex Services Ltd](https://www.braynexservices.com) · **License:** [MIT](./LICENSE)\n**© 2026 Braynex Services Ltd** — MIT licensed (copyright retained; see the [`NOTICE`](./NOTICE)).\n\n---\n\n## What it does\nReturns a UN SDG indicator series for **Nigeria** — one national headline value per year, sorted ascending. Data is pulled live from the **UN SDG Global Database** (UN Statistics Division, area 566 = Nigeria), **keyless**. You pass a friendly alias (`extreme_poverty`, `under5_mortality`, …) or a raw UN SDG series code (`SI_POV_DAY1`). Public statistical data — no PII, no key.\n\n## Tool\n\n### `get_sdg_indicator`\n| Param | Required | Notes |\n|---|---|---|\n| `series` | ✔ | a friendly alias (below) **or** a raw UN SDG series code (e.g. `SI_POV_DAY1`) |\n| `start_year` | — | integer ≥ 2000 — drop points before this year |\n| `end_year` | — | integer ≤ 2035 — drop points after this year |\n\n**Aliases** (each resolves to a UN SDG series code):\n\n| Alias | Series code | Measures | SDG goal |\n|---|---|---|---|\n| `extreme_poverty` | `SI_POV_DAY1` | Population below the international poverty line (%) | 1 |\n| `under5_mortality` | `SH_DYN_MORT` | Under-5 mortality rate (deaths per 1,000 live births) | 3 |\n| `electricity_access` | `EG_ACS_ELEC` | Population with access to electricity (%) | 7 |\n| `water_access` | `SP_ACS_BSRVH2O` | Population using basic drinking-water services (%) | 6 |\n| `primary_school_completion` | `SE_TOT_CPLR` | Primary-school completion rate (%) | 4 |\n\nAnything that isn't a known alias is treated as a raw series code and upper-cased before the lookup.\n\n**Example:**\n```jsonc\n// → get_sdg_indicator({ \"series\": \"extreme_poverty\" })\n\"Proportion of population below international poverty line (%) — Nigeria: 30.9 in 2020 (4 points)\"\n// structuredContent:\n// {\n//   seriesCode: \"SI_POV_DAY1\",\n//   description: \"Proportion of population below international poverty line (%)\",\n//   goal: \"1\",\n//   country: \"Nigeria (566)\",\n//   points: [ { year:2010, value:38.5 }, … { year:2020, value:30.9 } ],\n//   source: \"mock\", retrievedAt: \"2026-07-18T…Z\"\n// }\n\n// → get_sdg_indicator({ \"series\": \"SH_DYN_MORT\", \"start_year\": 2010, \"end_year\": 2020 })\n// raw series code + year window\n```\n\n> The `points` values above are the deterministic **mock** figures (the offline default). Set `SDG_PROVIDER=unsdg` for live UN numbers; the shape is identical.\n\n## Configuration — `SDG_PROVIDER`\n\n| Value | Behaviour |\n|---|---|\n| `mock` *(default)* | Offline deterministic fixtures (poverty + electricity access) — for dev/eval, zero network |\n| `unsdg` | **Live** UN SDG Global Database API (keyless). Set this for real data. |\n\nNo API key required.\n\n## Run it\n\n```bash\nnpm install && npm run build      # from repo root\n\nnpm run smoke      -w @braynexservices/nigeria-mcp-un-sdg   # offline (mock)\nnpm run smoke:live -w @braynexservices/nigeria-mcp-un-sdg   # live (real UN API)\n\nSDG_PROVIDER=unsdg npm run start:stdio -w @braynexservices/nigeria-mcp-un-sdg   # serve over stdio, live\n```\n\n**MCP Inspector** (interactive GUI):\n```bash\nSDG_PROVIDER=unsdg npx @modelcontextprotocol/inspector node lanes/un-sdg/dist/stdio.js\n```\n\n**Claude Desktop / Code** — add to your MCP config (needs Node.js ≥ 20):\n```json\n{\n  \"mcpServers\": {\n    \"nigeria-un-sdg\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@braynexservices/nigeria-mcp-un-sdg\"],\n      \"env\": { \"SDG_PROVIDER\": \"unsdg\" }\n    }\n  }\n}\n```\nRunning from a clone instead: `\"command\": \"node\", \"args\": [\"/path/to/nigeria-mcp/lanes/un-sdg/dist/stdio.js\"]`. Then ask, e.g., *\"What's Nigeria's extreme poverty rate over time?\"*\n\n## Limits & notes\n- **National headline only.** A UN SDG series reports many rows per year, split across sex / location / age / wealth / education dimensions. This adapter returns the **national (all-Nigeria) headline value** for each year — it selects the total/aggregate row across those dimensions. For series reported *by* education level (primary-school completion), it selects the **primary-education** row, since that level *is* the indicator rather than a total. Constant dimensions that never vary (e.g. under-5 mortality's `Age = <5Y`) are treated as part of the indicator, not a disaggregation.\n- **No disaggregated stand-ins.** It pages through the full result set (`totalElements`), so dense series are never truncated to the first page. If **no unambiguous national row** exists for a series, it **errors** rather than return a disaggregated (e.g. single-sex) figure.\n- **Nigeria-only:** every request is scoped to M49 area **566**. `country` is always `\"Nigeria (566)\"`.\n- **Missing years:** a year present in the source but without a numeric national value is returned with `value: null` (present but unresolved), not dropped silently.\n- **Source:** live records carry `source: \"unsdg\"` and a fresh `retrievedAt` per call; the offline default carries `source: \"mock\"`.\n\n## Verification\n`npm run verify` (repo root) → build + all lane smokes + eval. This lane: offline smoke + `smoke:live` against the real UN SDG API, plus independent code-review (all five aliased series verified live against area 566, national-row selection confirmed against known disaggregated series).\n</content>\n</invoke>\n","readmeFilename":"README.md"}