Zipcode Search MCP Server
A Model Context Protocol (MCP) server that provides Japanese postal code to address lookup functionality. This server can be integrated with AI assistants and other MCP clients to enable postal code search capabilities.
Features
- 🏣 Search Japanese addresses by 7-digit postal codes
- 🔌 Model Context Protocol (MCP) compatible
- 🚀 Fast and lightweight implementation
- 🌐 Uses reliable Zipcloud API as data source
- 🛡️ Built-in error handling and validation
Tech Stack
- Python 3.10+
- MCP (Model Context Protocol) - AI tool integration protocol
- FastMCP - MCP server framework
- httpx - Modern HTTP client
- Zipcloud API - Japanese postal code data source
Installation
Prerequisites
- Python 3.10 or higher
- uv (recommended) or pip
Quick Start
- Clone the repository:
- Install dependencies using uv:
Or with pip:
- Run the MCP server:
MCP Client Configuration
Claude Desktop
Add the following configuration to your claude_desktop_config.json
:
Other MCP Clients
For other MCP clients, refer to the included .mcp.json
configuration file or use the following connection details:
- Server Name:
zipcode-search
- Command:
uv run python main.py
- Working Directory: Project root directory
Available Tools
search_zipcode
Searches for a Japanese address using a postal code.
Parameters:
zipcode
(string): 7-digit postal code (e.g., "1000001")
Returns:
address
(string): The found address, or "Address not found" if no match
Example Usage:
In your MCP client (like Claude):
Or directly:
API Reference
The server provides one tool through the MCP protocol:
Tool | Description | Input | Output |
---|---|---|---|
search_zipcode | Search address by postal code | zipcode: string | {address: string} |
Development
Project Structure
Development Setup
- Clone and install in development mode:
- Run tests (if available):
- Format code:
Contributing
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Add tests if applicable
- Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Dependencies
External Services
- Zipcloud API - Provides postal code to address mapping data
Python Packages
mcp[cli]
- Model Context Protocol implementationhttpx
- Async HTTP client for API requests
Troubleshooting
Server Won't Start
- Verify Python version is 3.10+:
- Ensure dependencies are installed:
- Check if the server starts manually:
Postal Code Not Found
- Ensure the postal code is exactly 7 digits (no hyphens)
- Verify the Zipcloud API is accessible
- Check your internet connection
MCP Client Connection Issues
- Verify the path in your MCP client configuration is correct
- Ensure the server is executable from the specified directory
- Check MCP client logs for detailed error messages
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Zipcloud for providing the postal code API
- Model Context Protocol for the integration framework
- FastMCP for the server implementation
Support
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
- For general questions, start a Discussion
Note: This service uses the Zipcloud API and is intended for development and educational purposes. For production use, please ensure proper error handling, rate limiting, and compliance with the Zipcloud API terms of service.
This server cannot be installed
Provides Japanese postal code to address lookup functionality that can be integrated with AI assistants and other MCP clients.
Related MCP Servers
- PythonMIT License
- -security-license-qualityAn MCP server that enables querying detailed address information from Brazilian postal codes (CEPs) via the ViaCEP API, returning data such as street names, neighborhoods, cities, states, regions, and IBGE codes.Last updated -TypeScriptMIT License
- AsecurityFlicenseAqualityProvides MCP access to the BangumiTV API, allowing users to retrieve and interact with anime, manga, music, and game information through natural language queries.Last updated -171Python
- -security-license-qualityAn MCP server that provides country-related data from the REST Countries API, allowing users to query information about countries through natural language.Last updated -TypeScript