
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
