About simple_mcp_server
simple_mcp_server is a custom Langflow component for date and time operations with timezone support. It provides current date-time and week-number functions, with basic handling for invalid timezones.
Key features
- 01Get current date and time by timezone
- 02Get the current week number
- 03Handle invalid timezone inputs
Use cases
- 01Add timezone-aware time to a Langflow flow
- 02Determine the current week in a timezone
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEDateTime Tools for Langflow
A simple custom component for Langflow that provides datetime-related tools with timezone support.
Features
- Get current date and time with timezone support
- Get current week number with timezone support
- Simple error handling for invalid timezones
Installation
- Copy the contents of
langflow_component.py - Open Langflow
- Click "+ Custom Component"
- Paste the code into the editor
- Click "Check & Save"
Usage
Get Current DateTime
datetime_tools = DateTimeTools()
current_time = datetime_tools.get_current_datetime("America/New_York")
# Returns: "2024-03-20T10:30:00-04:00"
Get Week Number
datetime_tools = DateTimeTools()
week_num = datetime_tools.get_week_number("America/New_York")
# Returns: 12
Timezone Support
The component supports all timezones available in the IANA Time Zone Database. Common timezone identifiers include:
- UTC
- America/New_York
- America/Los_Angeles
- Europe/London
- Asia/Tokyo
- Australia/Sydney
For a complete list of supported timezones, refer to the IANA Time Zone Database.
Error Handling
- Invalid timezones will return an error message
- Week number will return -1 for invalid timezones or errors
Dependencies
The component requires the following Python packages:
- pytz
- datetime (built-in)
Make sure these are installed in your Langflow environment.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.