- Explore MCP Servers
- MCP_CSharp_Sample_TimeIrCrawler_Mcp
Mcp Csharp Sample Timeircrawler Mcp
What is Mcp Csharp Sample Timeircrawler Mcp
MCP_CSharp_Sample_TimeIrCrawler_Mcp is a .NET application designed to crawl time.ir for retrieving current time, date information across multiple calendar systems (Shamsi, Hijri, and Gregorian), as well as events and holidays from the Persian calendar.
Use cases
Use cases include integrating with AI assistants to provide real-time date and time information, developing educational tools that teach about different calendar systems, and creating applications that need to display Persian calendar events.
How to use
To use MCP_CSharp_Sample_TimeIrCrawler_Mcp, clone the repository, build the project using the .NET SDK, and run the application. Ensure that the MCP configuration is set up correctly in the mcp.json file to integrate with the Model Context Protocol.
Key features
Key features include fetching current time data, retrieving dates in various calendar formats, obtaining events and holidays for the current month, and a fallback mechanism that uses system time when web crawling fails.
Where to use
MCP_CSharp_Sample_TimeIrCrawler_Mcp can be used in applications requiring accurate time and date information, particularly in contexts where Persian calendar events are relevant, such as cultural applications, scheduling tools, and educational platforms.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Csharp Sample Timeircrawler Mcp
MCP_CSharp_Sample_TimeIrCrawler_Mcp is a .NET application designed to crawl time.ir for retrieving current time, date information across multiple calendar systems (Shamsi, Hijri, and Gregorian), as well as events and holidays from the Persian calendar.
Use cases
Use cases include integrating with AI assistants to provide real-time date and time information, developing educational tools that teach about different calendar systems, and creating applications that need to display Persian calendar events.
How to use
To use MCP_CSharp_Sample_TimeIrCrawler_Mcp, clone the repository, build the project using the .NET SDK, and run the application. Ensure that the MCP configuration is set up correctly in the mcp.json file to integrate with the Model Context Protocol.
Key features
Key features include fetching current time data, retrieving dates in various calendar formats, obtaining events and holidays for the current month, and a fallback mechanism that uses system time when web crawling fails.
Where to use
MCP_CSharp_Sample_TimeIrCrawler_Mcp can be used in applications requiring accurate time and date information, particularly in contexts where Persian calendar events are relevant, such as cultural applications, scheduling tools, and educational platforms.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
TimeCrawler
A .NET application that crawls time.ir to retrieve current time, date information (Shamsi, Hijri, and Gregorian calendars), and events/holidays from the Persian calendar.
Features
- Retrieves current time data from time.ir:
- Current time (HH:MM:SS)
- Current date in Persian/Shamsi calendar
- Corresponding Hijri date
- Corresponding Gregorian date
- Fetches events and holidays for the current month
- Implements Model Context Protocol (MCP) server for integration with AI assistants
- Fallback mechanism using system time when web crawling fails
Technology Stack
- .NET 9.0
- Selenium WebDriver for web scraping
- ChromeDriver for headless browser automation
- Model Context Protocol (MCP) for AI integration
- Microsoft Extensions for dependency injection and logging
Prerequisites
- .NET 9.0 SDK
- Chrome browser (for ChromeDriver)
Getting Started
Installation
-
Clone the repository:
git clone [repository-url] cd TimeCrawler -
Build the project:
dotnet build -
Run the application:
dotnet run
Configuration
MCP Configuration
To integrate with Model Context Protocol, add the following configuration to your mcp.json file:
Make sure to update the path to the DLL file according to your environment.
API Reference
The application exposes two main API endpoints through the MCP server:
Get Current Time Data
Retrieves the current time and date information in multiple calendar formats.
GetCurrentTimeData()
Returns:
CurrentTime: Current time in HH:MM:SS formatCurrentDate: Current date in Persian/Shamsi calendarHijriDate: Corresponding date in Hijri calendarGregorianDate: Corresponding date in Gregorian calendar
Get Events Data
Retrieves events and holidays for the current month.
GetEventsDataAsync()
Returns a list of events, each containing:
Date: The date of the eventTitle: The title or description of the eventExtra: Additional information (if available)
Architecture
- Models: Data structures for time and event information
- Interfaces: Contract for TimeIrCrawler service
- Services: Implementation of the crawler using Selenium WebDriver
- Tools: MCP tool definitions for exposing functionality to AI assistants
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










