{"_id":"@braynexservices/nigeria-mcp-grid3-boundaries","_rev":"2-b13467832173cb0ddf49a77d0e21583c","name":"@braynexservices/nigeria-mcp-grid3-boundaries","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@braynexservices/nigeria-mcp-grid3-boundaries","version":"0.1.0","keywords":["mcp","model-context-protocol","nigeria","boundaries","gis","grid3","admin-boundaries","geocoding","lga"],"author":{"url":"Braynex Services Ltd — https://www.braynexservices.com","name":"Samuel Orie","email":"braynexservices@gmail.com"},"license":"MIT","_id":"@braynexservices/nigeria-mcp-grid3-boundaries@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-grid3-boundaries":"dist/stdio.js"},"dist":{"shasum":"6fadc24b886a1db5c66850061639f099439d1f59","tarball":"https://registry.npmjs.org/@braynexservices/nigeria-mcp-grid3-boundaries/-/nigeria-mcp-grid3-boundaries-0.1.0.tgz","fileCount":28,"integrity":"sha512-vdQTOeZYpUfsbXStfG4nPiw6zMNlI1BF7ZSb8PvPY4VEfimvCqRPW7xFqVLJVPR53GPzq+cPeLbdLOzPIgDxOw==","signatures":[{"sig":"MEUCIB3GC2Ac1L/NzBCFOokhbg90hyM/3GiL5Ssze0aJgGCBAiEA2UjwL5JVq8FYx5SOC+aAyvfSZaUVkzBI1IspBCwSZVA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37955},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"gitHead":"4ad54144b4f3200028104555dab2c8a7f225b500","mcpName":"io.github.Braynexservices/nigeria-grid3-boundaries","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/grid3-boundaries"},"_npmVersion":"11.6.1","description":"Nigeria administrative boundaries (state / LGA / ward) as MCP tools — centroid, bounding box, and reverse-geocoding a WGS84 point to its admin areas. Backed by GRID3 (CC BY 4.0), keyless.","directories":{},"displayName":"Nigeria GRID3 Boundaries 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-grid3-boundaries_0.1.0_1784437905106_0.8541450889445825","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@braynexservices/nigeria-mcp-grid3-boundaries","displayName":"Nigeria GRID3 Boundaries MCP","version":"0.1.1","description":"Nigeria administrative boundaries (state / LGA / ward) as MCP tools — centroid, bounding box, and reverse-geocoding a WGS84 point to its admin areas. Backed by GRID3 (CC BY 4.0), keyless.","homepage":"https://www.braynexservices.com","repository":{"type":"git","url":"git+https://github.com/braynexservices/nigeria-mcp.git","directory":"lanes/grid3-boundaries"},"bugs":{"url":"https://github.com/braynexservices/nigeria-mcp/issues"},"keywords":["mcp","model-context-protocol","nigeria","boundaries","gis","grid3","admin-boundaries","geocoding","lga"],"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-grid3-boundaries":"dist/stdio.js"},"mcpName":"io.github.Braynexservices/nigeria-grid3-boundaries","gitHead":"12f98a817128c5777f41df48ac2efe3b3381f4fa","_id":"@braynexservices/nigeria-mcp-grid3-boundaries@0.1.1","_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-/0ZlnL/R6vkW9TfAa3Ia5sBynRKRVYdxQv5q2fEw55MzEBpe1DwGoznM4P5vn/HM7YWn1WhR1YwAh2wxb3i2LQ==","shasum":"3da09527817307ff1ee8cf70136bad27fb5bd910","tarball":"https://registry.npmjs.org/@braynexservices/nigeria-mcp-grid3-boundaries/-/nigeria-mcp-grid3-boundaries-0.1.1.tgz","fileCount":28,"unpackedSize":37996,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAPq2ZiEjWlagltiTlT13UjFYeI9eKZ+HHEsV7Z+QTMuAiEAv6E6qYxPJ9KZCVdaFAwm0YThTKhck69yIFBfK0UjnnY="}]},"_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-grid3-boundaries_0.1.1_1784464117358_0.6111625559174862"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-19T05:11:44.868Z","modified":"2026-07-19T12:28:37.685Z","0.1.0":"2026-07-19T05:11:45.269Z","0.1.1":"2026-07-19T12:28:37.510Z"},"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","boundaries","gis","grid3","admin-boundaries","geocoding","lga"],"repository":{"type":"git","url":"git+https://github.com/braynexservices/nigeria-mcp.git","directory":"lanes/grid3-boundaries"},"description":"Nigeria administrative boundaries (state / LGA / ward) as MCP tools — centroid, bounding box, and reverse-geocoding a WGS84 point to its admin areas. Backed by GRID3 (CC BY 4.0), keyless.","maintainers":[{"name":"braynexservices","email":"braynexservices@gmail.com"}],"readme":"# Nigeria GRID3 Boundaries MCP\n\n> Nigerian administrative boundaries (state / LGA / ward) and point reverse-geocoding, exposed to AI agents as MCP tools.\n\n**Status:** 🌐 **LIVE + free (no API key)**\n**Package:** `@braynexservices/nigeria-mcp-grid3-boundaries` 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\nAnswers two questions about Nigerian administrative geography as MCP tools: *where is a named boundary* and *which admin areas contain this point*. Coverage is the three official levels — **state (ADM1), LGA (ADM2), ward (ADM3)**. Data comes from **GRID3** (CIESIN, Columbia University + WorldPop + Nigerian government partners) public **ArcGIS feature services** — CC BY 4.0, keyless. Public geodata — no PII, no key.\n\n## Tools\n\n### `get_boundary`\nLook up a Nigerian administrative boundary by name. Returns the **centroid + bounding box + attribution — not the full polygon**.\n\n| Param | Required | Notes |\n|---|---|---|\n| `level` | ✓ | administrative level: `state`, `lga` or `ward` |\n| `name` | ✓ | boundary name, e.g. `Lagos` or `Eti-Osa` (2–120 chars) |\n\n**Example:**\n```jsonc\n// → get_boundary({ \"level\": \"state\", \"name\": \"Lagos\" })\n\"Lagos (state) — centroid 6.5341, 3.5337\"\n// structuredContent: {\n//   name: \"Lagos\", level: \"state\",\n//   centroid: { lat: 6.5341, lng: 3.5337 },\n//   bbox: [2.6988, 6.3678, 4.3686, 6.7004],   // [minLng, minLat, maxLng, maxLat] (WGS84)\n//   attribution: \"GRID3, CC BY 4.0\",\n//   source: \"grid3\", retrievedAt\n// }\n```\n\n### `point_in_admin`\nReverse-geocode a WGS84 point to the state, LGA and (where mapped) ward that contain it — the primitive other lookups compose on.\n\n| Param | Required | Notes |\n|---|---|---|\n| `lat` | ✓ | latitude (WGS84); Nigeria spans ~4–14 °N |\n| `lng` | ✓ | longitude (WGS84); Nigeria spans ~2–15 °E |\n\n**Example:**\n```jsonc\n// → point_in_admin({ \"lat\": 6.43, \"lng\": 3.42 })\n\"(6.43, 3.42) → Lagos state, Eti Osa LGA, Victoria Island ward\"\n// structuredContent: { state:\"Lagos\", lga:\"Eti Osa\", ward:\"Victoria Island\", source:\"grid3\", retrievedAt }\n```\n\n> **`get_boundary`** returns the centroid, bounding box and attribution — never the full polygon (polygons are too large for tool output). **`point_in_admin`** returns only the containing state / LGA / ward (no geometry); `ward` is `null` where a point falls outside GRID3 ward coverage, and `state` + `lga` are still returned.\n\n## Configuration — `BOUNDARY_PROVIDER`\n\n| Value | Behaviour |\n|---|---|\n| `mock` *(default)* | Offline deterministic fixtures (state / LGA / ward + point lookups) — for dev/eval |\n| `grid3` | **Live** queries against GRID3's public ArcGIS feature services (keyless). Set this for real data. |\n\nNo API key required. Service layer URLs are env-overridable for newer GRID3 releases: **`GRID3_STATE_URL` / `GRID3_LGA_URL` / `GRID3_WARD_URL`** (layer URL, no trailing `/query`).\n\n## Run it\n\n```bash\nnpm install && npm run build      # from repo root\n\nnpm run smoke      -w @braynexservices/nigeria-mcp-grid3-boundaries   # offline (mock)\nnpm run smoke:live -w @braynexservices/nigeria-mcp-grid3-boundaries   # live (real GRID3 services)\n\nBOUNDARY_PROVIDER=grid3 npm run start:stdio -w @braynexservices/nigeria-mcp-grid3-boundaries   # serve over stdio, live\n```\n\n**MCP Inspector** (interactive GUI):\n```bash\nBOUNDARY_PROVIDER=grid3 npx @modelcontextprotocol/inspector node lanes/grid3-boundaries/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-grid3-boundaries\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@braynexservices/nigeria-mcp-grid3-boundaries\"],\n      \"env\": { \"BOUNDARY_PROVIDER\": \"grid3\" }\n    }\n  }\n}\n```\nRunning from a clone instead: `\"command\": \"node\", \"args\": [\"/path/to/nigeria-mcp/lanes/grid3-boundaries/dist/stdio.js\"]`. Then ask, e.g., *\"Which LGA and ward is 6.43, 3.42 in?\"* or *\"What's the bounding box of Lagos State?\"*\n\n## Limits & notes\n- **Centroid + bbox, not the polygon.** `get_boundary` returns the boundary's centre point and bounding box — the full polygon geometry is never pulled (too large for tool output).\n- **Repeated names resolve to one feature.** Nigerian LGA/ward names recur across states (e.g. \"Surulere\" in Lagos and Oyo); when a name matches more than one boundary, the tool resolves to **one specific matching feature** and scopes the extent to that feature (not a nationwide union of every same-named boundary).\n- **Name spelling.** GRID3 spells some names without hyphens (e.g. `Eti Osa`); lookups automatically retry hyphen/space variants. Match official Nigerian admin names for best results.\n- **Point outside Nigeria** (roughly lat 4–14, lng 2–15) returns an actionable not-found rather than a guess.\n- **Resilience.** Fetch timeout with backoff-retry on transient failures; on a hard failure it returns an actionable error (override `GRID3_*_URL` if a service layer moved, or set `BOUNDARY_PROVIDER=mock`).\n- **Source:** results carry `source: \"grid3\"` and a fresh `retrievedAt` per call.\n\n## Verification\n`npm run verify` (repo root) → build + all lane smokes + eval. This lane: offline smoke + `smoke:live` against the live GRID3 services (state / LGA / ward lookups + point-in-admin verified), independent code-review.\n","readmeFilename":"README.md"}