Overview
DateTime Tools for Langflow is a custom component designed to provide datetime-related functionalities with timezone support for the Langflow platform.
To use the component, copy the contents of langflow_component.py, open Langflow, create a custom component, paste the code, and save it.
- Get current date and time with timezone support - Get current week number with timezone support - Simple error handling for invalid timezones
- Retrieving the current date and time for different timezones.
- Calculating the week number based on a specific timezone.
- Integrating datetime functionalities into Langflow applications.
Add to your AI client
Use these steps to connect DateTime Tools for Langflow in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"simple-agent-api-tool-natapone": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-simple-agent-api-tool-natapone"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"simple-agent-api-tool-natapone": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-simple-agent-api-tool-natapone"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"simple-agent-api-tool-natapone": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-simple-agent-api-tool-natapone"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"simple-agent-api-tool-natapone": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-simple-agent-api-tool-natapone"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"simple-agent-api-tool-natapone": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-simple-agent-api-tool-natapone"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"simple-agent-api-tool-natapone": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-simple-agent-api-tool-natapone"
]
}
}
}FAQ
What timezones are supported?
The component supports all timezones available in the IANA Time Zone Database.
What happens if I provide an invalid timezone?
An error message will be returned for invalid timezones, and the week number will return -1 for errors.