Australian Postcodes MCP Server
16 MCP tools for Australian postcode and suburb lookup. Address validation, fuzzy matching, geographic queries, and analytics.
Overview
A Model Context Protocol server providing comprehensive Australian postcode and suburb lookup. 18,559 localities from data.gov.au with fuzzy matching, geographic queries, and validation tools for AI assistants.
The Problem
Australian address data is messy:
- Customers misspell suburb names
- Multiple suburbs share postcodes
- Validation requires external APIs or manual lookup
- Geographic queries need coordinate handling
AI assistants need local data access for fast, reliable lookups.
Solution
Complete Australian locality data with intelligent search:
Postcode, suburb, validation
Fuzzy, autocomplete, phonetic
LGA, radius, neighbours
Stats, regions, health
Tools
Search Tools (4)
| Tool | Description |
|---|---|
search_by_postcode | Find suburbs for a postcode (e.g., 2000 → Sydney, Barangaroo) |
search_by_suburb | Find postcodes with fuzzy matching |
validate_suburb_postcode | Verify suburb/postcode combinations |
get_location_details | Smart search accepting postcode OR suburb |
Validation Tools (4)
Handle real-world address input:
- find_similar_suburbs - Typo correction with confidence scoring
- autocomplete_suburb - Prefix-based search-as-you-type
- validate_spelling - Check spelling, suggest corrections
- phonetic_search - Handle variations (Koogee → Coogee)
Location Tools (4)
Geographic queries:
- list_suburbs_in_lga - All suburbs in a council area
- find_lga_for_suburb - Get the LGA for a suburb
- list_suburbs_in_radius - Suburbs within X km (Haversine)
- get_neighboring_suburbs - Find adjacent suburbs
Analytics Tools (4)
Data insights:
- get_state_statistics - Counts by state/territory
- list_all_lgas - All councils with state filtering
- search_by_region - Query by SA2/SA3/SA4 statistical areas
- health_check - Database status and response time
Data Coverage
Each locality record includes:
| Field | Example |
|---|---|
| Postcode | 2000 |
| Locality | Sydney |
| State | NSW |
| Coordinates | -33.8688, 151.2093 |
| LGA | Sydney |
| Federal Electorate | Sydney |
| State Electorate | Sydney |
| Remoteness (ARIA) | Major Cities |
| PHN | South Eastern NSW |
| SA2/SA3/SA4 | Statistical area codes |
Features
- 18,559 Localities - Complete Australian coverage
- FTS5 Search - Full-text with BM25 ranking
- Fuzzy Matching - Handle misspellings gracefully
- Phonetic Search - Soundex-based pronunciation matching
- Radius Queries - Haversine distance calculations
- OAuth Security - Google authentication
- Edge Deployment - Sub-millisecond cold starts
Architecture
Cloudflare Workers
├── MCP Server (Durable Objects)
│ └── 16 tools across 4 categories
├── D1 Database
│ ├── localities (18,559 records)
│ └── localities_fts (FTS5 index)
└── OAuth (Google + KV sessions)
Use Cases
Address Validation - Verify customer-entered suburbs/postcodes
Form Autocomplete - Search-as-you-type for address fields
Data Enrichment - Add LGA, electorate, remoteness to customer records
Geographic Analysis - Find all suburbs within radius of coordinates
Typo Correction - Clean up misspelled address data
Interested in a similar solution?
Let's talk about your project