New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

ng-postcode-mcp

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-postcode-mcp

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

latest
Source
npmnpm
Version
0.4.3
Version published
Maintainers
1
Created
Source

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

ToolWhat it doesNeeds a keyCost
validate_postcodeChecks structure offline; returns canonical forms, segments and a suggested fix for look-alike charactersNoFree
lookup_postcodeConfirms a code is assigned to a buildingYesFree
lookup_postcode_detailsAdds the address (level 2), building use (level 3) and more. Offered only when NG_POSTCODE_MAX_LEVEL is 2 or moreYesUses credits on every call
autocomplete_postcodeSuggests the next segment of a partly typed codeYesFree tier
find_postcode_at_locationReturns the postcode of the nearest building to a coordinateYesFree tier

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

Configuration

VariableDefaultPurpose
NG_POSTCODE_API_KEYnoneNIPOST API key. Read from the environment only; never passed through tools.
NG_POSTCODE_MAX_LEVEL1Highest lookup level tools may request. Levels 2+ consume credits, so raise it deliberately.
NG_POSTCODE_MAX_PAID_CALLS25How many paid lookups one run of the server may make with its own key.
NG_POSTCODE_BASE_URLhttps://api.postcode.gov.ngAlternative 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

Keywords

mcp

FAQs

Package last updated on 16 Oct 2026

Related posts