npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ng-postcode-mcp

v0.4.3

Published

MCP server for Nigerian postcodes (postal codes), Nigeria's NIPOST digital postcode (NDAPS): validate, look up, autocomplete and find postcodes by location.

Readme

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, look them up, autocomplete them and find them by location through the postcode.gov.ng API.

This is the Node edition of the ng-postcode server. It registers its tools from the same contract as the Python edition, so names, descriptions and schemas are identical. The Python edition also has resolve_address and an HTTP transport.

To validate postcodes in your own code, use the library, ng-postcode-js.

Install

It runs over stdio with npx and needs Node 22.12 or later. Most clients take this entry in their MCP settings:

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

Get an API key from the NIPOST developer dashboard. Validation works without one.

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 to a building | Yes | Free | | lookup_postcode_details | Adds the address (level 2), building use (level 3) and more. Offered only when NG_POSTCODE_MAX_LEVEL is 2 or more | Yes | Uses credits on every call | | 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 |

Every tool is read-only except lookup_postcode_details, which spends credits. Errors come back as messages the model can act on.

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_MAX_PAID_CALLS | 25 | How many paid lookups one run of the server may make with its own key. | | NG_POSTCODE_BASE_URL | https://api.postcode.gov.ng | Alternative API host, such as a staging stack. Must be https, except on this machine. |

Safety

  • lookup_postcode is always level 1, which is free. The paid tool, lookup_postcode_details, does not exist for the model unless you raise NG_POSTCODE_MAX_LEVEL.
  • The paid tool is not marked read-only or safe to retry, so a client that approves read-only tools on its own will still ask before spending.
  • 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.
  • Names and house addresses are withheld from location results unless the cap is 2 or more. Treat them as personal data under the Nigeria Data Protection Act.
  • The key is never sent to another host: the client refuses redirects.

License

MIT