# ng-postcode MCP server

> Validates, looks up, and resolves Nigerian postcodes using the NIPOST digital postcode system.

- Repository: https://github.com/Adeniyikayodee/ng-postcode
- Page: https://hostedmcp.org/servers/adeniyikayodee/ng-postcode
- Transport: stdio
- Stars: 7
- License: MIT

## Install

### Claude Code

```sh
claude mcp add ng-postcode -- npx -y ng-postcode-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "ng-postcode": {
      "command": "npx",
      "args": [
        "-y",
        "ng-postcode-mcp"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "ng-postcode": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "ng-postcode-mcp"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"ng-postcode","type":"stdio","command":"npx","args":["-y","ng-postcode-mcp"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "ng-postcode": {
      "command": "npx",
      "args": [
        "-y",
        "ng-postcode-mcp"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add ng-postcode -- npx -y ng-postcode-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.ng-postcode]
command = "npx"
args = ["-y", "ng-postcode-mcp"]
```

### Gemini CLI

```sh
gemini mcp add -s user ng-postcode npx -- -y ng-postcode-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "ng-postcode": {
      "command": "npx",
      "args": [
        "-y",
        "ng-postcode-mcp"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `NG_POSTCODE_API_KEY` | no | no |  |

## FAQ

### Does validation require an API key?

No, parsing and validation are performed offline and do not require a key.

### What is the format of a Nigerian postcode?

A postcode consists of 11 characters in five segments: state, LGA, district, area, and building unit (e.g., EK-01-A03-FK-01).

### How can I use this with an AI assistant?

You can run the MCP server using `uvx ng-postcode-mcp` or `npx ng-postcode-mcp` and configure it in your MCP settings.
