
Nigeria Postcode
io.github.Adeniyikayodeev0.2.3更新於 Oct 3, 2026
Validate, look up and resolve addresses to Nigeria's NIPOST digital postcodes (NDAPS).
概覽
讓助理驗證、查詢、自動補齊與定位奈及利亞 NIPOST 數位郵遞區號,並把描述性地址解析成郵遞區號。
- 功能
- 透過 postcode.gov.ng API 包裝奈及利亞國家數位英數郵遞區號系統(NDAPS)。工具包含 validate_postcode(離線檢查結構,回傳標準格式並提示形近字元的修正)、lookup_postcode(確認編碼已指派,第 2 級回傳地址、第 3 級回傳建築用途)、autocomplete_postcode、find_postcode_at_location,以及 resolve_address,會把描述性地址或位置座標解析成郵遞區號,精確度不超過證據所能支持的程度。所有工具皆為唯讀。
- 適用情境
- 適合助理需要核對或補齊奈及利亞郵遞區號、依座標查找郵遞區號,或把描述模糊的奈及利亞地址轉成郵遞區號的情境。若你經常處理奈及利亞地址,並希望透過官方 API 查詢而非憑空猜測,值得加入。
- 執行需求
- 透過 uvx 以 stdio 在本機執行,需要安裝 uv。需在 NG_POSTCODE_API_KEY 設定來自 NIPOST 開發者後台的 API 金鑰(validate_postcode 可不填)。resolve_address 處理文字時需要 NG_GEOCODER_URL,使用公開 Nominatim 時還需 NG_GEOCODER_CONTACT。NG_POSTCODE_MAX_LEVEL 預設為 1;NG_POSTCODE_BASE_URL 可指向其他主機。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Nigeria Postcode,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
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, and resolve described addresses to postcodes.
Built on the ng-postcode and ng-address-resolver libraries.
Tools
All tools are read-only. Errors come back as messages the model can act on, such as a missing key or an exhausted credit balance.
How resolve_address answers
The assistant reads the address and passes its landmarks and map searches to the tool; the server makes no model calls of its own. The answer is never more precise than its evidence:
Text alone rarely identifies a building, so ask users for a location pin when the exact building matters. This tool is pre-release: it works against the live API, but its accuracy on real addresses is unmeasured.
Install
Works with any MCP client. The server runs over stdio:
It needs uv installed. Get an API key from the NIPOST developer dashboard.
Most clients take this entry in their MCP settings:
Configuration
The public Nominatim at https://nominatim.openstreetmap.org allows light personal use only; a service whose main job is geocoding must run its own instance. Map data © OpenStreetMap contributors.
Safety
- Lookups default to level 1, which is free. A model cannot spend credits unless you raise
NG_POSTCODE_MAX_LEVEL. - 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.
- Levels 2 and up return house addresses. Treat them as personal data under the Nigeria Data Protection Act.
resolve_addresssends the search strings to the geocoder you configure. With a third-party geocoder, that shares address text with it.
License
MIT
來源:mcp/README.md,提交 900bf78
工具
0版本歷史
1- v0.2.3最新Oct 3, 2026

