MCP Services: Geolocation & Tokyo Time
This repository contains two MCP (Model Context Protocol) services:
- Geolocation Service - Provides location information based on server's public IP
- Tokyo Time Service - Returns current date/time in Tokyo with Japanese formatting
Services
1. Geolocation Service (remote_mcp.py)
Provides geolocation information based on the server's public IP address.
Features:
- Returns current geolocation (city, region, country, latitude, longitude)
- Built with FastMCP
- Rate limiting and timeout configuration
- Ready to deploy on Render
MCP Tool: get_current_geolocation()
2. Tokyo Time Service (time_mcp.py)
Returns the current date and time in Tokyo with Japanese date formatting.
Features:
- Tokyo timezone (JST: UTC+9)
- Japanese era support (令和/平成)
- Japanese date format:
令和6年5月17日 (金) - Japanese time format:
15時30分45秒 - Includes weekday names in Japanese
- Returns both Japanese and ISO formats
MCP Tool: get_time()
Deployment Options
Deploy Geolocation Service
Use the default render.yaml file which is configured for the geolocation service:
services:
- type: web
name: geolocation-mcp
runtime: python
buildCommand: pip install -r requirements.txt
startCommand: python remote_mcp.py
Deploy Tokyo Time Service
To deploy the Tokyo Time service instead, update render.yaml:
services:
- type: web
name: tokyo-time-mcp
runtime: python
buildCommand: pip install -r requirements.txt
startCommand: python time_mcp.py
Or create a separate render-time.yaml file with the Tokyo Time configuration.
Environment Variables
Configure these in your Render dashboard or render.yaml:
LOG_LEVEL: Logging level (default: INFO)PORT: Server port (default: 8000)HOST: Server host (default: 0.0.0.0)
Geolocation-specific Variables
REQUEST_TIMEOUT: API request timeout in seconds (default: 10)RATE_LIMIT_DELAY: Delay between API requests in seconds (default: 1.0)GEOLOCATION_API_URL: Geolocation API endpoint (default: http://ip-api.com/json/)
Local Development
-
Install dependencies:
pip install -r requirements.txt -
Run either service:
# For geolocation service python remote_mcp.py # For Tokyo time service python time_mcp.py
The server will start on http://localhost:8000 by default.
Switching Between Services
To switch which service is deployed on Render:
- Update the
startCommandinrender.yamlto use the desired Python file - Commit and push the changes
- Render will automatically redeploy with the new service
Claude App Integration
Once deployed on Render, you can add your MCP service to Claude App by providing the service URL.
Response Examples
Geolocation Service Response
{
"city": "San Francisco",
"region": "California",
"country": "United States",
"latitude": 37.7749,
"longitude": -122.4194,
"ip_address": "xxx.xxx.xxx.xxx"
}
Tokyo Time Service Response
{
"japanese_date": "令和6年5月17日 (金)",
"japanese_time": "15時30分45秒",
"full_japanese": "令和6年5月17日 (金) 15時30分45秒",
"iso_format": "2024-05-17T15:30:45+09:00",
"timestamp": 1715928645.123456,
"timezone": "JST (UTC+9)",
"weekday": "金",
"era": {
"name": "令和",
"year": 6
}
}
