NIPOST 디지털 우편번호 시스템을 사용하여 나이지리아 우편번호를 검증, 조회 및 해결합니다.
다른 이름 Adeniyikayodee/ng-postcode, ng-postcode-mcp
- 스타
- 7
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 11월 7일
- 라이선스
- MIT
ng-postcode MCP란?
ng-postcode은(는) MCP server입니다. NIPOST 디지털 우편번호 시스템을 사용하여 나이지리아 우편번호를 검증, 조회 및 해결합니다.
프로젝트 README에서 생성된 요약
ng-postcode MCP server 정보
나이지리아 위치 데이터를 다루는 개발자는 이 server를 사용하여 국가 디지털 알파뉴메릭 우편번호 시스템의 우편번호를 검증, 조회 및 해결할 수 있습니다. 이 server는 NIPOST에서 도입한 주, LGA, 구역, 지역, 건물 단위를 포함하는 11자리 건물 단위 코드를 처리하도록 설계되었습니다. uvx 또는 npx를 통해 로컬에서 실행할 수 있어 Claude 또는 Cursor와 같은 다양한 AI 클라이언트와 호환됩니다.
기본적인 검증 및 파싱은 별도의 인증 없이 오프라인으로 작동하지만, 자동 완성, 위치 기반 우편번호 찾기, 주소 해결과 같은 고급 기능을 사용하려면 NIPOST 개발자 대시보드에서 발급받은 API 키가 필요합니다. Python 기반 버전은 주소 해결을 포함한 전체 도구 모음을 제공하며, Node 버전은 해당 resolver를 제외한 모든 도구를 제공합니다. 이를 통해 AI 기반 워크플로 내에서 표준, 공백 포함 또는 압축된 우편번호 형식을 정밀하게 처리할 수 있습니다.
활용 사례
- 1주소를 우편번호로 변환위치에 대한 자유 형식의 설명을 특정 우편번호로 변환합니다.
- 2위치별 우편번호 찾기특정 지리적 위치를 기반으로 정확한 우편번호를 검색합니다.
- 3우편번호 입력 자동 완성사용자나 agent가 우편번호를 입력할 때 제안 기능을 제공합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
ng-postcode MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 ng-postcode MCP 설치
$ claude mcp add ng-postcode -- npx -y ng-postcode-mcpCursor에 ng-postcode MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"ng-postcode": {
"command": "npx",
"args": [
"-y",
"ng-postcode-mcp"
]
}
}
}VS Code에 ng-postcode MCP 설치
.vscode/mcp.json
{
"servers": {
"ng-postcode": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"ng-postcode-mcp"
]
}
}
}VS Code CLI에 ng-postcode MCP 설치
$ code --add-mcp '{"name":"ng-postcode","type":"stdio","command":"npx","args":["-y","ng-postcode-mcp"]}'Claude Desktop에 ng-postcode MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"ng-postcode": {
"command": "npx",
"args": [
"-y",
"ng-postcode-mcp"
]
}
}
}Codex에 ng-postcode MCP 설치
$ codex mcp add ng-postcode -- npx -y ng-postcode-mcpCodex config.toml에 ng-postcode MCP 설치
~/.codex/config.toml
[mcp_servers.ng-postcode] command = "npx" args = ["-y", "ng-postcode-mcp"]
Gemini CLI에 ng-postcode MCP 설치
$ gemini mcp add -s user ng-postcode npx -- -y ng-postcode-mcpGemini settings.json에 ng-postcode MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"ng-postcode": {
"command": "npx",
"args": [
"-y",
"ng-postcode-mcp"
]
}
}
}구성
NG_POSTCODE_API_KEY
| 이름 | 설명 | 유형 |
|---|---|---|
| NG_POSTCODE_API_KEY | — |
자동 검사
2026년 11월 13일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능adeniyikayodee/ng-postcode is public and reachablegithub.com/adeniyikayodee/ng-postcode ↗통과
- 패키지가 이 저장소를 소스로 명시ng-postcode-mcp names adeniyikayodee/ng-postcode as sourcenpmjs.com/package/ng-postcode-mcp ↗통과
- 빌드 출처(Sigstore 증명)Sigstore attestation for ng-postcode-mcpnpmjs.com/package/ng-postcode-mcp/v/0.4.3#provenance ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-11-07github.com/adeniyikayodee/ng-postcode ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from ng-postcode-mcp통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기ng-postcode
Developer tools for Nigeria's National Digital Alphanumeric Postcode System (NDAPS), the building-level postcode NIPOST launched in October 2026: libraries for Rust and Python (ng-postcode), JavaScript (ng-postcode-js on npm), and Java (ng-postcode-api), MCP servers for AI assistants on PyPI and npm, and a resolver that turns described addresses into postcodes.
A postcode has 11 characters in five segments, written EK-01-A03-FK-01: state, LGA, district, area and building unit. NIPOST's own example, FC 02 A09 DB 09, is the same shape with spaces.
Packages
| Package | What it does | Install | Source |
|---|---|---|---|
ng-postcode (Rust) |
Parse, validate and format codes offline; client for the postcode.gov.ng API | cargo add ng-postcode |
src/, docs |
ng-postcode (Python) |
The same behaviour, with sync and async clients | pip install ng-postcode |
python/ |
ng-postcode-js |
The same behaviour for JavaScript and TypeScript, with a fetch client |
npm install ng-postcode-js |
js/packages/ng-postcode-js |
ng-postcode and ng-postcode-api (Java) |
The same behaviour for Java 17 and later; the core has no dependencies | io.github.adeniyikayodee:ng-postcode-api |
java/ |
ng-postcode-mcp |
MCP server: validate, look up, autocomplete, find by location, resolve addresses | uvx ng-postcode-mcp |
mcp/ |
ng-postcode-mcp (npm) |
The same server for Node, without address resolution | npx ng-postcode-mcp |
js/packages/ng-postcode-mcp |
ng-postcode-polars |
Polars expressions that parse, format and group codes by place, compiled from the Rust core | pip install ng-postcode-polars |
native/polars |
ng_postcode (PostgreSQL) |
The postcode as native 8-byte types with index support, compiled from the Rust core | Package from Releases, then CREATE EXTENSION ng_postcode |
native/pg |
ng_postcode (DuckDB) |
The same functions as a DuckDB extension, compiled from the Rust core | INSTALL ng_postcode FROM community (DuckDB 1.5.6) |
ng-postcode-duckdb |
ng-address-resolver |
Resolve free-text addresses to postcodes, only as precisely as the evidence allows (pre-alpha) | pip install ng-address-resolver |
agent/ |
Each package has its own README with full usage.
For databases, sql/ holds the postcode as a PostgreSQL domain and as DuckDB macros, in plain SQL that runs the same shared cases.
Two names are easy to get wrong. On npm the library is ng-postcode-js, because ng-postcode there is another project. ng-address-resolver is imported as ng_address.
For online stores, ng-postcode-woocommerce is a WooCommerce plugin built on the same rules and the same shared test cases: it checks and tidies the postcode at checkout, finds it from the customer's location, and makes shipping zones match on postcode prefixes.
For React and Next.js, templates/nigerian-address-form is a checkout address form built with shadcn/ui and ng-postcode-js. Add it with npx shadcn@latest add https://adeniyikayodee.github.io/ng-postcode/r/nigerian-address-form.json, or deploy the folder as an app.
Quick start
Parsing and validation are offline and need no key.
Python
from ng_postcode import Postcode, parse
match parse("ek 01 a03 fk 01"):
case Postcode() as code:
print(code, code.compact) # EK-01-A03-FK-01 EK01A03FK01
case error:
print(error) # e.g. "invalid lga segment"
JavaScript and TypeScript
import { Postcode, parse } from "ng-postcode-js";
const code = parse("ek 01 a03 fk 01");
if (code instanceof Postcode) {
console.log(String(code), code.compact); // EK-01-A03-FK-01 EK01A03FK01
} else {
console.log(String(code)); // e.g. "invalid lga segment"
}
Java
import io.github.adeniyikayodee.ngpostcode.Postcode;
if (Postcode.parse("ek 01 a03 fk 01") instanceof Postcode code) {
System.out.println(code + " " + code.compact()); // EK-01-A03-FK-01 EK01A03FK01
}
Rust
use ng_postcode::{Postcode, Segment};
let code: Postcode = "ek 01 a03 fk 01".parse()?;
assert_eq!(code.to_string(), "EK-01-A03-FK-01");
assert_eq!(code.prefix(Segment::Area), "EK-01-A03-FK");
AI assistants
The MCP server works with any MCP client. It runs over stdio as uvx ng-postcode-mcp, with the API key in the environment. Most clients take this entry in their MCP settings:
{
"mcpServers": {
"ng-postcode": {
"command": "uvx",
"args": ["ng-postcode-mcp"],
"env": { "NG_POSTCODE_API_KEY": "nipost_live_..." }
}
}
}
To run it with Node, use "command": "npx" and "args": ["-y", "ng-postcode-mcp"]; that edition has every tool except address resolution. Per-client steps for Cursor, VS Code, Codex, Claude and others are in the MCP server README. Validation works without a key; the other tools need one from the NIPOST developer dashboard. The server is listed in the MCP Registry as io.github.Adeniyikayodee/ng-postcode.
PostgreSQL
Load the plain SQL file with psql -f sql/postgres.sql. It needs no extension, so it runs on managed services.
CREATE TABLE customers (
id bigint PRIMARY KEY,
postcode ng_postcode -- refuses anything that is not a compact code
);
INSERT INTO customers VALUES (1, ng_postcode_parse('ek 01 a03 fk 01'));
SELECT ng_postcode_format(ng_postcode_truncate(postcode, 'district')) AS district, count(*)
FROM customers
GROUP BY 1;
-- EK-01-A03 | 1
On a server where you can install an extension, the native extension has the same functions and stores a code in 8 bytes. Unpack the package for your PostgreSQL version from Releases, then run CREATE EXTENSION ng_postcode.
DuckDB
Load the same functions with duckdb my.db < sql/duckdb.sql.
SELECT ng_postcode_parse('ek 01 a03 fk 01');
-- EK01A03FK01
The compiled extension, ng-postcode-duckdb, has the same functions: on DuckDB 1.5.6, run INSTALL ng_postcode FROM community, then LOAD ng_postcode.
Polars
import polars as pl
import ng_postcode_polars # pip install ng-postcode-polars
frame = pl.DataFrame({"postcode": ["ek 01 a03 fk 01", "EK-01-A03-ZZ-14", "100001"]})
print(frame.with_columns(code=pl.col("postcode").ng.parse(), ok=pl.col("postcode").ng.is_valid()))
# ek 01 a03 fk 01 EK01A03FK01 true
# EK-01-A03-ZZ-14 EK01A03ZZ14 true
# 100001 null false
A CSV file
pip install ng-postcode
ng-postcode --column postcode customers.csv --out checked.csv
The output keeps every row and adds the compact code, a status of valid, suggested, invalid, or empty, a suggested correction, and the reason for each invalid row.
For coding agents
Language models trained before October 2026 expect a six-digit Nigerian postcode. To point a coding agent at the current format, paste this into your project's AGENTS.md, CLAUDE.md, or editor rules:
Nigerian postcodes: since 1 October 2026 a building's postcode is NIPOST's 11-character
digital postcode (NDAPS), such as EK-01-A03-FK-01, and a six-digit pattern does not match it.
Validate and format it with ng-postcode (pip, cargo), ng-postcode-js (npm), or
io.github.adeniyikayodee:ng-postcode (Maven). On npm, ng-postcode is a different project.
Reference: https://adeniyikayodee.github.io/ng-postcode/llms.txt
The format
| Segment | Example | Shape |
|---|---|---|
| State | EK |
2 letters |
| LGA | 01 |
2 digits, 01 to 99 |
| District | A03 |
3 letters or digits |
| Area | FK |
2 letters |
| Building unit | 01 |
2 digits, 01 to 99 |
| Form | Example | Use it to |
|---|---|---|
| Canonical | EK-01-A03-FK-01 |
Write a code and pass it between systems |
| Spaced | EK 01 A03 FK 01 |
Show a code to people |
| Compact | EK01A03FK01 |
Store and compare codes |
Input may be hyphenated, spaced or compact, in either case. The compact form matches ^[A-Z]{2}(0[1-9]|[1-9][0-9])[A-Z0-9]{3}[A-Z]{2}(0[1-9]|[1-9][0-9])$. A well-formed code is not necessarily assigned to a building; only the NIPOST API can confirm that.
Passing a postcode between systems
docs/schemas/postcode-reference.schema.json defines a small JSON object for handing a location from one system or AI agent to another: the code, its level (state to building), and optionally a confidence and whether NIPOST confirmed it. A resolved or partial resolve_address answer already fits it.
For a whole address, docs/address-record.md wraps the reference in an address record and maps it onto ISO 20022, FHIR, schema.org, vCard, and UPU's address layout for Nigeria.
Design
- One behaviour, four languages: Rust, Python, JavaScript and Java all run the cases in
spec/, so they cannot drift apart. The Node MCP server registers its tools fromspec/mcp.json, which the Python server generates. - Offline first: parsing and validation never touch the network. API access is a separate, optional layer.
- Errors are values: expected failures, such as a malformed code or a rejected API key, come back as return values.
- Careful with money and guesses: the MCP server caps lookups at the free level unless told otherwise, and never corrects a mistyped code into a paid call. The resolver gives an area or district code when that is all the evidence supports.
Status
- The NIPOST API needs a key for every endpoint, from the developer dashboard. Offline validation needs nothing.
- The API layer is tested against responses captured from the live API with a level 1 key, kept in
spec/responses.json. Runscripts/live_check.pywith your own key to repeat the comparison. Lookup levels 2 and up need a higher-access key and are tested only against NIPOST's documented examples. - The resolver and the
resolve_addresstool are pre-release. They work against the live API, but their accuracy on real addresses is unmeasured. Described addresses need a geocoder you run or pay for; text alone rarely identifies a building, so ask users for a location pin when the exact building matters. - Notes for integrators on how the live API behaves, each with the date it was observed, are in
docs/api-differences.md.
Development
See CONTRIBUTING.md for the shared spec, how to add a language, and the commit standards.
cargo test --all-features # Rust
cd python && uv run --group dev pytest # Python library
cd mcp && uv run --group dev pytest # MCP server
cd agent && uv run --group dev pytest # resolver
cd js && npm ci && npm test # JavaScript library and Node MCP server
cd java && ./mvnw verify # Java libraries
CI runs formatting, linting, type checks and tests for every package. Releases publish from tags (v* to crates.io; py-v*, mcp-v* and agent-v* to PyPI and the MCP Registry; js-v* and js-mcp-v* to npm) through trusted publishing, so no tokens are stored. Maven Central has no trusted publishing, so java-v* uses a token and a signing key held as environment secrets, and the upload is published by hand. An mcp-v* release also creates a GitHub release, which Glama rebuilds its listing from, and republishes the Smithery bundle with a key held the same way.
License
MIT
ng-postcode MCP 질문
ng-postcode MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add ng-postcode -- npx -y ng-postcode-mcp를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
ng-postcode MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
검증 시 API 키가 필요한가요?
아니요, 파싱 및 검증은 오프라인으로 수행되므로 키가 필요하지 않습니다.
나이지리아 우편번호의 형식은 무엇인가요?
우편번호는 주(state), LGA, 구역(district), 지역(area), 건물 단위(building unit)의 5개 세그먼트로 구성된 11자리 문자입니다 (예: EK-01-A03-FK-01).
AI 어시스턴트와 어떻게 함께 사용하나요?
uvx ng-postcode-mcp 또는 npx ng-postcode-mcp를 사용하여 MCP server를 실행하고 MCP 설정에 구성하면 됩니다.