mcp-thisweek
June 3, 2025 ยท View on GitHub
A simple MCP (Model Context Protocol) server that provides the dates for the current week (Monday to Friday) and today's date.
Features
get_this_week_dates: Returns a list of dates from Monday to Friday of the current week.get_today_date: Returns today's date.
Examples
- "What are the dates for this week from Monday to Friday?"
- "What is today's date?"
Setup
You can set up and run mcp-thisweek using pip and Python, or using Docker.
Using pip and Python
-
Clone the repository:
git clone https://github.com/taku-o/mcp-thisweek.git cd mcp-thisweek -
Install dependencies:
pip install -r requirements.txt -
Configure your MCP client: Add
mcp-thisweekto your MCP client's configuration file (e.g.,mcp.jsonorclaude_desktop_config.json).Replace
/path/to/mcp-thisweek/server.pywith the actual path to theserver.pyscript in themcp-thisweekdirectory. You may also need to replacepythonwith the full path to your Python 3.10+ interpreter if it's not in your system's PATH.{ "mcpServers": { "mcp-thisweek": { "command": "python", "args": [ "/path/to/mcp-thisweek/server.py" ] } } }
Using Docker
Navigate to the root directory of the project (where the Dockerfile and docker-compose.yml are located) and run:
docker-compose up -d --build
This will build the image if it doesn't exist and start the container in detached mode.
To stop and remove the container, run:
docker-compose down
-
Configure your MCP client (for Docker): When using Docker,
fastmcpneeds to communicate with the server running inside the container.FastMCPtypically uses local command execution. To make this work with Docker, you might need a wrapper script or adjust howfastmcpinvokes the server if it needs todocker execinto the container or iffastmcpitself is run inside a Docker network.A common way
fastmcpis used is by specifying a command thatfastmcpcan run. Iffastmcpis running on the host, it cannot directly execute a Python script inside a Docker container withoutdocker exec.For a Dockerized
mcp-server, thecommandinmcp.jsonwould typically bedocker exec -i mcp-thisweek-container python /app/server.py. This assumesfastmcpis running on the host and the container is namedmcp-thisweek-container.The JSON configuration for Docker would look like:
{ "mcpServers": { "mcp-thisweek": { "command": "docker", "args": [ "exec", "-i", "mcp-thisweek-container", "python", "/app/server.py" ] } } }Ensure the container
mcp-thisweek-containeris running.
License
This project is licensed under the MIT License.