This Python tool provides the current date, time, and your approximate geographic location using your public IP address. It is designed to be used as a Model Context Protocol (MCP) tool with Anthropic's Claude desktop app.
MCP is a protocol introduced by Anthropic to allow Claude and other AI models to interact with external tools and scripts. By implementing the MCP interface, your tool can be called by Claude to perform actions or fetch data, with communication typically happening over standard input/output (stdio).
-
Get Current Date and Time
Returns the current system date and time in a friendly format. -
Get My Location
Uses your public IP address to estimate your city, region, country, and coordinates.
-
Download or Clone this Repository
Placedateclaude.pyin a folder on your computer. -
Install Dependencies
Open a terminal in the project folder and run:pip install aiohttp mcp
Start the tool so it listens for MCP requests from Claude:
python dateclaude.pyThe script will wait for requests from Claude via stdio.
-
Open Claude Desktop App
Ensure you have the latest version installed. -
Go to the "Tools" or "MCP Plugins" Section
(This may be called "Add Tool", "Manage MCP Tools", or similar.) -
Add a New MCP Tool
- Choose to add a local MCP tool.
- Enter the full path to your
dateclaude.pyfile, for example:python /path/to/dateclaude.py - Set the protocol/transport to
stdioif prompted.
-
Save and Enable the Tool
Claude should now detect the following tools:get_current_datetimeget_my_location
-
Use the Tools in Claude
You can now ask Claude to get the current date/time or your location, and it will use your local MCP tool.
-
Permission Errors:
Ensure Python and the required packages are installed and accessible from your terminal. -
Network Issues:
The location tool uses the free ipinfo.io API. If you have no internet connection or a firewall blocks the request, location lookup will fail. -
Claude App Not Detecting Tool:
Double-check the path and ensure the script is running. Refer to the Claude app's documentation for MCP tool integration.
Author: Pranesh S
Contact: praneshmadhan646@gmail.com