mstar-addressvalidation-mcp-tool
v0.1.9
Published
A stdio MCP server for validating address existence with Google Address Validation API
Downloads
967
Maintainers
Readme
mstar-addressvalidation-mcp-tool
An MCP server that uses Google Address Validation API to hard-check whether an address passes validation rules.
Install
npm install -g mstar-addressvalidation-mcp-toolRequirements
- Node.js 18+
GOOGMAP_KEYenvironment variable
Start
cd /Users/hlh/Products/mstar-addressvalidation-mcp-tool
export GOOGMAP_KEY="your_google_api_key"
npm startOr run the published CLI directly:
export GOOGMAP_KEY="your_google_api_key"
npx -y mstar-addressvalidation-mcp-tool --stdioOr with npx:
export GOOGMAP_KEY="your_google_api_key"
npx -y mstar-addressvalidation-mcp-tool --stdioLocal Test
cd /Users/hlh/Products/mstar-addressvalidation-mcp-tool
export GOOGMAP_KEY="your_google_api_key"
npm run test:address -- --address="P ROUAIX 2324 B CP.75790 OMEGA PERSEO ESTRELLAS DEL SUR 031C.P.75790 TEHUACAN,PUE." --regionCode=MXIf you omit --address, the script uses the sample Mexico address by default.
MCP Tool
Tool name: validate_address_exists
Description:
- Use Google Address Validation API to hard-check whether the full extracted customer address passes validation.
Input rules:
- Pass only one field:
address. addressmust exactly match the full extracted customer address.- Include all address lines in reading order.
- Do not include the customer name or any non-address content.
- Do not truncate, shorten, normalize, reconstruct, translate, standardize, or replace the address.
Return rules:
- return
trueonly whenverdict.possibleNextActionisACCEPTorVERIFY - and
verdict.validationGranularityisPREMISE,SUB_PREMISE, orROUTE - otherwise return
false
Input:
{
"address": "P ROUAIX 2324 B CP.75790 OMEGA PERSEO ESTRELLAS DEL SUR 031C.P.75790 TEHUACAN,PUE."
}Example MCP Client Config
{
"mcpServers": {
"google-address-validation": {
"command": "npx",
"args": ["-y", "mstar-addressvalidation-mcp-tool", "--stdio"],
"env": {
"GOOGMAP_KEY": "your_google_api_key"
}
}
}
}Notes
- The tool returns a boolean-style
existsresult based on hard validation rules. - The raw Google response is still included for debugging and downstream parsing.
Publish
npm login
npm publish --access public