Name | mcp-gsuite JSON |
Version |
0.3.0
JSON |
| download |
home_page | None |
Summary | Example MCP server to create a knowledge-base |
upload_time | 2024-12-04 12:01:26 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.13 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# mcp-gsuite MCP server
MCP server to interact with Google produts.
## Example prompts
Right now, this MCP server supports Gmail and Calendar integration with the following capabilities:
1. General
- Multiple google accounts
2. Gmail
- Get your Gmail user information
- Query emails with flexible search (e.g., unread, from specific senders, date ranges, with attachments)
- Retrieve complete email content by ID
- Create new draft emails with recipients, subject, body and CC options
- Delete draft emails
- Reply to existing emails (can either send immediately or save as draft)
3. Calendar
- Manage multiple calendars
- Get calendar events within specified time ranges
- Create calendar events with:
- Title, start/end times
- Optional location and description
- Optional attendees
- Custom timezone support
- Notification preferences
- Delete calendar events
Example prompts you can try:
- Retrieve my latest unread messages
- Search my emails from the Scrum Master
- Retrieve all emails from accounting
- Take the email about ABC and summarize it
- Write a nice response to Alice's last email and upload a draft.
- Reply to Bob's email with a Thank you note. Store it as draft
- What do I have on my agenda tomorrow?
- Check my private account's Family agenda for next week
- I need to plan an event with Tim for 2hrs next week. Suggest some time slots.
## Quickstart
### Install
#### Oauth 2
Google Workspace (G Suite) APIs require OAuth2 authorization. Follow these steps to set up authentication:
1. Create OAuth2 Credentials:
- Go to the [Google Cloud Console](https://console.cloud.google.com/)
- Create a new project or select an existing one
- Enable the Gmail API and Google Calendar API for your project
- Go to "Credentials" → "Create Credentials" → "OAuth client ID"
- Select "Desktop app" or "Web application" as the application type
- Configure the OAuth consent screen with required information
- Add authorized redirect URIs (include `http://localhost:4100/code` for local development)
2. Required OAuth2 Scopes:
```json
[
"openid",
"https://mail.google.com/",
"https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/userinfo.email"
]
3. Then create a `.gauth.json` in your working directory with client
```json
{
"web": {
"client_id": "$your_client_id",
"client_secret": "$your_client_secret",
"redirect_uris": ["http://localhost:4100/code"],
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token"
}
}
```
4. Create a `.accounts.json` file with account information
```json
{
"accounts": [
{
"email": "alice@bob.com",
"account_type": "personal",
"extra_info": "Additional info that you want to tell Claude: E.g. 'Contains Family Calendar'"
}
]
}
```
You can specifiy multiple accounts. Make sure they have access in your Google Auth app. The `extra_info` field is especially interesting as you can add info here that you want to tell the AI about the account (e.g. whether it has a specific agenda)
Note: When you first execute one of the tools for a specific account, a browser will open, redirect you to Google and ask for your credentials, scope, etc. After a successful login, it stores the credentials in a local file called `.oauth.{email}.json`. Once you are authorized, the refresh token will be used.
#### Claude Desktop
On MacOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
<details>
<summary>Development/Unpublished Servers Configuration</summary>
```json
{
"mcpServers": {
"mcp-gsuite": {
"command": "uv",
"args": [
"--directory",
"<dir_to>/mcp-gsuite",
"run",
"mcp-gsuite"
]
}
}
}
```
</details>
<details>
<summary>Published Servers Configuration</summary>
```json
{
"mcpServers": {
"mcp-gsuite": {
"command": "uvx",
"args": [
"mcp-gsuite"
]
}
}
}
```
</details>
## Development
### Building and Publishing
To prepare the package for distribution:
1. Sync dependencies and update lockfile:
```bash
uv sync
```
2. Build package distributions:
```bash
uv build
```
This will create source and wheel distributions in the `dist/` directory.
3. Publish to PyPI:
```bash
uv publish
```
Note: You'll need to set PyPI credentials via environment variables or command flags:
- Token: `--token` or `UV_PUBLISH_TOKEN`
- Or username/password: `--username`/`UV_PUBLISH_USERNAME` and `--password`/`UV_PUBLISH_PASSWORD`
### Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging
experience, we strongly recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector).
You can launch the MCP Inspector via [`npm`](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) with this command:
```bash
npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-gsuite run mcp-gsuite
```
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
You can also watch the server logs with this command:
```bash
tail -n 20 -f ~/Library/Logs/Claude/mcp-server-mcp-gsuite.log
```
Raw data
{
"_id": null,
"home_page": null,
"name": "mcp-gsuite",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.13",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Markus Pfundstein <markus@life-electronic.nl>",
"download_url": "https://files.pythonhosted.org/packages/89/64/3a3b7ded4db7f8f037c9e823c5d54f33bc6eb10103c7f0150ad227ca5967/mcp_gsuite-0.3.0.tar.gz",
"platform": null,
"description": "# mcp-gsuite MCP server\n\nMCP server to interact with Google produts.\n\n## Example prompts\n\nRight now, this MCP server supports Gmail and Calendar integration with the following capabilities:\n\n1. General\n- Multiple google accounts\n\n2. Gmail\n- Get your Gmail user information\n- Query emails with flexible search (e.g., unread, from specific senders, date ranges, with attachments)\n- Retrieve complete email content by ID\n- Create new draft emails with recipients, subject, body and CC options\n- Delete draft emails\n- Reply to existing emails (can either send immediately or save as draft)\n\n3. Calendar\n- Manage multiple calendars\n- Get calendar events within specified time ranges\n- Create calendar events with:\n - Title, start/end times\n - Optional location and description\n - Optional attendees\n - Custom timezone support\n - Notification preferences\n- Delete calendar events\n\nExample prompts you can try:\n\n- Retrieve my latest unread messages\n- Search my emails from the Scrum Master\n- Retrieve all emails from accounting\n- Take the email about ABC and summarize it\n- Write a nice response to Alice's last email and upload a draft.\n- Reply to Bob's email with a Thank you note. Store it as draft\n\n- What do I have on my agenda tomorrow?\n- Check my private account's Family agenda for next week\n- I need to plan an event with Tim for 2hrs next week. Suggest some time slots.\n\n## Quickstart\n\n### Install\n\n#### Oauth 2\n\nGoogle Workspace (G Suite) APIs require OAuth2 authorization. Follow these steps to set up authentication:\n\n1. Create OAuth2 Credentials:\n - Go to the [Google Cloud Console](https://console.cloud.google.com/)\n - Create a new project or select an existing one\n - Enable the Gmail API and Google Calendar API for your project\n - Go to \"Credentials\" \u2192 \"Create Credentials\" \u2192 \"OAuth client ID\"\n - Select \"Desktop app\" or \"Web application\" as the application type\n - Configure the OAuth consent screen with required information\n - Add authorized redirect URIs (include `http://localhost:4100/code` for local development)\n\n2. Required OAuth2 Scopes:\n ```json\n [\n \"openid\",\n \"https://mail.google.com/\",\n \"https://www.googleapis.com/auth/calendar\",\n \"https://www.googleapis.com/auth/userinfo.email\"\n ]\n\n3. Then create a `.gauth.json` in your working directory with client\n\n```json\n{\n \"web\": {\n \"client_id\": \"$your_client_id\",\n \"client_secret\": \"$your_client_secret\",\n \"redirect_uris\": [\"http://localhost:4100/code\"],\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n \"token_uri\": \"https://oauth2.googleapis.com/token\"\n }\n}\n```\n\n4. Create a `.accounts.json` file with account information\n\n```json\n{\n \"accounts\": [\n {\n \"email\": \"alice@bob.com\",\n \"account_type\": \"personal\",\n \"extra_info\": \"Additional info that you want to tell Claude: E.g. 'Contains Family Calendar'\"\n }\n ]\n}\n```\n\nYou can specifiy multiple accounts. Make sure they have access in your Google Auth app. The `extra_info` field is especially interesting as you can add info here that you want to tell the AI about the account (e.g. whether it has a specific agenda)\n\nNote: When you first execute one of the tools for a specific account, a browser will open, redirect you to Google and ask for your credentials, scope, etc. After a successful login, it stores the credentials in a local file called `.oauth.{email}.json`. Once you are authorized, the refresh token will be used.\n\n#### Claude Desktop\n\nOn MacOS: `~/Library/Application\\ Support/Claude/claude_desktop_config.json`\n\nOn Windows: `%APPDATA%/Claude/claude_desktop_config.json`\n\n<details>\n <summary>Development/Unpublished Servers Configuration</summary>\n \n```json\n{\n \"mcpServers\": {\n \"mcp-gsuite\": {\n \"command\": \"uv\",\n \"args\": [\n \"--directory\",\n \"<dir_to>/mcp-gsuite\",\n \"run\",\n \"mcp-gsuite\"\n ]\n }\n }\n}\n```\n</details>\n\n<details>\n <summary>Published Servers Configuration</summary>\n \n```json\n{\n \"mcpServers\": {\n \"mcp-gsuite\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-gsuite\"\n ]\n }\n }\n}\n```\n</details>\n\n## Development\n\n### Building and Publishing\n\nTo prepare the package for distribution:\n\n1. Sync dependencies and update lockfile:\n```bash\nuv sync\n```\n\n2. Build package distributions:\n```bash\nuv build\n```\n\nThis will create source and wheel distributions in the `dist/` directory.\n\n3. Publish to PyPI:\n```bash\nuv publish\n```\n\nNote: You'll need to set PyPI credentials via environment variables or command flags:\n- Token: `--token` or `UV_PUBLISH_TOKEN`\n- Or username/password: `--username`/`UV_PUBLISH_USERNAME` and `--password`/`UV_PUBLISH_PASSWORD`\n\n### Debugging\n\nSince MCP servers run over stdio, debugging can be challenging. For the best debugging\nexperience, we strongly recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector).\n\nYou can launch the MCP Inspector via [`npm`](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) with this command:\n\n```bash\nnpx @modelcontextprotocol/inspector uv --directory /path/to/mcp-gsuite run mcp-gsuite\n```\n\nUpon launching, the Inspector will display a URL that you can access in your browser to begin debugging.\n\nYou can also watch the server logs with this command:\n\n```bash\ntail -n 20 -f ~/Library/Logs/Claude/mcp-server-mcp-gsuite.log\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Example MCP server to create a knowledge-base",
"version": "0.3.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "f8f1ca9a5ea830fe884b85d5b8d33a3e090d95056a2e15f0e451e70c4fe690f8",
"md5": "bb2f30b000dd5e5787bc88db119785f5",
"sha256": "e93537fa3779c3faca87872c2573e5f5ef0e481b5c13f674529e161a19e29f7b"
},
"downloads": -1,
"filename": "mcp_gsuite-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bb2f30b000dd5e5787bc88db119785f5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.13",
"size": 18291,
"upload_time": "2024-12-04T12:01:24",
"upload_time_iso_8601": "2024-12-04T12:01:24.637064Z",
"url": "https://files.pythonhosted.org/packages/f8/f1/ca9a5ea830fe884b85d5b8d33a3e090d95056a2e15f0e451e70c4fe690f8/mcp_gsuite-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "89643a3b7ded4db7f8f037c9e823c5d54f33bc6eb10103c7f0150ad227ca5967",
"md5": "a362e6a9137f3a44c5faf04534af9729",
"sha256": "6a78e9ea7a1ea90c788aa5820199193073d7aa19978debdefb256c8f5360809f"
},
"downloads": -1,
"filename": "mcp_gsuite-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "a362e6a9137f3a44c5faf04534af9729",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.13",
"size": 72882,
"upload_time": "2024-12-04T12:01:26",
"upload_time_iso_8601": "2024-12-04T12:01:26.379387Z",
"url": "https://files.pythonhosted.org/packages/89/64/3a3b7ded4db7f8f037c9e823c5d54f33bc6eb10103c7f0150ad227ca5967/mcp_gsuite-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-04 12:01:26",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "mcp-gsuite"
}