# TIGER/Line Geocoder (Census) MCP

> TIGER/Line Geocoder (Census) converts addresses and coordinates into precise, structured geographic data from the official US Census Bureau. It handles single-line lookups, full address resolution, Puerto Rico addresses, reverse geocoding of points to census boundaries, and batch processing for up to 10,000 records.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Tags:** census-data, geocoding, tiger-line, gis, mapping

## Description

This server hooks your AI client directly into the US Census Bureau's TIGER/Line API. It takes raw location data—whether you got a clean street address or just some random latitude and longitude—and turns it into structured, verifiable geographic records from the official census. You don't have to manage any API keys or worry about complex setup; your agent just calls the tool.

If you need coordinates from a fully structured US address (street, city, state, zip), use `geocode_address`. That function handles standard inputs and spits out precise latitude and longitude pairs. When you've got a raw, single-line address string—like something pulled straight off a messy database entry—use the `geocode_oneline` tool; it figures out the coordinates from that mess.

Need to process thousands of records at once? You can handle huge data sets by uploading CSV files. If your file has multiple structured addresses, pass it through `batch_geocode_address`, and it'll return a batch set of corresponding coordinates for every row up to 10,000 entries. If you already have the coordinate pairs but need to know what census geography they belong to, use `batch_geocode_coordinates` on your CSV; that handles up to 10,000 pairs.

For reverse lookups—that is, when you only have a point of coordinates and wanna know which census tract or administrative block it falls into—you call `geocode_coordinates`, feeding it the latitude and longitude pair. For addresses in Puerto Rico specifically, don't use the general tool; you gotta run it through `geocode_address_pr`. That specialized function uses its own logic to correctly geocode full street addresses within the Commonwealth.

When you're dealing with historical or time-sensitive data, you need to know what versions of census information are available. To see every current and past benchmark ID that the Census Geocoder supports, run `list_benchmarks`. Once you pick a specific benchmark, you call `list_vintages` to get all the unique, date-specific data vintages associated with it for your queries.

## Tools

### batch_geocode_address
Processes up to 10,000 rows of structured addresses from a CSV file into coordinates.

### batch_geocode_coordinates
Takes up to 10,000 coordinate pairs from a CSV and looks up their corresponding census geographies.

### list_benchmarks
Retrieves the list of available Census Geocoder benchmarks and their unique IDs.

### geocode_address_pr
Geocodes a full street address specific to Puerto Rico, respecting local parameters.

### geocode_address
Converts a single structured address input (street, city, state, zip) into coordinates.

### geocode_coordinates
Looks up the census geographies associated with a given latitude and longitude point.

### geocode_oneline
Converts a raw, single-line address string into coordinates.

### list_vintages
Lists all specific data vintages associated with a chosen benchmark for use in queries.

## Prompt Examples

**Prompt:** 
```
Geocode the address '1600 Pennsylvania Ave NW, Washington, DC 20500' using the Public_AR_Current benchmark.
```

**Response:** 
```
I've geocoded the address. The coordinates are Longitude: -77.03636, Latitude: 38.89715. This was matched using the Public_AR_Current benchmark.
```

**Prompt:** 
```
What census tract and block are located at coordinates -76.9274, 38.8459?
```

**Response:** 
```
Checking census geographies... Those coordinates correspond to Census Tract 8007, Block 1004 in Prince George's County, Maryland (using the Current vintage).
```

**Prompt:** 
```
List all available geocoding benchmarks.
```

**Response:** 
```
I've retrieved the available benchmarks. You can use 'Public_AR_Current' (ID: 4), 'Public_AR_Census2020' (ID: 2020), or 'Public_AR_Census2010' (ID: 10) for your queries.
```

## Capabilities

### Get Coordinates from Address
Converts full, structured addresses into precise latitude and longitude pairs using `geocode_address`.

### Process Single-Line Addresses
Takes a raw, single-line address string and returns its coordinates via the `geocode_oneline` tool.

### Find Census Area from Coordinates (Reverse Geocoding)
Inputs Lat/Long points to determine which census tract or administrative block they belong to using `geocode_coordinates`.

### Handle Puerto Rico Addresses
Uses specialized logic (`geocode_address_pr`) to correctly geocode addresses within the Commonwealth of Puerto Rico.

### Process Large Address Batches
Takes CSV data (up to 10,000 rows) containing multiple structured addresses and returns a batch set of coordinates using `batch_geocode_address`.

### List Census Data Versions
Checks which historical or current census benchmarks and vintages are available for querying via `list_benchmarks` and `list_vintages`.

## Use Cases

### Validating Delivery Routes for New Warehouses
A logistics team needs to confirm 50 potential new warehouse sites. Instead of manually verifying every address, they run a CSV through `batch_geocode_address`. The server returns coordinates and confirms the exact census block, allowing them to calculate final routing costs immediately.

### Analyzing Demographic Shifts Post-Event
A researcher needs to know which population groups were affected by a recent policy change. They take a list of known incident coordinates and run `geocode_coordinates`. The tool maps those points back to specific census tracts, allowing the agent to pull targeted demographic data for analysis.

### Data Cleaning from Web Scrapes
A marketing team scrapes thousands of user-provided addresses but they are inconsistent. They run `geocode_oneline` on a sample batch. This validates the raw input, forcing it into standardized Lat/Long pairs and ensuring data quality before feeding it into their main database.

### Comparing Data Across Time Periods
A city planner needs to compare infrastructure density from 2010 versus today. They use `list_benchmarks` first, select the correct historical vintage (e.g., Census2010), and then run targeted lookups, guaranteeing data consistency across decades.

## Benefits

- Stop dealing with vague location data. Use `geocode_address` or `geocode_oneline` to turn simple text into verifiable latitude/longitude pairs, giving you a concrete starting point for analysis.
- Scale your process without breaking it. If you've got 5,000 addresses in a spreadsheet, use `batch_geocode_address`. It handles the volume so your agent doesn't choke on large data sets.
- Know exactly what area you're looking at. Run reverse geocoding with `geocode_coordinates` to find the precise census tract and block boundaries for any given coordinate point.
- Handle special cases correctly. If your work touches Puerto Rico, don't guess—call `geocode_address_pr`. It uses specialized logic for local parameters.
- Maintain data integrity over time. Use `list_benchmarks` and `list_vintages` to ensure you are running your queries against the correct historical or current census dataset.
- Simplify complex lookups. By centralizing this service, your agent knows whether it needs a single-line lookup (`geocode_oneline`) versus a full structured address (the core `geocode_address`), cutting down on logic errors.

## How It Works

The bottom line is: you pass raw location text or numbers, and the server gives you verified, actionable geographic data that tells you exactly what type of area it is.

1. Tell your AI client exactly what you need to convert (e.g., 'Geocode 1600 Pennsylvania Ave NW').
2. The agent determines the correct tool and calls it, supplying the necessary data points like addresses or coordinates.
3. You get back structured JSON containing the precise longitude, latitude, and detailed census geography boundaries.

## Frequently Asked Questions

**Can I get census tract and block information from a single address string?**
Yes! Use the `geocode_oneline` tool with `returntype` set to 'geographies'. Provide the address and a benchmark (like 'Public_AR_Current') to receive full geographic metadata.

**How do I find out which census area a specific GPS coordinate belongs to?**
Use the `geocode_coordinates` tool. Input the longitude (x) and latitude (y) along with a benchmark and vintage. The agent will return the specific census layers for that point.

**Does this server support geocoding for addresses in Puerto Rico?**
Yes, specifically via the `geocode_address_pr` tool. It includes fields for 'urb' (Urbanization) and 'municipio' which are essential for accurate Puerto Rico address matching.

**How do I ensure data consistency when using the 'list_benchmarks' tool?**
You must always use `list_benchmarks` first to see what versions are available. The resulting benchmark IDs dictate which historical or current census data set your query runs against, preventing mismatch errors.

**What is the maximum volume I can process using the 'batch_geocode_address' tool?**
The service supports batch processing for up to 10,000 addresses in a single run. This capacity handles large-scale data cleanup and analysis without requiring multiple separate API calls.

**Can the 'geocode_oneline' tool handle incomplete or poorly formatted address strings?**
It requires a reasonably complete, single-line format to work. If the string is too vague (e.g., just a neighborhood name), the tool will return an error because it needs enough data points for mapping.

**If I use 'geocode_address' and one address fails, does the entire batch process fail?**
No, failure in one record won't stop the whole job. The service processes records individually; it will return a status code or error message specifically for the failing address while continuing with the rest of your list.

**Does 'geocode_coordinates' provide coverage outside of US Census Bureau data?**
No, this server is exclusively built on the official US Census Bureau TIGER/Line geocoding service. It provides accurate coordinates and census geographies only for locations within the United States.