Nigeria Postcode

v0.6.3
io.github.Adeniyikayodee/ng-postcode Checked 2 days ago Published 1 month ago

Validate, look up and resolve addresses to Nigeria's NIPOST digital postcodes (NDAPS).

Values you need

VariableWhat it is
NG_POSTCODE_API_KEYoptional secret NIPOST Postcode API key from dashboard.postcode.gov.ng. Validation works without it.
NG_POSTCODE_MAX_LEVELoptional Highest lookup level tools may request. Levels 2 and up consume NIPOST credits. Default: 1
NG_POSTCODE_MAX_PAID_CALLSoptional How many paid lookups one run of the server may make with its own key. Default: 25
NG_POSTCODE_BASE_URLoptional Alternative API host, such as a staging stack. Default: https://api.postcode.gov.ng
NG_GEOCODER_URLoptional Nominatim server used by resolve_address to place described addresses. Ideally your own instance.
NG_GEOCODER_CONTACToptional URL or email identifying you to the geocoder. Required for the public Nominatim.
NG_POSTCODE_TRANSPORToptional stdio (default), or http to serve streamable HTTP at /mcp on NG_POSTCODE_HOST and NG_POSTCODE_PORT. Default: stdio
NG_POSTCODE_HOSToptional Address the HTTP transport listens on. Default: 127.0.0.1
NG_POSTCODE_PORToptional Port the HTTP transport listens on. Default: 8000
NG_POSTCODE_ALLOW_SHARED_KEYoptional Set to 1 to let the HTTP transport start with a server key on a public address.
NG_POSTCODE_ALLOWED_HOSTSoptional Host names the HTTP transport answers to, separated by commas. Required with a server key on a public address.

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add ng-postcode -- npx -y ng-postcode-mcp@0.4.2
Add to claude_desktop_config.json
{
  "mcpServers": {
    "ng-postcode": {
      "args": [
        "-y",
        "ng-postcode-mcp@0.4.2"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "ng-postcode": {
      "args": [
        "-y",
        "ng-postcode-mcp@0.4.2"
      ],
      "command": "npx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "ng-postcode": {
      "args": [
        "-y",
        "ng-postcode-mcp@0.4.2"
      ],
      "command": "npx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.ng-postcode]
command = "npx"
args = ["-y", "ng-postcode-mcp@0.4.2"]

PyPI (uvx)

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add ng-postcode -- uvx ng-postcode-mcp==0.6.3
Add to claude_desktop_config.json
{
  "mcpServers": {
    "ng-postcode": {
      "args": [
        "ng-postcode-mcp==0.6.3"
      ],
      "command": "uvx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "ng-postcode": {
      "args": [
        "ng-postcode-mcp==0.6.3"
      ],
      "command": "uvx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "ng-postcode": {
      "args": [
        "ng-postcode-mcp==0.6.3"
      ],
      "command": "uvx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.ng-postcode]
command = "uvx"
args = ["ng-postcode-mcp==0.6.3"]

For AI agents

  1. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: validate_postcode, lookup_postcode, autocomplete_postcode, find_postcode_at_location.
  4. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json