# loc8n Geographic Data

U.S. demographics, housing, mortgage, migration, and employment data from the Census Bureau, HUD, HMDA, and LEHD. 23 tools across 7 categories — query geographic data from any MCP client.

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add gener8v/mcp-geographic-data

# Browse available tools
npx -y @smithery/cli@latest tool list gener8v/mcp-geographic-data

# Get full schema for a tool
npx -y @smithery/cli@latest tool get gener8v/mcp-geographic-data lookup_zip_code

# Call a tool
npx -y @smithery/cli@latest tool call gener8v/mcp-geographic-data lookup_zip_code '{}'
```

## Direct MCP Connection

Endpoint: `https://mcp-geographic-data--gener8v.run.tools`

**Optional config:**
- `loc8nApiKey` (query) — API key for the loc8n Geographic Data API. Optional when using OAuth authentication.

## Tools (23)

- `lookup_zip_code` — Look up full details for a single 5-digit US ZIP code, including city, state, county, timezone, coordinates, area codes…
- `search_zip_codes_by_city` — Search for all ZIP codes in a given city and state. Returns the full list of matching ZIP codes with details.
- `find_zip_codes_in_radius` — Find all ZIP codes within a given radius of a center ZIP code. Returns each nearby ZIP with its distance from the cente…
- `calculate_zip_code_distance` — Calculate the distance between two ZIP codes using either the Haversine or Vincenty formula. Returns origin/destination…
- `search_areas` — Search for geographic areas by name across all boundary types (county, state, CBSA, census tract, ZIP). Uses trigram ma…
- `get_demographics` — Retrieve a full demographic profile (population, income, housing, education, employment, households) for a single geogr…
- `get_demographics_category` — Retrieve specific demographic categories (e.g. population, income, housing) for a geographic area. Use this instead of …
- `get_demographics_trend` — Retrieve historical demographic data across multiple years for a single geographic area, useful for analysing populatio…
- `compare_demographics` — Compare demographics side by side for two to ten ZIP codes. Returns each ZIP's demographic profile plus summary compari…
- `get_fair_market_rent` — Look up HUD Fair Market Rent (FMR) rates for a geographic area by ZIP code, county FIPS, CBSA/metro code, or state FIPS…
- `get_fmr_trend` — Retrieve Fair Market Rent data across multiple years for a single area. Returns an array of yearly FMR records with ren…
- `get_mortgage_summary` — Retrieve the mortgage lending summary for a single geographic area (census tract, county, or state) from HMDA data. Ret…
- `get_mortgage_trends` — Retrieve multi-year mortgage lending data for a single area across all available HMDA years. Returns an array of yearly…
- `compare_mortgage` — Compare mortgage lending metrics across 2-5 geographic areas for a single HMDA data year. All areas must be the same ge…
- `get_migration_summary` — Retrieve migration summary for a county or state showing aggregate inflows, outflows, and net migration. Returns net re…
- `get_migration_flows` — Retrieve top inflow or outflow areas for a county or state, ranked by number of tax returns or AGI. Inflows show where …
- `get_migration_trends` — Retrieve migration summary data across all available year pairs for a county or state. Returns an array of yearly migra…
- `get_employment` — Retrieve employment data for a single geographic area. Returns total jobs, industry mix by NAICS sector, earnings distr…
- `get_employment_trend` — Retrieve employment data across all available years for a single area. Returns an array of yearly metrics (total jobs, …
- `compare_employment` — Compare employment data for multiple areas side by side (2-10 areas). All geoids must share the same area type. Returns…
- `get_commute_flows` — Retrieve commute flow (origin-destination) data for a county or state. Shows where workers come from (inbound) or where…
- `geocode_address` — Convert a street address or place name into geographic coordinates. Returns up to 'limit' candidate results with coordi…
- `reverse_geocode` — Convert a latitude/longitude coordinate pair into a street address. Returns the best-match formatted address, address c…

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get gener8v/mcp-geographic-data <tool-name>
```

## Resources

- `data://demographics/available-years` — Available data years for demographics data (American Community Survey 5-Year Estimates). Use this to validate year para…
- `data://fmr/available-years` — Available data years for HUD Fair Market Rent data. Use this to validate year parameters before calling FMR tools.
- `data://mortgage/available-years` — Available data years for HMDA mortgage data. Use this to validate year parameters before calling mortgage tools.
- `data://migration/available-years` — Available year pairs for IRS SOI migration data. Migration data uses year pairs (e.g., 2021-2022) representing moves be…
- `data://employment/available-years` — Available data years for LODES employment data. Requires Business tier or above (employment:read permission).
- `data://tiers` — Platform tier definitions including permissions, rate limits, and features. Use this to understand what data each subsc…
- `data://auth/context` — Information about the current API key's tier, permissions, and rate limits. Use this to check what the current key can …

## Prompts (3)

- `analyze-area` (area_type, area_code) — Generate a comprehensive analysis of a geographic area covering demographics, housing costs, mortgage lending, employme…
- `compare-areas` (areas, area_type) — Compare two or more geographic areas across demographics, housing, and economic indicators.
- `market-analysis` (area_type, area_code) — Analyze the real estate market for a geographic area using housing costs, mortgage trends, demographics, and migration …
