Skip to main content
Glama
sthan-io

sthan-io

Official
by sthan-io

Sthan MCP Server

npm version License: MIT

MCP server for sthan.io — give your AI assistant the ability to verify, parse, autocomplete, and geocode US addresses, and look up IP geolocation. Works with Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, and any MCP-compatible client.

8 tools · TypeScript · stdio transport · Free tier, no credit card required.


Why use it

  • Real US postal data — addresses are verified against authoritative postal records, not heuristics. Returns delivery point validation (DPV), ZIP+4, residential/commercial flag.

  • Sub-100ms autocomplete — typeahead-grade response times for address, city, and ZIP suggestions.

  • Strong geocoding — forward geocoding returns accuracy classification (rooftop / interpolated / centroid / approximate) plus a confidence score, so your AI knows when to trust the result.

  • IPv4 + IPv6 geolocation — country, region, city, coordinates, postal code, timezone with current local time, flag, currency, calling code, network (ASN, ISP, organisation), mobile/proxy/hosting flags, reverse DNS and a confidence score.

  • Free tier with no credit card — get a key in under a minute at sthan.io/dashboard.

Related MCP server: IPGeolocation MCP Server

Tools

Tool

What it does

sthan_verify_address

Verify a US address is real and deliverable. Returns standardized format, ZIP+4, DPV, residential/commercial.

sthan_parse_address

Parse freeform US address text into structured components (street number, name, type, direction, unit, city, state, zip).

sthan_autocomplete_address

Suggest complete US addresses from partial input. Sub-100ms.

sthan_autocomplete_city

Suggest US cities from partial input, with state code.

sthan_autocomplete_zipcode

Suggest US ZIP codes from partial input.

sthan_geocode

US address → latitude/longitude with accuracy + confidence, county, ZIP+4 and time zone.

sthan_reverse_geocode

Latitude/longitude → nearest US street address with distance in meters, county, ZIP+4 and time zone; limit (up to 10) also lists nearby addresses.

sthan_ip_geolocation

IPv4 or IPv6 → location (country to postal code, local time, flag, currency), the network behind it (ASN, ISP, proxy/hosting flags) and a confidence score.

Quick start

1. Get a free API key

Sign up at sthan.io and create a key from the dashboard. No credit card.

2. One-click install

Add to Claude Desktop Install in VS Code Install in VS Code Insiders Add to Cursor

  • Claude Desktop: download sthan.mcpb and double-click it. Claude asks for your API key and keeps it in your system keychain. Nothing else to install.

  • VS Code: click the button. VS Code asks for your API key and stores it securely.

  • Cursor: click the button, then replace your_key_here with your key in Cursor Settings > MCP.

  • Claude Code: claude mcp add sthan -e STHAN_API_KEY=your_key_here -- npx -y @sthan/mcp-server (details below).

3. Or set it up manually

Replace your_key_here with your key. Every setup below downloads the latest @sthan/mcp-server from npm and calls the live API at https://api.sthan.io.

Claude Code (terminal):

claude mcp add sthan -e STHAN_API_KEY=your_key_here -- npx -y @sthan/mcp-server

On native Windows, wrap npx with cmd /c:

claude mcp add sthan -e STHAN_API_KEY=your_key_here -- cmd /c npx -y @sthan/mcp-server

Add --scope user to use it in every project. Start claude and type /mcp to confirm sthan is connected.

Claude Desktop: edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\), then restart Claude Desktop:

{
  "mcpServers": {
    "sthan": {
      "command": "npx",
      "args": ["-y", "@sthan/mcp-server"],
      "env": { "STHAN_API_KEY": "your_key_here" }
    }
  }
}

Cursor: the same JSON in ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project).

Windsurf: the same JSON in ~/.codeium/windsurf/mcp_config.json.

VS Code: create .vscode/mcp.json. VS Code asks for the key once and stores it securely:

{
  "inputs": [
    { "type": "promptString", "id": "sthan-api-key", "description": "sthan.io API key", "password": true }
  ],
  "servers": {
    "sthan": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@sthan/mcp-server"],
      "env": { "STHAN_API_KEY": "${input:sthan-api-key}" }
    }
  }
}

Try it without an AI client (opens the official MCP Inspector in your browser):

npx @modelcontextprotocol/inspector -e STHAN_API_KEY=your_key_here npx -y @sthan/mcp-server

Click Connect, then Tools > List Tools, pick a tool, and run it.

Troubleshooting

  • Keep the -y in npx -y. Without it, npx waits for an "OK to install?" answer that an AI client cannot give, and the server never starts.

  • On Windows, run the claude mcp add ... cmd /c ... command from PowerShell or Command Prompt. Git Bash rewrites /c to C:/, which saves a broken command that times out (fix: prefix it with MSYS_NO_PATHCONV=1).

  • On Windows, if a client reports spawn npx ENOENT, use "command": "cmd" with "args": ["/c", "npx", "-y", "@sthan/mcp-server"].

  • Address verification and parsing can take up to about 2 minutes when a live postal lookup is needed. If your client gives up sooner, raise its tool timeout (Claude Code: set MCP_TOOL_TIMEOUT=150000 before starting claude; MCP Inspector: raise Request Timeout in its Configuration panel).

Example prompts

Once configured, just ask your AI assistant naturally:

  • "Is 123 Main St, New York, NY 10001 a real, deliverable address?"

  • "Parse this address: apt 2b 500 broadway new york ny"

  • "What are the coordinates of 1600 Pennsylvania Ave, Washington DC?"

  • "What's the nearest address to 40.7128, -74.0060?"

  • "Where is IP 8.8.8.8 located?"

  • "Suggest US cities starting with 'San Fr'."

Environment variables

Variable

Required

Description

STHAN_API_KEY

Yes

Your sthan.io API key (sthan_test_* for development, sthan_live_* for production)

STHAN_API_URL

No

Override base URL (default: https://api.sthan.io)

Response times

Most calls return in 1 to 3 seconds. Address verification and parsing can take longer (up to about 2 minutes) when an address cannot be matched from sthan.io's own data and needs a live postal lookup, so the server waits up to 150 seconds for those two tools. If your MCP client stops waiting sooner, raise its tool timeout (for example, in Claude Code set MCP_TOOL_TIMEOUT=150000).

Packages

This monorepo publishes two packages:

Package

npm

Purpose

@sthan/mcp-server

npm

The MCP server itself — the binary that your client launches

@sthan/core

npm

TypeScript SDK for direct programmatic use of sthan.io APIs

Development

git clone https://github.com/sthan-io/mcp-server.git
cd mcp-server
npm install
npm run build --workspaces

Then run the server with STHAN_API_KEY=sthan_test_... node packages/mcp-server/dist/index.js.

License

MIT — see LICENSE.

Available Tools

8 tools
sthan_autocomplete_addressAutocomplete US AddressA
Read-onlyIdempotent

Return a list of complete US street-address suggestions for partial input, intended for type-ahead / autocomplete fields. Use while a user is typing an address and you want to offer full matches. For city-only suggestions use sthan_autocomplete_city; for ZIP-only suggestions use sthan_autocomplete_zipcode; to validate a finished address use sthan_verify_address. Read-only with no side effects. Requires a sthan.io API key in STHAN_API_KEY; each call counts toward your plan's rate limit (a free tier is available). On failure it returns an error message.

Inputs: text (required).

sthan_autocomplete_cityAutocomplete US CityA
Read-onlyIdempotent

Return a list of US city suggestions (with state) for partial input. Use for city-field type-ahead, or to resolve a partial city name to its full name and state. For full street-address suggestions use sthan_autocomplete_address; for ZIP codes use sthan_autocomplete_zipcode. Read-only with no side effects. Requires a sthan.io API key in STHAN_API_KEY; each call counts toward your plan's rate limit (a free tier is available). On failure it returns an error message.

Inputs: text (required), display_type.

sthan_autocomplete_zipcodeAutocomplete US ZIP CodeA
Read-onlyIdempotent

Return a list of US ZIP code suggestions for partial input, each with state (and optionally ZIP+4). Use for ZIP-field type-ahead or to expand a partial ZIP. For city suggestions use sthan_autocomplete_city; for full addresses use sthan_autocomplete_address. Read-only with no side effects. Requires a sthan.io API key in STHAN_API_KEY; each call counts toward your plan's rate limit (a free tier is available). On failure it returns an error message.

Inputs: text (required), display_type.

sthan_geocodeGeocode US AddressA
Read-onlyIdempotent

Convert a US address to latitude/longitude coordinates. Returns the coordinates, a formatted address, an accuracy type (rooftop, interpolated, centroid, or approximate), and a confidence score. Use when you need map coordinates for an address. To go the other way (coordinates to address) use sthan_reverse_geocode; to check deliverability rather than location use sthan_verify_address. Read-only with no side effects. Requires a sthan.io API key in STHAN_API_KEY; each call counts toward your plan's rate limit (a free tier is available). On failure it returns an error message, for example an address that could not be located.

Inputs: address (required).

sthan_ip_geolocationIP GeolocationA
Read-onlyIdempotent

Look up the approximate geographic location of an IPv4 or IPv6 address. Returns country, region, city, coordinates, timezone, and postal code (some fields may be null when unknown). Use to estimate where an IP is located, for example for analytics or choosing a default region. This locates IP addresses, not postal addresses; to work with a street address use sthan_verify_address, sthan_parse_address, or sthan_geocode. Read-only with no side effects. Requires a sthan.io API key in STHAN_API_KEY; each call counts toward your plan's rate limit (a free tier is available). On failure it returns an error message.

Inputs: ip (required).

sthan_parse_addressParse US AddressA
Read-onlyIdempotent

Break a freeform US address string into structured components: address number, street name, pre/post directionals, street type, unit type and number, city, state, ZIP, and ZIP+4. Use when you have messy or unstructured US address text and need the individual fields. This parses and standardizes only; it does not confirm the address is deliverable (use sthan_verify_address) and does not return coordinates (use sthan_geocode). Read-only with no side effects. Requires a sthan.io API key in STHAN_API_KEY; each call counts toward your plan's rate limit (a free tier is available). On failure it returns an error message, for example an invalid API key or an exceeded rate limit.

Inputs: address (required).

sthan_reverse_geocodeReverse Geocode CoordinatesA
Read-onlyIdempotent

Convert latitude/longitude coordinates to the nearest US street address. Returns the address, the distance in meters from the input point, an accuracy type, and a confidence score. Use when you have coordinates and need the closest address. US coverage only. To go the other way (address to coordinates) use sthan_geocode. Read-only with no side effects. Requires a sthan.io API key in STHAN_API_KEY; each call counts toward your plan's rate limit (a free tier is available). On failure it returns an error message.

Inputs: latitude (required), longitude (required).

sthan_verify_addressVerify US AddressA
Read-onlyIdempotent

Verify whether a US street address is real and deliverable. Returns the standardized address, ZIP+4, county, a deliverability status, and the dpvConfirmation code (Y = deliverable; N = not found or undeliverable; S = address found but the apartment/unit is missing or unconfirmed; blank = unknown). Use to confirm a US mailing address, clean address data, or check an address before shipping. Do not use for non-US addresses, to get map coordinates (use sthan_geocode), or to only split an address into fields without checking it (use sthan_parse_address). Read-only with no side effects. Requires a sthan.io API key in STHAN_API_KEY; each call counts toward your plan's rate limit (a free tier is available). On failure it returns an error message, for example an invalid API key, an exceeded rate limit, or an address that could not be found.

Inputs: address (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.6/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool has a distinct purpose (autocomplete address/city/zip, geocode, reverse geocode, IP geolocation, parse, verify). Descriptions explicitly reference other tools to avoid confusion, making misselection unlikely.

    Naming Consistency4/5

    All tools use snake_case with a 'sthan_' prefix. Most follow a verb_noun pattern (e.g., autocomplete_address, parse_address), though 'ip_geolocation' is noun_noun and 'geocode' lacks a noun. Still, the pattern is clear and predictable.

    Tool Count5/5

    Eight tools cover the core address and location functionality (autocomplete, parsing, verification, geocoding, IP lookup) without being excessive. Each tool serves a clear role.

    Completeness5/5

    The set provides complete coverage for typical US address workflows: input assistance (autocomplete), verification, parsing, forward/reverse geocoding, and IP geolocation. No obvious missing operations for its domain.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Official IPGeolocation.io MCP server for accurate IP geolocation, company information, ASN and network data, IP security (VPN, proxy, Tor, bot, hosting and spam detection), abuse contacts, time zones, astronomy, currency data and user-agent parsing. Its 17 tools support bulk lookups and cached-result pagination. Local stdio installation requires Node.js 22 or later. API plan restrictions apply.
      17
      106 npm
      6
      MIT