Google Forms MCP server

Enables creation and management of Google Forms through natural language requests, converting conversational inputs into structured form elements for surveys, feedback forms, and event registrations
Back to servers
Provider
Adarsh P
Release date
Apr 09, 2025
Language
Python
Stats
5 stars

The MCP Server for Google Forms enables you to create and manage Google Forms through natural language requests. It implements the Model Context Protocol to connect CamelAIOrg Agents with the Google Forms API, allowing you to create forms, add questions, and retrieve responses using conversational commands.

Installation

Prerequisites

  • Docker and Docker Compose
  • Google Cloud Platform account
  • Google Forms API enabled
  • OAuth2 credentials from Google Cloud Console

Setup Steps

1. Clone the Repository

git clone https://github.com/yourusername/google-form-mcp-server.git
cd google-form-mcp-server

2. Configure Google Forms API

  1. Go to the Google Cloud Console
  2. Create a new project
  3. Enable the Google Forms API and Google Drive API
  4. Create OAuth2 credentials:
    • Select Web application type
    • Add authorized redirect URI: http://localhost:5000/oauth2callback
  5. Download the credentials JSON file

3. Set Up Environment Variables

Create a .env file in the root directory with the following content:

# Google API Credentials
GOOGLE_CLIENT_ID=your_client_id_here
GOOGLE_CLIENT_SECRET=your_client_secret_here
GOOGLE_REFRESH_TOKEN=your_refresh_token_here

# Server Configuration
FLASK_ENV=development
PORT=5000
DEBUG=True

# CamelAIOrg Agents Configuration
AGENT_ENDPOINT=http://agents:5001/process
AGENT_API_KEY=your_agent_api_key_here

4. Obtain a Google Refresh Token

  1. Visit the OAuth 2.0 Playground
  2. Configure it with your credentials
  3. Select these scopes:
  4. Exchange the authorization code for tokens
  5. Copy the refresh token to your .env file

5. Launch the Application

Build and start the containers:

docker-compose up --build

This starts both the MCP Server (port 5000) and the CamelAIOrg Agents service (port 5001).

Usage

Web Interface

Access the web interface at http://localhost:5000

The user interface allows you to:

  • Enter natural language requests to create or modify forms
  • View the request flow between components
  • See generated form details and links
  • Observe the MCP communication packets

Using the API

MCP Server Endpoints (Port 5000)

  • GET /api/health - Check server status
  • GET /api/schema - Retrieve MCP tools schema
  • POST /api/process - Send MCP requests

CamelAIOrg Agent Endpoints (Port 5001)

  • GET /health - Check agent status
  • GET /schema - Get agent capabilities
  • POST /process - Process natural language requests

Example Requests

Try these natural language commands:

  • "Create a customer feedback form with a rating question from 1-5 and a text question for additional comments"
  • "Create a survey about remote work preferences with 3 multiple choice questions"
  • "Create an event RSVP form with name, email and attendance options"

MCP Protocol Format

The MCP Server uses this request format:

{
  "transaction_id": "unique_transaction_id",
  "tool_name": "create_form",
  "parameters": {
    "title": "Form Title",
    "description": "Form Description"
  }
}

And responds with:

{
  "transaction_id": "unique_transaction_id",
  "status": "success",
  "result": {
    "form_id": "form_id",
    "response_url": "https://docs.google.com/forms/d/form_id/viewform",
    "edit_url": "https://docs.google.com/forms/d/form_id/edit",
    "title": "Form Title"
  }
}

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later