Convert Google Calendar and generate custom prompts with cal2prompt's experimental CLI tool
cal2prompt is an innovative command-line tool designed to fetch schedules from Google Calendar and convert them into custom prompts or text snippets using a template engine. It can run as both a CLI application and an experimental MCP (Model Context Protocol) server, providing a versatile solution for integrating AI applications with specific data sources. The cal2prompt MCP Server leverages the robust features of the Rust ecosystem to ensure high-speed processing and flexibility in prompt customization. This document provides comprehensive documentation on setting up and utilizing cal2prompt as an MCP server.
cal2prompt offers a range of powerful features, including Google Calendar integration, flexible custom prompt generation using Jinja2 template engine, and experimental support for running as an MCP server. These capabilities enable seamless communication between AI applications like Claude Desktop, Continue, and Cursor through the standardized Model Context Protocol (MCP).
cal2prompt fetches events from your Google Calendar by utilizing the Google API v3. This ensures that you can leverage detailed scheduling information to tailor prompts specifically for the tasks at hand.
With cal2prompt, users have full control over how their schedule is presented through customizable templates written in Jinja2. This feature allows for dynamic and context-aware prompt generation, enhancing AI application workflows by providing relevant information when needed.
For developers looking to integrate cal2prompt with existing or new AI tools, the experimental MCP support provides a bridge between these applications and Google Calendar data. By running as an MCP server, users can fetch schedule-driven prompts and events, allowing for more personalized and context-aware interactions.
The cal2prompt MCP Server is designed with the Model Context Protocol in mind, ensuring compatibility with a range of AI tools through standardized communication protocols. The core architecture of the server includes:
cal2prompt authenticates users via OAuth 2.0 to fetch data from Google Calendar securely. This process involves generating temporary tokens that are stored locally for subsequent use.
Once authenticated, cal2prompt retrieves events based on user-specified time ranges or predefined intervals (e.g., today, this week). These events are then processed and formatted using the Jinja2 template engine according to the user’s configuration.
The MCP protocol is implemented by ensuring that requests from AI applications result in appropriate responses containing necessary schedule data. This data can be used directly by AI tools for generating prompts, planning tasks, or other context-aware interactions.
brew install shuntaka9576/tap/cal2prompt
git clone https://github.com/shuntaka9576/cal2prompt
cd cal2prompt
cargo install --path .
Personal Assistant Integration: Integrate cal2prompt with Claude Desktop or Continue to receive context-aware task prompts based on your calendar schedule.
Project Management Tool Enhancement: Use the generated prompts from cal2prompt within tools like Slack, Notion, or Trello for more organized project planning and execution.
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
MCP Client | Resources | Tools | Prompts |
---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ |
Continue | ✅ | ✅ | ✅ |
Cursor | ❌ | ✅ | ❌ |
cal2prompt is designed to handle a wide range of use cases with ease. The following table outlines the performance and compatibility matrix for various AI applications:
Feature | Claude Desktop | Continue | Cursor |
---|---|---|---|
Prompt Generation Speed | High | High | Medium |
Calendar API Integration | ✔ | ✔ | ✔ |
Template Engine Support | Full | Partial | Limited |
cal2prompt
Follow the on-screen instructions to set up your own OAuth2.0 client and generate necessary tokens.
After setting up, define parameters such as time ranges, calendar IDs, and Jinja2 templates in config.lua
or .env
.
{
"mcpServers": {
"cal2prompt": {
"command": "cal2prompt",
"args": ["--token-file=token.json"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
Q: Can cal2prompt be used with multiple calendar accounts?
Q: How do I ensure secure authentication for my Google Calendar data?
Q: What happens if my AI application is not compatible with MCP protocol currently?
Q: Is there a way to customize the performance of cal2prompt for specific use cases?
Q: Can I run multiple instances of cal2prompt simultaneously?
To contribute to the development of cal2prompt as an MCP server:
Clone the Repository:
git clone https://github.com/shuntaka9576/cal2prompt.git
Set Up Environment:
cargo build
followed by cargo test
.Contribute Code: Open an issue or pull request on GitHub.
Explore the broader MCP ecosystem with other compatible tools and resources:
Tool / Resource | Description |
---|---|
ModelContextProtocol.org | Official documentation for the MCP protocol. |
JetBrains AI Integration | Integrating AI tools with JetBrains IDEs using MCP. |
OpenAI API Docs | Comprehensive guide to API integrations with various AI applications. |
By following this comprehensive guide, developers can successfully integrate cal2prompt as an MCP server into their AI workflows, enhancing productivity and context-awareness for both personal and professional tasks.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods