Cover image
Try Now
2025-04-14

Serveur MCP pour le calendrier Google

3 years

Works with Finder

0

Github Watches

0

Github Forks

0

Github Stars

Google Calendar MCP Server

This MCP server provides access to your Google Calendar events and allows you to manage them through an MCP interface. It can be used with Claude Desktop or any other MCP-compatible client.

Requirements

  • Python 3.10 or higher - MCP requires Python 3.10+
  • Google Cloud project with Calendar API enabled
  • OAuth credentials for authentication

Features

  • View calendar events for any date or date range
  • Create new events with title, time, description, location, and attendees
  • Update existing events with new details
  • Pre-built prompts for common calendar actions

Installation

  1. Clone this repository:

    git clone <repository-url>
    cd google-calendar-mcp
    
  2. Create a virtual environment with Python 3.10 or higher:

    # Check your Python version
    python --version
    
    # Create a virtual environment with the correct Python version
    # For Python 3.10
    python3.10 -m venv venv
    # OR for Python 3.11
    python3.11 -m venv venv
    # OR for Python 3.12
    python3.12 -m venv venv
    
    # Activate the virtual environment
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install dependencies using pip:

    pip install -r requirements.txt
    

    Alternatively, you can use uv for faster installation (recommended):

    # Install uv if you don't have it
    curl -fsSL https://astral.sh/uv/install.sh | sh
    # On Windows: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
    
    # Install dependencies with uv
    uv pip install -r requirements.txt
    
  4. Set up Google Calendar API credentials:

    a. Go to the Google Cloud Console b. Create a new project or select an existing one c. Enable the Google Calendar API d. Create OAuth credentials (Desktop client OAuth ID) e. Download the credentials JSON file and save it as credentials.json in the project directory

Usage

Using with Claude Desktop

  1. Install Claude Desktop from the official website

  2. Install the MCP server in Claude Desktop:

    # Make sure you're in the project directory with the virtual environment activated
    mcp install calendar_mcp_server.py
    
  3. Configure Claude Desktop to use the MCP server by editing the Claude Desktop configuration file:

    • Locate the Claude configuration file at /path/to/your/claude_desktop_config.json (Mac) or appropriate location for your OS
    • Add or modify the configuration to include the Google Calendar MCP:
    {
      "Google Calendar": {
        "command": "/path/to/your/venv/bin/mcp",
        "args": [
          "run",
          "/path/to/your/project/calendar_mcp_server.py"
        ]
      }
    }
    
    • Replace /path/to/your/venv/ with the actual path to your virtual environment
    • Replace /path/to/your/project/ with the actual path to your project directory
  4. Verify that the MCP server is running properly:

    • Open Claude Desktop
    • Click on the settings icon (gear) in the bottom left corner
    • Select "Developer" from the settings menu
    • Under "Active MCP Servers", you should see "Google Calendar" listed
    • If the MCP server is running correctly, you'll see a green status indicator
    • If you don't see it listed or it shows an error, ensure that your server is running
  5. You can now use prompts like:

    Show me my events for today
    Create a meeting with John tomorrow at 2pm
    

Using with Cursor

  1. Configure Cursor:

    • Open Cursor.
    • Go to Settings (usually a gear icon or via the Command Palette).
    • Navigate to Cursor Settings > MCP.
    • Click on Add New Global MCP Server.
      • Add or modify the configuration to include the Google Calendar MCP:
      {
      "Google Calendar": {
         "command": "/path/to/your/venv/bin/mcp",
         "args": [
            "run",
            "/path/to/your/project/calendar_mcp_server.py"
         ]
      }
      }
      
      • Replace /path/to/your/venv/ with the actual path to your virtual environment
      • Replace /path/to/your/project/ with the actual path to your project directory
  2. Using in Cursor:

    • Now, when you chat with the AI in Cursor (e.g., using "Agent" mode or similar features that leverage MCP), it should be able to connect to your running Google Calendar MCP server.
    • You can use calendar-related prompts like:
      Show me my events for today
      Create a meeting with John tomorrow at 2pm
      
    • Cursor should route these requests to your local server if the configuration is correct and the server is running.

Run in development mode with the MCP Inspector:

If you're developing or debugging the MCP server, use:

mcp dev calendar_mcp_server.py

This will provide additional debugging information and a web interface for inspecting requests and responses.

Resources

The server exposes the following MCP resources:

  • calendar://events/{date} - Returns events for a specific date

Example usage:

calendar://events/today
calendar://events/tomorrow
calendar://events/2023-07-15

Tools

The server provides the following tools:

  1. list_events(date_start, date_end=None) - List events in a date range
  2. create_event(summary, start_datetime, end_datetime, ...) - Create a new calendar event
  3. update_event(event_id, ...) - Update an existing event

Prompts

Pre-built prompts to simplify common actions:

  1. today_events - Quick access to today's calendar
  2. schedule_meeting - Guided prompt to create a new meeting

Authentication

On first use, the server will open a browser window for Google OAuth authentication. After authorizing the application, your credentials will be stored in token.json for future use.

Troubleshooting

  • Python version issues: This project requires Python 3.10 or higher. If you see errors like No matching distribution found for mcp[cli], check your Python version.
  • Authentication errors: Ensure your credentials.json file is correctly placed and has the right permissions.
  • MCP installation problems: Try using uv instead of pip for a more reliable installation experience.

Notes

  • The server uses UTC for timestamps. Event times are displayed in the local timezone.
  • You need a valid credentials.json file from Google Cloud Console to use this server.
  • Your authentication token is stored in token.json after first login.

相关推荐

  • av
  • Exécutez sans effort LLM Backends, API, Frontends et Services avec une seule commande.

  • 1Panel-dev
  • 🔥 1Panel fournit une interface Web intuitive et un serveur MCP pour gérer des sites Web, des fichiers, des conteneurs, des bases de données et des LLM sur un serveur Linux.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 LLM 资料总结 (数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Résumé des meilleures ressources LLM du monde.

  • rulego
  • ⛓️RULEGO est un cadre de moteur de règle d'orchestration des composants de nouvelle génération légère, intégrée, intégrée et de nouvelle génération pour GO.

  • sigoden
  • Créez facilement des outils et des agents LLM à l'aide de fonctions Plain Bash / JavaScript / Python.

  • hkr04
  • SDK C ++ MCP (Protocole de contexte modèle léger)

  • RockChinQ
  • 😎简单易用、🧩丰富生态 - 大模型原生即时通信机器人平台 | 适配 QQ / 微信 (企业微信、个人微信) / 飞书 / 钉钉 / Discord / Telegram / Slack 等平台 | 支持 Chatgpt 、 Deepseek 、 Dify 、 Claude 、 GEMINI 、 XAI 、 PPIO 、 OLLAMA 、 LM Studio 、阿里云百炼、火山方舟、 Siliconflow 、 Qwen 、 Moonshot 、 ChatGlm 、 Sillytraven 、 MCP 等 LLM 的机器人 / Agent | Plateforme de bots de messagerie instantanée basés sur LLM, prend en charge Discord, Telegram, WeChat, Lark, Dingtalk, QQ, Slack

  • dmayboroda
  • Rag de conversation sur site avec des conteneurs configurables

  • modelscope
  • Commencez à construire des applications multi-agents LLM, plus facilement.

  • paulwing
  • Un référentiel de test créé à l'aide du service MCP

    Reviews

    2.8 (11)
    Avatar
    user_OUdXmPKN
    2025-04-24

    I've been using google-calendar-mcp by surana-mudit for a while now, and it's been fantastic! It integrates seamlessly with my Google Calendar, allowing me to manage events and schedules with ease. It's user-friendly and has made organizing my life much more efficient. Highly recommended for anyone looking for a reliable calendar management tool!

    Avatar
    user_fmoFuapr
    2025-04-24

    The google-calendar-mcp by surana-mudit is a fantastic tool that has transformed the way I manage my schedule. Its seamless integration with Google Calendar makes it incredibly convenient to keep track of appointments and deadlines. Highly recommend for anyone looking to optimize their time management!

    Avatar
    user_mc8qV8bh
    2025-04-24

    I have been using google-calendar-mcp by surana-mudit for a while now, and it has significantly improved my productivity. This comprehensive tool effortlessly syncs my schedules and reminders, ensuring I never miss any important events. The user-friendly interface and seamless integration with Google Calendar make it indispensable. Highly recommended for efficient time management!

    Avatar
    user_3SrDJK9n
    2025-04-24

    I've been using google-calendar-mcp for a while and it has significantly improved my productivity. The integration is seamless, and the user interface is intuitive, making it easy to manage my schedules. Kudos to surana-mudit for creating such a useful tool. Highly recommend!

    Avatar
    user_x3cmWK95
    2025-04-24

    As a dedicated user of the Google Calendar MCP created by Surana Mudit, I must say this tool has significantly streamlined my scheduling process. Its user-friendly interface and seamless integration with Google Calendar make it an indispensable asset for managing events and appointments efficiently. Highly recommend it for anyone needing a reliable calendar management solution!

    Avatar
    user_lUZacUVA
    2025-04-24

    I am absolutely thrilled with google-calendar-mcp! This amazing tool, developed by surana-mudit, has transformed the way I manage my schedule. It's incredibly user-friendly and integrates seamlessly with my existing Google Calendar. Whether I'm planning meetings, setting reminders, or organizing events, everything is now streamlined. Highly recommend to anyone looking for an efficient calendar management solution!

    Avatar
    user_TmW76A8s
    2025-04-24

    As a dedicated user of the Google Calendar MCP by Surana Mudit, I'm genuinely impressed by this product. It seamlessly integrates with my daily schedule, providing efficient and reliable performance. The user interface is intuitive, making it easy to navigate and manage my appointments. I highly recommend this tool to anyone looking to streamline their calendar management.

    Avatar
    user_AdQICR81
    2025-04-24

    As a dedicated user of google-calendar-mcp by Surana Mudit, I am thoroughly impressed. This app seamlessly integrates Google Calendar features into my MCP experience, making scheduling and managing tasks incredibly efficient. The user-friendly interface and smooth performance make it a must-have tool for anyone looking to boost their productivity. Highly recommended!

    Avatar
    user_ui22CQzo
    2025-04-24

    Google Calendar MCP by Surana Mudit is a game-changer for time management! This app seamlessly integrates with Google Calendar, offering enhanced features and a user-friendly interface. I've found it incredibly helpful for organizing my schedule and managing appointments efficiently. Highly recommended for anyone looking to boost productivity!

    Avatar
    user_V11pw83j
    2025-04-24

    As an avid user of the google-calendar-mcp application, I am thoroughly impressed by its seamless integration and user-friendly interface. Built by surana-mudit, this tool has significantly improved my productivity by consolidating all my calendars in one place. Highly recommended for anyone looking to streamline their schedule management!

    Avatar
    user_t5U5TiaZ
    2025-04-24

    I've been using google-calendar-mcp by surana-mudit and it has significantly enhanced my productivity. The integration is seamless and intuitive, making it incredibly easy to manage my schedule. Highly recommended for anyone looking to streamline their calendar management!