MCP ExplorerExplorer

Zipcode Search Mcp

@rooking-osson 11 days ago
3 MIT
FreeCommunity
AI Systems
MCP server for Japanese postal code to address lookup, fast and reliable.

Overview

What is Zipcode Search Mcp

zipcode-search-mcp is a Model Context Protocol (MCP) server designed to provide functionality for looking up Japanese postal codes and their corresponding addresses. It can be integrated with AI assistants and other MCP clients to enable postal code search capabilities.

Use cases

Use cases for zipcode-search-mcp include integrating with AI assistants to provide users with address information based on postal codes, enhancing customer service applications that require address validation, and supporting logistics platforms that need to verify delivery addresses.

How to use

To use zipcode-search-mcp, clone the repository from GitHub, install the required dependencies using either ‘uv’ or ‘pip’, and run the server using the command ‘uv run python main.py’. Configuration for MCP clients is also provided in the README.

Key features

Key features of zipcode-search-mcp include the ability to search Japanese addresses by 7-digit postal codes, compatibility with the Model Context Protocol (MCP), a fast and lightweight implementation, reliance on the reliable Zipcloud API for data, and built-in error handling and validation.

Where to use

zipcode-search-mcp can be used in various fields such as logistics, e-commerce, and customer service, where accurate address lookup is essential for operations involving shipping and delivery.

Content

Zipcode Search MCP Server

License: MIT
Python 3.10+

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

  1. Clone the repository:
git clone https://github.com/rooking-oss/zipcode-search-mcp.git
cd zipcode-search-mcp
  1. Install dependencies using uv:
uv sync

Or with pip:

pip install -e .
  1. Run the MCP server:
uv run python main.py

MCP Client Configuration

Claude Desktop

Add the following configuration to your claude_desktop_config.json:

{
  "mcpServers": {
    "zipcode-search": {
      "command": "uv",
      "args": [
        "run",
        "python",
        "/path/to/zipcode-search-mcp/main.py"
      ]
    }
  }
}

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):

What's the address for postal code 1000001?

Or directly:

Use the search_zipcode tool to find the address for postal code 1600020

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

zipcode-search-mcp/
├── main.py              # MCP server implementation
├── pyproject.toml       # Project configuration and dependencies
├── uv.lock             # Dependency lock file
├── .mcp.json           # MCP client configuration
├── .python-version     # Python version specification
├── .gitignore          # Git ignore rules
└── README.md           # This file

Development Setup

  1. Clone and install in development mode:
git clone https://github.com/rooking-oss/zipcode-search-mcp.git
cd zipcode-search-mcp
uv sync
  1. Run tests (if available):
uv run pytest
  1. Format code:
uv run black .
uv run isort .

Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests if applicable
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Dependencies

External Services

  • Zipcloud API - Provides postal code to address mapping data

Python Packages

  • mcp[cli] - Model Context Protocol implementation
  • httpx - Async HTTP client for API requests

Troubleshooting

Server Won’t Start

  1. Verify Python version is 3.10+:
python --version
  1. Ensure dependencies are installed:
uv sync
  1. Check if the server starts manually:
uv run python main.py

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

Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue with detailed information
  3. 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.

Tools

No tools

Comments