Google Calendar MCP Server
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
Enables accessing and managing Google Calendar events with tools for listing calendar events, creating new events, and deleting events including duplicate detection.
Requires Google Cloud Console project with Google Calendar API enabled for authentication via OAuth 2.0, managing credentials and automatic token renewal.
Google Calendar MCP Server - คู่มือการติดตั้งและการใช้งาน
📘 ภาพรวม
Model Context Protocol (MCP) server ที่ให้บริการเข้าถึง Google Calendar API พร้อมรองรับการทำงานแบบ asynchronous operations ช่วยให้การจัดการปฏิทินมีประสิทธิภาพผ่านอินเตอร์เฟซที่เป็นมาตรฐาน
🚀 คุณสมบัติหลัก
- เชื่อมต่อกับ Google Calendar API แบบไร้รอยต่อ
- รองรับการทำงานแบบ asynchronous สำหรับประสิทธิภาพสูงสุด
- ระบบ authentication แบบ OAuth 2.0 พร้อมการต่ออายุโทเค็นอัตโนมัติ
- การจัดการข้อผิดพลาดและการล็อกแบบครอบคลุม
- อินเทอร์เฟซ MCP ที่เรียบง่ายสำหรับการใช้งานกับ Claude และ AI อื่นๆ
🔑 เครื่องมือ API
เครื่องมือ | คำอธิบาย |
---|---|
list | ดึงรายการกิจกรรมในปฏิทิน (2 ปีย้อนหลังถึง 1 ปีล่วงหน้า) |
create-event | สร้างกิจกรรมใหม่ในปฏิทิน |
delete-duplicates | ลบกิจกรรมที่ซ้ำกัน |
delete-event | ลบกิจกรรมที่ระบุ |
🛠️ การติดตั้ง
สิ่งที่ต้องมีก่อน
- Python 3.9 หรือสูงกว่า
- การเชื่อมต่ออินเทอร์เน็ต
- โปรเจกต์ Google Cloud Console ที่มี Google Calendar API เปิดใช้งาน
ขั้นตอนการติดตั้ง
- โคลนโปรเจกต์Copy
- สร้างสภาพแวดล้อมเสมือน (วิธีที่แนะนำ)Copy
- ติดตั้งแพ็คเกจที่จำเป็นCopy
- เตรียมโฟลเดอร์ที่จำเป็นCopy
การตั้งค่า Authentication
- สร้างโปรเจกต์ Google Cloud Console
- ไปที่ Google Cloud Console
- สร้างโปรเจกต์ใหม่
- เปิดใช้งาน Google Calendar API
- สร้าง OAuth 2.0 Client ID
- ดาวน์โหลด credentials.json ไปที่โฟลเดอร์ credentials/
- สร้างโทเค็นCopy
- ทำตามขั้นตอนในเบราว์เซอร์เพื่อให้สิทธิ์การเข้าถึง
- โทเค็นจะถูกบันทึกในโฟลเดอร์ credentials/ เป็น token.json
⚙️ การกำหนดค่าเทคนิค
การกำหนดค่า MCP Server
เพิ่มในไฟล์ claude_desktop_config.json
:
แทนที่ตัวยึดตำแหน่ง:
YOUR_PYTHON_PATH
: พาธไปยัง Python interpreter (จาก venv หรือ conda)YOUR_PATH
: พาธเต็มไปยังโฟลเดอร์ที่โคลน
โครงสร้างโปรเจกต์
📋 การใช้งาน
การเริ่มใช้งานเซิร์ฟเวอร์
- เริ่มเซิร์ฟเวอร์ด้วยตนเองCopy
- การใช้งานกับ Claude Desktop
- กำหนดค่าตามที่อธิบายในส่วนการกำหนดค่าข้างต้น
- Claude จะเริ่มใช้งานเซิร์ฟเวอร์โดยอัตโนมัติเมื่อจำเป็น
ตัวอย่างคำสั่ง
- ดูรายการกิจกรรมในปฏิทินCopy
- สร้างกิจกรรมใหม่Copy
- ลบกิจกรรมที่ซ้ำกันCopy
🔍 การแก้ไขปัญหา
ปัญหาการรับรองความถูกต้อง
- ตรวจสอบว่าไฟล์ credentials.json และ token.json อยู่ในโฟลเดอร์ credentials/
- ลบ token.json และสร้างใหม่โดยใช้ create_token.py
ปัญหาเกี่ยวกับเขตเวลา
- ตรวจสอบว่าไลบรารี timezone ถูกติดตั้งแล้ว:Copy
การตรวจสอบล็อก
- ดูไฟล์ล็อกเพื่อรับข้อมูลเพิ่มเติมเกี่ยวกับข้อผิดพลาด:Copy
📚 การพึ่งพา
- google-auth-oauthlib==1.0.0
- google-auth-httplib2==0.1.0
- google-api-python-client==2.108.0
- aiohttp==3.8.5
- asyncio==3.4.3
- pytz==2023.3
- tzdata==2023.3
📄 ใบอนุญาต
โปรเจกต์นี้มีใบอนุญาตภายใต้ MIT License ดูไฟล์ LICENSE สำหรับรายละเอียด "# py-mcp-gcalendar"
This server cannot be installed
Model Context Protocol server that provides seamless access to Google Calendar API with asynchronous operation support, enabling efficient calendar management through a standardized interface.