Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Date and Time MCP Serverwhat time is it in Tokyo right now?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Date and Time MCP Server
A simple Model Context Protocol (MCP) server that provides date and time functionality, along with example user profile and greeting resources.
Features
Get current date and time in any timezone
Access user profiles by ID
Get personalized greetings
Related MCP server: Time MCP
Installation
Clone this repository
Install dependencies:
Usage
Running the Server
Start the server with:
The server will start on http://127.0.0.1:8001 with the following endpoints:
Tools:
current_datetime(timezone: str): Get current date and time in a specific timezone
Resources:
users://{user_id}/profile: Get a user's profile by IDgreeting://{name}: Get a personalized greeting
Running the Client
Run the example client with:
The client will:
List all available tools
List all available resources
Call the
current_datetimetool with "America/New_York" timezone
Running the LangChain Client Example
This project includes an example of using the MCP server with LangChain, based on the langchain-mcp-adapters repository.
To run the LangChain client example:
First, make sure the MCP server is running:
Set your OpenAI API key as an environment variable:
Run the LangChain client:
The LangChain client demonstrates how to integrate the MCP server with LangChain's agent system, allowing for more complex interactions and reasoning about the available tools.
Cursor Configuration
To use this server with Cursor IDE, you need to configure it in your Cursor settings. Create or update the mcp.json file in your Cursor configuration directory with the following:
This configuration provides two ways to connect to the server:
my-mcp-local-server: Runs the server locally through Pythonmy-mcp-remote-server: Connects to the server running on port 8001
Make sure to replace the paths with your actual Python and server script paths.
Example API Usage
Get Current Time
Get User Profile
Get Greeting
Development
The server is built using FastMCP, which provides a simple way to create MCP-compatible servers. The main components are:
server.py: Contains the server implementation with tools and resourcesclient.py: Example client that demonstrates how to interact with the server
License
MIT