A Desktop Extension (MCPB) for geocoding and reverse geocoding using the OpenStreetMap Nominatim API. This extension provides MCP (Model Context Protocol) tools for converting addresses to coordinates and coordinates to addresses.
- Geocoding: Convert addresses or location descriptions to coordinates
- Reverse Geocoding: Convert coordinates (latitude/longitude) to addresses
- Multiple Output Formats: Support for JSON, GeoJSON, and GeocodeJSON formats
- Detailed Address Information: Optional address breakdowns, extra tags, and name details
- Polygon Geometries: Support for GeoJSON, KML, SVG, and WKT polygon outputs
- Flexible Filtering: Filter by country codes, layers (address, POI, railway, natural, manmade), and feature types
- Claude Desktop (version 1.0.0 or higher)
- Node.js runtime (version 18.0.0 or higher)
- Compatible with macOS, Windows, and Linux
- Download the
mcp.mcpbfile from this repository - Double-click the
.mcpbfile to open it with Claude Desktop - Follow the installation prompts in Claude Desktop
- The extension will be automatically installed and configured
If you prefer to install manually:
- Open Claude Desktop
- Go to Settings → Extensions
- Click "Install Extension"
- Select the
mcp.mcpbfile - Confirm the installation
Once installed, the extension provides two main tools:
Convert an address or location description to coordinates.
Example Usage:
Geocode "1600 Amphitheatre Parkway, Mountain View, CA"
Parameters:
query(required): Free-form string to search forformat: Response format (xml, json, jsonv2, geojson, geocodejson)addressdetails: Include address breakdown (0 or 1)extratags: Include extra information (0 or 1)namedetails: Include full list of names (0 or 1)countrycodes: Filter by country codes (ISO 3166-1alpha2)layer: Filter by themes (address, poi, railway, natural, manmade)featureType: Fine-grained address selection (state, country, city, settlement)polygon_*: Add geometry in various formats
Convert coordinates to an address.
Example Usage:
Reverse geocode coordinates 37.4224764, -122.0842499
Parameters:
lat(required): Latitude in WGS84 projectionlon(required): Longitude in WGS84 projectionzoom: Level of detail (3=country, 18=buildings)format: Response format (xml, json, jsonv2, geojson, geocodejson)addressdetails: Include address breakdown (0 or 1)extratags: Include extra information (0 or 1)namedetails: Include full list of names (0 or 1)layer: Filter by themes (address, poi, railway, natural, manmade)polygon_*: Add geometry in various formats
- 3: Country
- 5: State
- 8: County
- 10: City
- 12: Town/Borough
- 13: Village/Suburb
- 14: Neighbourhood
- 15: Any settlement
- 16: Major streets
- 17: Major and minor streets
- 18: Buildings
- json: Standard JSON format
- jsonv2: Enhanced JSON format (default)
- geojson: GeoJSON format
- geocodejson: GeocodeJSON format
- xml: XML format
This extension uses the OpenStreetMap Nominatim API:
- Data: © OpenStreetMap contributors
- License: ODbL 1.0
- Copyright: http://osm.org/copyright
- Clone the repository
- Install dependencies:
bun install - Build the project:
bun run build - Create the MCPB package:
bunx @anthropic-ai/mcpb pack
├── manifest.json # MCPB extension manifest
├── dist/ # Compiled JavaScript files
│ ├── index.js # Main entry point
│ ├── tools/ # MCP tool implementations
│ ├── clients/ # API client code
│ └── types/ # TypeScript type definitions
├── src/ # Source TypeScript files
└── mcp.mcpb # Generated MCPB extension file
Run tests with:
bun testRun type checking:
bun tsc- Extension not loading: Ensure Claude Desktop version is 1.0.0 or higher
- Node.js errors: Verify Node.js version 16.0.0 or higher is installed
- API errors: Check internet connection and Nominatim service availability
For issues and support:
- Check the OpenStreetMap Nominatim documentation
- Review the MCP SDK documentation
- File issues in the project repository
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
MIT License - see LICENSE file for details.