Skip to main content

ng-postcode-mcp

MCP server for Nigeria's National Digital Alphanumeric Postcode System (NDAPS), the building-level postcode NIPOST launched in October 2026. It lets AI assistants validate postcodes offline and look them up, autocomplete them and find them by location through the postcode.gov.ng API.

Built on the ng-postcode library.

Tools

Tool What it does Needs a key Cost
validate_postcode Checks structure offline; returns canonical forms, segments and a suggested fix for look-alike characters No Free
lookup_postcode Confirms a code is assigned; level 2 adds the address, level 3 building use Yes Level 1 free, 2+ uses credits
autocomplete_postcode Suggests the next segment of a partly typed code Yes Free tier
find_postcode_at_location Returns the postcode of the nearest building to a coordinate Yes Free tier

All tools are read-only. Errors come back as messages the model can act on, such as a missing key or an exhausted credit balance.

Install

Requires uv. Get an API key from the NIPOST developer dashboard; validate_postcode works without one.

Claude Code

claude mcp add ng-postcode -e NG_POSTCODE_API_KEY=nipost_live_... -- uvx ng-postcode-mcp

Claude Desktop, Cursor and other clients that use an mcpServers config:

{
  "mcpServers": {
    "ng-postcode": {
      "command": "uvx",
      "args": ["ng-postcode-mcp"],
      "env": { "NG_POSTCODE_API_KEY": "nipost_live_..." }
    }
  }
}

Configuration

Variable Default Purpose
NG_POSTCODE_API_KEY none NIPOST API key. Read from the environment only; never passed through tools.
NG_POSTCODE_MAX_LEVEL 1 Highest lookup level tools may request. Levels 2+ consume credits, so raise it deliberately.
NG_POSTCODE_BASE_URL https://api.postcode.gov.ng Alternative API host, such as a staging stack.

Safety

  • Lookups default to level 1, which is free. A model cannot spend credits unless you raise NG_POSTCODE_MAX_LEVEL.
  • A mistyped code is never corrected and sent to the API silently. The server returns the suggestion and asks the model to confirm it with the user.
  • Levels 2 and up return house addresses. Treat them as personal data under the Nigeria Data Protection Act.

License

MIT

Metadata

Release files for ng-postcode-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ng-postcode-mcp 0.1.0
File Size Uploaded
ng_postcode_mcp-0.1.0.tar.gz 10.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ng-postcode-mcp 0.1.0
File Interpreter ABI Platform
ng_postcode_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.8 kB

Release files / ng_postcode_mcp-0.1.0.tar.gz

Download URL ng_postcode_mcp-0.1.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fdc0e831a07c169244639af157717022e9311d9f9e1d6ee123bdf15493ff6ee1
BLAKE2b-256 checksum
How to use checksums
ade64d84f0223a341fb2070c17b6447569ff18e790c6c1ac0a785a45bc497b13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release files / ng_postcode_mcp-0.1.0-py3-none-any.whl

Download URL ng_postcode_mcp-0.1.0-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f56c86582a98a4102329d988d9e69e3324b1406d5443d9b0a1a954bdf708b88
BLAKE2b-256 checksum
How to use checksums
590f0ffc03d3a69b50f5c21daf994658e36e019e98ee84848f5225143628a22d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page