Google Forms CamelAIOrg
STDIOMCP server integrates with Google Forms API for form management through natural language.
MCP server integrates with Google Forms API for form management through natural language.
A Model Context Protocol (MCP) server that integrates with Google Forms API and CamelAIOrg Agents to create, modify, and retrieve forms using natural language instructions.
This project enables the creation and management of Google Forms through natural language requests. It consists of two main components:
The system features a dark-themed UI with an animated visualization of the request flow between frontend, agents, MCP server, and Google APIs.
┌─────────────┐ ┌─────────────┐ ┌────────────┐ ┌────────────┐
│ │ │ │ │ │ │ │
│ Frontend │◄──►│ CamelAIOrg │◄──►│ MCP Server │◄──►│ Google │
│ (UI) │ │ Agents │ │ │ │ Forms API │
│ │ │ │ │ │ │ │
└─────────────┘ └─────────────┘ └────────────┘ └────────────┘
This diagram illustrates how a user request flows through the system:
graph TD subgraph "User Interface" A[Frontend UI] end subgraph "Processing Logic" B((CamelAIOrg Agent)) C((MCP Server)) end subgraph "External Service" D{{Google Forms API}} end A -->|"1. User enters: Create feedback form"| B B -->|"2. Interprets request, sends tool call"| C C -->|"3. Translates to API request"| D D -->|"4. Returns formId and URL"| C C -->|"5. Processes API response"| B B -->|"6. Formats final result to UI"| A style B fill:#f9d423,stroke:#333,stroke-width:2px,color:#333 style C fill:#8ecae6,stroke:#333,stroke-width:2px,color:#333
create_form
) into concrete Google Forms API requests.The Model Context Protocol (MCP) server acts as a crucial intermediary layer for several reasons:
create_form
, add_question
).git clone https://github.com/yourusername/google-form-mcp-server.git cd google-form-mcp-server
http://localhost:5000/oauth2callback
Create a .env
file in the root directory:
# 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
To obtain a refresh token:
.env
filedocker-compose up --build
This will start both the MCP Server (on port 5000) and the CamelAIOrg Agents service (on port 5001).
Access the web interface at http://localhost:5000
The interface allows you to:
GET /api/health
- Health checkGET /api/schema
- Get MCP tools schemaPOST /api/process
- Process MCP requestsGET /health
- Health checkGET /schema
- Get agent capabilitiesPOST /process
- Process natural language requestsHere are some example natural language requests you can try:
The MCP Server accepts requests in the following 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" } }
google-form-mcp-server/
├── server/ # MCP Server
│ ├── app.py # Main Flask application
│ ├── config.py # Configuration
│ ├── forms_api.py # Google Forms API integration
│ ├── mcp_handler.py # MCP protocol handler
│ ├── requirements.txt # Python dependencies
│ ├── static/ # Static assets
│ ├── templates/ # HTML templates
│ └── utils/ # Utility functions
├── agents/ # CamelAIOrg Agents
│ ├── agent_integration.py # Agent implementation
│ ├── agent_server.py # Agent API server
│ └── requirements.txt # Python dependencies
├── Dockerfile # MCP Server Dockerfile
├── docker-compose.yml # Docker Compose configuration
├── .env.example # Example environment variables
└── README.md # Project documentation
To run the MCP Server without Docker:
cd server pip install -r requirements.txt python app.py
To run the Agents service without Docker:
cd agents pip install -r requirements.txt python agent_server.py
MIT