npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mstar-addressvalidation-mcp-tool

v0.1.33

Published

A stdio MCP server for Google address validation and nearby business lookup

Readme

mstar-addressvalidation-mcp-tool

An MCP server that uses Google Maps Platform APIs to:

  • hard-check whether an address passes validation rules
  • retrieve nearby business information for a single address in one Google Places API call

Install

npm install -g mstar-addressvalidation-mcp-tool

Requirements

  • Node.js 18+
  • GOOGMAP_KEY environment variable

Start

cd /Users/hlh/Products/mstar-addressvalidation-mcp-tool
export GOOGMAP_KEY="your_google_api_key"
npm start

Or run the published CLI directly:

export GOOGMAP_KEY="your_google_api_key"
npx -y mstar-addressvalidation-mcp-tool --stdio

Or with npx:

export GOOGMAP_KEY="your_google_api_key"
npx -y mstar-addressvalidation-mcp-tool --stdio

Local 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=MX

If you omit --address, the script uses the sample Mexico address by default.

Nearby businesses:

cd /Users/hlh/Products/mstar-addressvalidation-mcp-tool
export GOOGMAP_KEY="your_google_api_key"
npm run test:nearby-businesses -- --address="P ROUAIX 2324 B CP.75790 OMEGA PERSEO ESTRELLAS DEL SUR 031C.P.75790 TEHUACAN,PUE."

MCP Tool

Tool name: validate_address_exists

Description:

  • Validate a customer full address string directly with Google Address Validation API.

Input rules:

  • Pass only one field: address.
  • The input must be the full customer address string only.
  • Do not include customer name or non-address fields.

Return rules:

  • return true with confidence PASS when verdict.possibleNextAction is ACCEPT or VERIFY
  • and either verdict.validationGranularity or verdict.geocodeGranularity is PREMISE or SUB_PREMISE
  • return true with confidence SOFT_PASS when verdict.possibleNextAction is ACCEPT, VERIFY, or CONFIRM
  • and either verdict.validationGranularity or verdict.geocodeGranularity is PREMISE_PROXIMITY or ROUTE
  • soft-pass results should be tagged as 门牌级近似匹配 and/or 街道级匹配
  • if primary validation fails, run a second-stage Places Text Search fallback using the raw address text
  • when the result is locatable, return googleMapsUrl so callers can open the mapped address or nearby/street-level location in Google Maps
  • return true with confidence FALLBACK_PASS only when the fallback finds a locatable place with strong text and/or postal-code overlap with the input
  • otherwise return false

Input:

{
  "address": "P ROUAIX 2324 B CP.75790 OMEGA PERSEO ESTRELLAS DEL SUR 031C.P.75790 TEHUACAN,PUE.",
  "exists": true,
  "source": "ADDRESS_VALIDATION",
  "confidence": "PASS",
  "reason": "Validation passed the hard rules for possibleNextAction and address granularity.",
  "normalizedAddress": "P ROUAIX 2324 B, ESTRELLAS DEL SUR, 75790 Tehuacán, Pue., México",
  "googleMapsUrl": "https://www.google.com/maps/search/?api=1&query=P+ROUAIX+2324+B%2C+ESTRELLAS+DEL+SUR%2C+75790+Tehuac%C3%A1n%2C+Pue.%2C+M%C3%A9xico&query_place_id=ChIJexample"
}

Tool name: get_nearby_businesses_by_address

Description:

  • Retrieve nearby business information for one address using Google Places Text Search.
  • This tool makes exactly one Google Maps API call per request.
  • This tool returns raw nearby business data only. It does not return a consumption-level judgement.

Input rules:

  • Pass only one field: address.
  • Use the map-call address string only.
  • Do not pass customer name or other non-address fields.

Return shape:

  • address: the input address
  • query: the Google Places text query used internally
  • count: the number of returned businesses
  • businesses: raw nearby business results

Example output:

{
  "address": "P ROUAIX 2324 B CP.75790 OMEGA PERSEO ESTRELLAS DEL SUR 031C.P.75790 TEHUACAN,PUE.",
  "query": "negocios cerca de P ROUAIX 2324 B CP.75790 OMEGA PERSEO ESTRELLAS DEL SUR 031C.P.75790 TEHUACAN,PUE.",
  "count": 2,
  "businesses": [
    {
      "name": "Bodega Aurrera",
      "formattedAddress": "Tehuacan, Puebla, Mexico",
      "primaryType": "supermarket",
      "types": ["supermarket", "store", "food"],
      "rating": 4.1,
      "userRatingCount": 1200,
      "priceLevel": "PRICE_LEVEL_MODERATE",
      "businessStatus": "OPERATIONAL",
      "location": {
        "latitude": 18.45,
        "longitude": -97.39
      },
      "googleMapsUri": "https://maps.google.com/?cid=123"
    }
  ]
}

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 an object with:
    • address: the input address
    • exists: the final boolean validation result
    • source: ADDRESS_VALIDATION or PLACES_TEXT_SEARCH
    • confidence: PASS, SOFT_PASS, FALLBACK_PASS, or HARD_FAIL
    • reason: human-readable explanation of the result
  • The nearby-business tool is intended as a reference-only enrichment signal.
  • If your downstream agent does not receive enough nearby business data, it should treat the conclusion as unavailable instead of guessing.

Publish

npm login
npm publish --access public