Datetime MCP Server
local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
DateTime MCP Server
A MCP (Model Completions Protocol) server that provides datetime functionality along with simple note management.
Overview
This server implements the MCP protocol and offers various datetime-related tools and resources, including:
- Current date and time in different formats
- Date formatting utilities
- Event scheduling prompts
- Simple note management functionality
The server can be used by any MCP client to access date and time information and manage simple notes.
Features
Resources
The server provides the following resources:
datetime://current
- The current date and timedatetime://today
- Today's date in ISO formatdatetime://time
- The current time in 24-hour formatnote://internal/{name}
- User-created notes
Tools
The server provides the following tools:
add-note
- Add a new note with a name and contentget-current-time
- Get the current time in various formats (ISO, readable, Unix timestamp, RFC3339)format-date
- Format a date string according to a specified format pattern
Prompts
The server provides the following prompts:
summarize-notes
- Creates a summary of all notesschedule-event
- Helps schedule an event at a specific time
Installation
- Clone the repository:
- Create a virtual environment:
- Install the dependencies:
Usage
Running the Server
To run the server:
The server will start and listen on stdin/stdout for MCP protocol messages.
Connecting to the Server
You can connect to the server using any MCP client. For example, using the MCP CLI:
Development
Installing Development Dependencies
Running Tests
To run the tests:
Unit Tests
Unit tests verify that individual server functions work correctly:
Integration Tests
Integration tests verify that the server implements the MCP protocol correctly:
Dependency Management
Examples
Using the Server with MCP CLI
List available resources:
Read a datetime resource:
Add a note:
Get the current time in ISO format:
Format a date:
Makefile Tasks
The project includes several Makefile tasks to streamline development:
Building and Publishing
To prepare the package for distribution:
- Sync dependencies and update lockfile:
- Build package distributions:
This will create source and wheel distributions in the dist/
directory.
- Publish to PyPI:
Note: You'll need to set PyPI credentials via environment variables or command flags:
- Token:
--token
orUV_PUBLISH_TOKEN
- Or username/password:
--username
/UV_PUBLISH_USERNAME
and--password
/UV_PUBLISH_PASSWORD
Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm
with this command:
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
License
MIT
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run the tests with
uv run pytest
- Submit a pull request
You must be authenticated.
This server enables users to store, manage, and summarize notes using a custom URI scheme, with functionality to add new notes and generate summaries with varying levels of detail.
- Overview
- Features
- Installation
- Usage
- Development
- Examples
- Makefile Tasks
- Building and Publishing
- Debugging
- License
- Contributing