iflow-mcp_rsc1102-google_calendar_mcp 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- iflow_mcp_rsc1102_google_calendar_mcp-0.1.0/.gitignore +18 -0
- iflow_mcp_rsc1102_google_calendar_mcp-0.1.0/.python-version +1 -0
- iflow_mcp_rsc1102_google_calendar_mcp-0.1.0/3473_process.log +4 -0
- iflow_mcp_rsc1102_google_calendar_mcp-0.1.0/PKG-INFO +107 -0
- iflow_mcp_rsc1102_google_calendar_mcp-0.1.0/README.md +96 -0
- iflow_mcp_rsc1102_google_calendar_mcp-0.1.0/calendar_mcp.py +131 -0
- iflow_mcp_rsc1102_google_calendar_mcp-0.1.0/language.json +1 -0
- iflow_mcp_rsc1102_google_calendar_mcp-0.1.0/package_name +1 -0
- iflow_mcp_rsc1102_google_calendar_mcp-0.1.0/push_info.json +5 -0
- iflow_mcp_rsc1102_google_calendar_mcp-0.1.0/pyproject.toml +22 -0
- iflow_mcp_rsc1102_google_calendar_mcp-0.1.0/services.py +309 -0
- iflow_mcp_rsc1102_google_calendar_mcp-0.1.0/uv.lock +604 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
[2026-02-06 15:11:32] [SUCCESS] 步骤1: 获取项目 - fork和克隆成功
|
|
2
|
+
[2026-02-06 15:11:32] [SUCCESS] 步骤2: 阅读代码 - Python项目,使用FastMCP,支持stdio协议
|
|
3
|
+
[2026-02-06 15:13:02] [SUCCESS] 步骤3: 本地测试 - 构建和测试成功,获取到4个工具:list_events, create_event, delete_event, update_event
|
|
4
|
+
[2026-02-06 15:13:12] [SUCCESS] 步骤4: 推送iflow分支 - 成功推送到远程仓库
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: iflow-mcp_rsc1102-google_calendar_mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: An MCP server to interact with Google Calendar
|
|
5
|
+
Requires-Python: >=3.11
|
|
6
|
+
Requires-Dist: google-api-python-client>=2.166.0
|
|
7
|
+
Requires-Dist: google-auth-oauthlib>=1.2.1
|
|
8
|
+
Requires-Dist: google-auth>=2.38.0
|
|
9
|
+
Requires-Dist: mcp[cli]>=1.6.0
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
|
|
12
|
+
# Google Calendar MCP Server  
|
|
13
|
+
|
|
14
|
+
This repository provides a Model Context Protocol (MCP) server that integrates with the Google Calendar API. It allows users to list, create, delete, and update calendar events. The server is designed to work with Anthropic's Claude Desktop as an MCP client.
|
|
15
|
+
|
|
16
|
+
## 🚀 Features
|
|
17
|
+
- Interact with Google Calendar: list, add, delete, and update events
|
|
18
|
+
- Seamless integration with Claude Desktop via MCP
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 🧰 Prerequisites
|
|
23
|
+
- A Google Account
|
|
24
|
+
- [Anthropic Claude Desktop](https://claude.ai/download)
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 📦 Installation
|
|
29
|
+
|
|
30
|
+
1. **Install UV Package Manager:**
|
|
31
|
+
Follow the instructions on the [official UV installation guide](https://docs.astral.sh/uv/getting-started/installation/#installation-methods).
|
|
32
|
+
|
|
33
|
+
2. **Clone the Repository and Set Up Environment:**
|
|
34
|
+
```bash
|
|
35
|
+
git clone https://github.com/rsc1102/Google_Calendar_MCP.git
|
|
36
|
+
cd Google_Calendar_MCP
|
|
37
|
+
uv sync
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
3. **Create Google Cloud Credentials:**
|
|
41
|
+
- Visit [Google Cloud Console](https://console.cloud.google.com/).
|
|
42
|
+
- Create a new project or select an existing one.
|
|
43
|
+
- Enable the **Google Calendar API**.
|
|
44
|
+
- Navigate to **APIs & Services > Credentials**.
|
|
45
|
+
- Click **Create Credentials > OAuth Client ID**:
|
|
46
|
+
- Choose **Desktop app** as the application type.
|
|
47
|
+
- Download the generated `credentials.json` file.
|
|
48
|
+
- Place `credentials.json` inside the `Google_Calendar_MCP` directory.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## 🔌 Integration with Claude Desktop
|
|
53
|
+
|
|
54
|
+
1. **Locate Configuration File:**
|
|
55
|
+
Open the `claude_desktop_config.json` file on your system:
|
|
56
|
+
|
|
57
|
+
**Linux/macOS:**
|
|
58
|
+
```bash
|
|
59
|
+
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Windows (PowerShell):**
|
|
63
|
+
```bash
|
|
64
|
+
code $env:AppData\Claude\claude_desktop_config.json
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
2. **Add MCP Server Configuration:**
|
|
68
|
+
Add the following to the `mcpServers` section:
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"mcpServers": {
|
|
72
|
+
"calendar": {
|
|
73
|
+
"command": "uv",
|
|
74
|
+
"args": [
|
|
75
|
+
"--directory",
|
|
76
|
+
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/Google_Calendar_MCP",
|
|
77
|
+
"run",
|
|
78
|
+
"calendar_mcp.py"
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
3. **Restart Claude Desktop.**
|
|
86
|
+
|
|
87
|
+
4. **Create a New Project in Claude Desktop.**
|
|
88
|
+
|
|
89
|
+
5. **Set Timezone:**
|
|
90
|
+
In the project's knowledge section, define your local timezone using the IANA Time Zone format (e.g., `timeZone="America/New_York"`).
|
|
91
|
+
|
|
92
|
+
6. **Start Chatting:**
|
|
93
|
+
Begin interacting with Claude to manage your Google Calendar events.
|
|
94
|
+
**Note:** When using the server for the first time, Google will prompt you to authenticate and grant permission to access your calendar.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
## 🎬 In Action
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
https://github.com/user-attachments/assets/75da4943-15c4-4ec2-bc5d-af4af3509031
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## 📬 Support
|
|
107
|
+
For issues or questions, please open an issue in this repository.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Google Calendar MCP Server  
|
|
2
|
+
|
|
3
|
+
This repository provides a Model Context Protocol (MCP) server that integrates with the Google Calendar API. It allows users to list, create, delete, and update calendar events. The server is designed to work with Anthropic's Claude Desktop as an MCP client.
|
|
4
|
+
|
|
5
|
+
## 🚀 Features
|
|
6
|
+
- Interact with Google Calendar: list, add, delete, and update events
|
|
7
|
+
- Seamless integration with Claude Desktop via MCP
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 🧰 Prerequisites
|
|
12
|
+
- A Google Account
|
|
13
|
+
- [Anthropic Claude Desktop](https://claude.ai/download)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 📦 Installation
|
|
18
|
+
|
|
19
|
+
1. **Install UV Package Manager:**
|
|
20
|
+
Follow the instructions on the [official UV installation guide](https://docs.astral.sh/uv/getting-started/installation/#installation-methods).
|
|
21
|
+
|
|
22
|
+
2. **Clone the Repository and Set Up Environment:**
|
|
23
|
+
```bash
|
|
24
|
+
git clone https://github.com/rsc1102/Google_Calendar_MCP.git
|
|
25
|
+
cd Google_Calendar_MCP
|
|
26
|
+
uv sync
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
3. **Create Google Cloud Credentials:**
|
|
30
|
+
- Visit [Google Cloud Console](https://console.cloud.google.com/).
|
|
31
|
+
- Create a new project or select an existing one.
|
|
32
|
+
- Enable the **Google Calendar API**.
|
|
33
|
+
- Navigate to **APIs & Services > Credentials**.
|
|
34
|
+
- Click **Create Credentials > OAuth Client ID**:
|
|
35
|
+
- Choose **Desktop app** as the application type.
|
|
36
|
+
- Download the generated `credentials.json` file.
|
|
37
|
+
- Place `credentials.json` inside the `Google_Calendar_MCP` directory.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 🔌 Integration with Claude Desktop
|
|
42
|
+
|
|
43
|
+
1. **Locate Configuration File:**
|
|
44
|
+
Open the `claude_desktop_config.json` file on your system:
|
|
45
|
+
|
|
46
|
+
**Linux/macOS:**
|
|
47
|
+
```bash
|
|
48
|
+
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Windows (PowerShell):**
|
|
52
|
+
```bash
|
|
53
|
+
code $env:AppData\Claude\claude_desktop_config.json
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
2. **Add MCP Server Configuration:**
|
|
57
|
+
Add the following to the `mcpServers` section:
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"mcpServers": {
|
|
61
|
+
"calendar": {
|
|
62
|
+
"command": "uv",
|
|
63
|
+
"args": [
|
|
64
|
+
"--directory",
|
|
65
|
+
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/Google_Calendar_MCP",
|
|
66
|
+
"run",
|
|
67
|
+
"calendar_mcp.py"
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
3. **Restart Claude Desktop.**
|
|
75
|
+
|
|
76
|
+
4. **Create a New Project in Claude Desktop.**
|
|
77
|
+
|
|
78
|
+
5. **Set Timezone:**
|
|
79
|
+
In the project's knowledge section, define your local timezone using the IANA Time Zone format (e.g., `timeZone="America/New_York"`).
|
|
80
|
+
|
|
81
|
+
6. **Start Chatting:**
|
|
82
|
+
Begin interacting with Claude to manage your Google Calendar events.
|
|
83
|
+
**Note:** When using the server for the first time, Google will prompt you to authenticate and grant permission to access your calendar.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
## 🎬 In Action
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
https://github.com/user-attachments/assets/75da4943-15c4-4ec2-bc5d-af4af3509031
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 📬 Support
|
|
96
|
+
For issues or questions, please open an issue in this repository.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
from mcp.server.fastmcp import FastMCP
|
|
2
|
+
import services
|
|
3
|
+
|
|
4
|
+
# Initialize FastMCP server
|
|
5
|
+
mcp = FastMCP("calendar")
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@mcp.tool()
|
|
9
|
+
async def list_events(
|
|
10
|
+
summary: str | None = None,
|
|
11
|
+
description: str | None = None,
|
|
12
|
+
location: str | None = None,
|
|
13
|
+
timeMin: str | None = None,
|
|
14
|
+
timeMax: str | None = None,
|
|
15
|
+
maxResults: int = 10,
|
|
16
|
+
) -> str:
|
|
17
|
+
"""
|
|
18
|
+
Retrieve a list of calendar events based on specified filters.
|
|
19
|
+
|
|
20
|
+
This function queries the calendar for events that match the given criteria.
|
|
21
|
+
All filter parameters are optional and can be used in combination to narrow
|
|
22
|
+
down the results.
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
summary (str, optional): Filter events by their summary (title or subject).
|
|
26
|
+
description (str, optional): Filter events by text found in the event description.
|
|
27
|
+
location (str, optional): Filter events based on their location.
|
|
28
|
+
timeMin (str, optional): ISO 8601 formatted lower time bound (exclusive)
|
|
29
|
+
for filtering events by end time. Must be in local time and have timezone offset.
|
|
30
|
+
timeMax (str, optional): ISO 8601 formatted upper time bound (exclusive)
|
|
31
|
+
for filtering events by start time. Must be in local time and have timezone offset.
|
|
32
|
+
maxResults (int, optional): Maximum number of events to return.
|
|
33
|
+
|
|
34
|
+
Returns:
|
|
35
|
+
list: A list of event objects that match the provided filters.
|
|
36
|
+
"""
|
|
37
|
+
return await services.list_events(
|
|
38
|
+
summary=summary,
|
|
39
|
+
description=description,
|
|
40
|
+
location=location,
|
|
41
|
+
timeMin=timeMin,
|
|
42
|
+
timeMax=timeMax,
|
|
43
|
+
maxResults=maxResults,
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@mcp.tool()
|
|
48
|
+
async def create_event(
|
|
49
|
+
start: str,
|
|
50
|
+
end: str,
|
|
51
|
+
timeZone: str,
|
|
52
|
+
summary: str,
|
|
53
|
+
description: str | None = None,
|
|
54
|
+
location: str | None = None,
|
|
55
|
+
) -> str:
|
|
56
|
+
"""
|
|
57
|
+
Creates a calendar event using the provided details.
|
|
58
|
+
|
|
59
|
+
Args:
|
|
60
|
+
start (str): Event start time in ISO 8601 format (e.g., '2025-04-06T10:00:00-07:00').
|
|
61
|
+
end (str): Event end time in ISO 8601 format (e.g., '2025-04-06T11:00:00-07:00').
|
|
62
|
+
timeZone (str): User timezone formatted as an IANA Time Zone Database name (e.g. "Europe/Zurich").
|
|
63
|
+
summary (str): Short title or subject of the event.
|
|
64
|
+
description (str, optional): Detailed description or notes for the event. Defaults to None.
|
|
65
|
+
location (str, optional): Physical or virtual location of the event. Defaults to None.
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
return await services.create_event(
|
|
69
|
+
start=start,
|
|
70
|
+
end=end,
|
|
71
|
+
timeZone=timeZone,
|
|
72
|
+
summary=summary,
|
|
73
|
+
description=description,
|
|
74
|
+
location=location,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
@mcp.tool()
|
|
79
|
+
async def delete_event(event_id: str):
|
|
80
|
+
"""
|
|
81
|
+
Deletes an event from the calender.
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
event_id: Event identifier.
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
return await services.delete_event(event_id=event_id)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
@mcp.tool()
|
|
91
|
+
async def update_event(
|
|
92
|
+
event_id: str,
|
|
93
|
+
start: str | None = None,
|
|
94
|
+
end: str | None = None,
|
|
95
|
+
timeZone: str | None = None,
|
|
96
|
+
summary: str | None = None,
|
|
97
|
+
description: str | None = None,
|
|
98
|
+
location: str | None = None,
|
|
99
|
+
):
|
|
100
|
+
"""
|
|
101
|
+
Updates an event by replacing specified fields with new values.
|
|
102
|
+
Any fields not included in the request will retain their existing values.
|
|
103
|
+
|
|
104
|
+
Args:
|
|
105
|
+
event_id (str): Event identifier.
|
|
106
|
+
start (str, optional): Event start time in ISO 8601 format (e.g., '2025-04-06T10:00:00-04:00'). Defaults to None.
|
|
107
|
+
end (str, optional): Event end time in ISO 8601 format (e.g., '2025-04-06T11:00:00-04:00'). Defaults to None.
|
|
108
|
+
timeZone (str, optional): User timezone formatted as an IANA Time Zone Database name (e.g. "Europe/Zurich"). Defaults to None.
|
|
109
|
+
summary (str, optional): Short title or subject of the event. Defaults to None.
|
|
110
|
+
description (str, optional): Detailed description or notes for the event. Defaults to None.
|
|
111
|
+
location (str, optional): Physical or virtual location of the event. Defaults to None.
|
|
112
|
+
"""
|
|
113
|
+
|
|
114
|
+
return await services.update_event(
|
|
115
|
+
event_id=event_id,
|
|
116
|
+
start=start,
|
|
117
|
+
end=end,
|
|
118
|
+
timeZone=timeZone,
|
|
119
|
+
summary=summary,
|
|
120
|
+
description=description,
|
|
121
|
+
location=location,
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
if __name__ == "__main__":
|
|
126
|
+
# Run MCP server
|
|
127
|
+
mcp.run(transport="stdio")
|
|
128
|
+
|
|
129
|
+
def main():
|
|
130
|
+
"""Entry point for the package"""
|
|
131
|
+
mcp.run(transport="stdio")
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
python
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
iflow-mcp_rsc1102-google_calendar_mcp
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "iflow-mcp_rsc1102-google_calendar_mcp"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "An MCP server to interact with Google Calendar"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.11"
|
|
7
|
+
dependencies = [
|
|
8
|
+
"google-api-python-client>=2.166.0",
|
|
9
|
+
"google-auth>=2.38.0",
|
|
10
|
+
"google-auth-oauthlib>=1.2.1",
|
|
11
|
+
"mcp[cli]>=1.6.0",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
[project.scripts]
|
|
15
|
+
google-calendar-mcp = "calendar_mcp:main"
|
|
16
|
+
|
|
17
|
+
[build-system]
|
|
18
|
+
requires = ["hatchling"]
|
|
19
|
+
build-backend = "hatchling.build"
|
|
20
|
+
|
|
21
|
+
[tool.hatch.build.targets.wheel]
|
|
22
|
+
packages = ["calendar_mcp.py", "services.py"]
|