Skip to content

MCP Server for Google Forms #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: base-sha/3fba07653a8da7a478b034bffe0b81fa42a13e19
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ The following table provides an overview of the current servers implemented in g
| Google Docs | OAuth 2.0 | [✅ Seamless with Gumloop auth](https://www.gumloop.com/mcp/gdocs) | ⚠️ Requires GCP project & OAuth setup | [GDocs Docs](/src/servers/gdocs/README.md) |
| Google Drive | OAuth 2.0 | [✅ Seamless with Gumloop auth](https://www.gumloop.com/mcp/gdrive) | ⚠️ Requires GCP project & OAuth setup | [GDrive Docs](/src/servers/gdrive/README.md) |
| Google Calendar | OAuth 2.0 | [✅ Seamless with Gumloop auth](https://www.gumloop.com/mcp/gcalendar) | ⚠️ Requires GCP project & OAuth setup | [GCalendar Docs](/src/servers/gcalendar/README.md) |
| Google Forms | OAuth 2.0 | ⚠️ Coming soon | ⚠️ Requires GCP project & OAuth setup | [GForms Docs](/src/servers/gforms/README.md) |
| Google Maps | API Key | ⚠️ Coming soon | ⚠️ Requires GCP project & API Key | [GMaps Docs](/src/servers/gmaps/README.md) |
| Google Meet | OAuth 2.0 | [✅ Seamless with Gumloop auth](https://www.gumloop.com/mcp/gmeet) | ⚠️ Requires GCP project & OAuth setup | [GMeet Docs](/src/servers/gmeet/README.md) |
| YouTube | OAuth 2.0 | [✅ Seamless with Gumloop auth](https://www.gumloop.com/mcp/youtube) | ⚠️ Requires GCP project & OAuth setup | [YouTube Docs](/src/servers/youtube/README.md) |
Expand Down
113 changes: 113 additions & 0 deletions src/servers/gforms/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Google Forms Server

guMCP server implementation for interacting with the **Google Forms API** to manage Google Forms and their responses.

---

### 🚀 Prerequisites

- Python 3.11+
- A **Google Cloud project** with the following APIs enabled:
- Google Forms API
- Google Drive API

---

### 🔐 Google Cloud Project Setup (First-time Setup)

1. **Log in to the [Google Cloud Console](https://console.cloud.google.com/)**
2. Create a new project or select an existing one
3. Enable the required APIs:
- Google Forms API
- Google Drive API
4. Navigate to **APIs & Services** → **Credentials**
5. Click **Create Credentials** → **OAuth client ID**
6. Configure the OAuth consent screen if not already done
7. Select **Web application** as the application type
8. Click **Create**
9. Download the OAuth client configuration JSON file

---

### 📄 Local OAuth Credentials

Place the downloaded OAuth configuration JSON file at:

```
local_auth/oauth_configs/gforms/oauth.json
```

The file should contain your client ID and client secret.

---

### 🔓 Authenticate with Google Forms

Run the following command to initiate the OAuth login:

```bash
python src/servers/gforms/main.py auth
```

This will open your browser and prompt you to log in to your Google account. After successful authentication, the access credentials will be saved locally to:

```
local_auth/credentials/gforms/local_credentials.json
```

---

### 🛠 Features

This server exposes tools for the following operations:

#### 📋 Form Management
- `list_forms` – List all forms in your Google Drive
- `create_form` – Create a new form with title, description, and visibility settings
- `get_form` – Retrieve detailed information about a specific form
- `update_form` – Modify form details (title, description, visibility)
- `move_form_to_trash` – Move a form to trash
- `search_forms` – Search for forms by name

#### ❓ Question Management
- `add_question` – Add a question to an existing form (supports text, paragraph, multiple choice, and checkbox types)
- `delete_item` – Delete a question from an existing form

#### 📊 Response Management
- `list_responses` – Get all responses for a specific form
- `get_response` – Retrieve detailed information about a specific response

---

### ▶️ Running the Server and Client

#### 1. Start the Server

```bash
./start_sse_dev_server.sh
```

Make sure you've already authenticated using the `auth` command.

#### 2. Run the Client

```bash
python RemoteMCPTestClient.py --endpoint http://localhost:8000/gforms/local
```

---

### 📌 Notes on Google Forms API Usage

- Ensure your OAuth app has the necessary API scopes enabled
- When creating forms, you can specify whether they should be public or private
- Question types supported include: text, paragraph, multiple choice, and checkbox
- Make sure your `.env` file contains the appropriate API keys if using external LLM services

---

### 📚 Resources

- [Google Forms API Documentation](https://developers.google.com/forms/api)
- [Google Drive API Documentation](https://developers.google.com/drive/api)
- [OAuth 2.0 in Google APIs](https://developers.google.com/identity/protocols/oauth2)
Binary file added src/servers/gforms/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions src/servers/gforms/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Google Forms guMCP Server"
icon: "assets/icon.png"
description: "Interact with Google Forms using the Google Forms API"
documentation_path: "README.md"
tools:
- name: "list_forms"
description: "List all forms."
- name: "create_form"
description: "Creates a new form."
- name: "get_form"
description: "Retrieves an existing form by its ID."
- name: "update_form"
description: "Updates an existing form by its ID."
- name: "move_form_to_trash"
description: "Removes a form and moves it to trash."
- name: "list_responses"
description: "Retrieves a list of responses."
- name: "get_response"
description: "Retrieves the details of a response by its ID."
- name: "search_forms"
description: "Retrieves a list of forms by name."
- name: "add_question"
description: "Add a question to an existing Google Form."
- name: "delete_item"
description: "Deletes an item (question) from an existing Google Form."
Loading