Skip to main content

mcp-date-server

An example Python package that implements a Model Context Protocol (MCP) server with a single tool:

  • getTodaysDate: returns today's date in ISO format (YYYY-MM-DD).

This server is implemented using the Python mcp SDK and is suitable for use with MCP-compatible clients.

Project Structure

mcp-date-server/
├── pyproject.toml
├── README.md
└── src/
    └── mcp_date_server/
        ├── __init__.py
        └── server.py
  • pyproject.toml: build configuration and package metadata.
  • src/mcp_date_server/server.py: MCP server implementation and getTodaysDate tool.

Installation (from source)

  1. Clone or copy this project into a directory, then from the project root run:

    python -m venv .venv
    .venv\Scripts\activate  # Windows
    # source .venv/bin/activate  # Linux/macOS
    
    pip install --upgrade pip
    pip install .
    
  2. This installs the mcp-date-server console script into your environment.

You can also build a wheel and install it:

pip install build
python -m build
pip install dist/mcp_date_server-0.1.0-py3-none-any.whl

Usage

Once installed in an activated virtual environment, you can run the MCP server via the console entry point:

mcp-date-server

This starts an MCP server on stdio for an MCP client to connect to.

MCP Client Configuration Example

How you configure this server depends on your MCP-compatible client. As a conceptual example (not specific to any one client), you might register the server with a command like:

{
  "name": "mcp-date-server",
  "command": "mcp-date-server",
  "args": []
}

Refer to your MCP client documentation for the exact configuration format.

The getTodaysDate Tool

The MCP tool is defined in src/mcp_date_server/server.py:

  • Name: getTodaysDate
  • Description: Returns today's date in ISO format YYYY-MM-DD.
  • Return type: string.

Example result value:

"2026-01-28"

Publishing to PyPI

  1. Ensure you have an up-to-date build and twine:

    pip install --upgrade build twine
    
  2. Build the distribution artifacts:

    python -m build
    # Outputs files under the dist/ directory
    
  3. Upload to PyPI (or TestPyPI first):

    # For TestPyPI
    twine upload --repository testpypi dist/*
    
    # For real PyPI
    twine upload dist/*
    
  4. After publishing, users can install it with:

    pip install mcp-date-server
    

Requirements

  • Python 3.9+
  • The mcp Python package (installed automatically via pyproject.toml).

Running Locally Without Installing

For quick local testing without installing as a package:

python -m venv .venv
.venv\Scripts\activate  # Windows
# source .venv/bin/activate  # Linux/macOS

pip install -e .

mcp-date-server

This installs the package in editable mode and exposes the mcp-date-server entry point for development.

Metadata

Release files for mcp-date-server 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-date-server 0.1.0
File Size Uploaded Provenance
mcp_date_server-0.1.0.tar.gz 3.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-date-server 0.1.0
File Interpreter ABI Platform
mcp_date_server-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.1 kB

Release files / mcp_date_server-0.1.0.tar.gz

Download URL mcp_date_server-0.1.0.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ecd7b8a5ef2ab5ce5e5ce567d520495cef005a1bf3e559956cf8e6920d1624d2
BLAKE2b-256 checksum
How to use checksums
7da79cf3ead5ba7130e6e7edc2c50ef0390f374980c49581dca99d11fd957be5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / mcp_date_server-0.1.0-py3-none-any.whl

Download URL mcp_date_server-0.1.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a22fb6b366804d53e312c941da074d9d90dc2ce6560c125929b40bf60f71a62
BLAKE2b-256 checksum
How to use checksums
827f679eefc71243c402ccd238c4e35e985befcba5c24fd5cb767230dd9d9642
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Security for mcp-date-server 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page