An intelligent Google Assistant application that integrates multiple Google services using the MCP (Model Context Protocol) protocol. This application provides a unified interface to manage your Google Calendar, Maps, Gmail, Docs, Sheets, Slides, and more.
- 📅 Calendar Integration: View your schedule, upcoming meetings, and get intelligent reminders
- 🗺️ Maps & Travel: Get travel times, directions, and route information for multiple transportation modes
- 📧 Gmail: Access and search your emails
- 📄 Docs & Slides: Create documents and presentations on the fly
- 📊 Sheets: Create and manage spreadsheets
- 💡 Intelligent Assistant: Combines multiple services to provide contextual responses
- Automatically calculates travel time for upcoming meetings
- Suggests optimal departure times based on your schedule
- Creates documents and presentations based on your requests
- Node.js (v16 or higher)
- Google Cloud Project with the following APIs enabled:
- Google Calendar API
- Google Maps JavaScript API (for Maps features)
- Gmail API
- Google Docs API
- Google Slides API
- Google Sheets API
- Google Drive API
- OAuth 2.0 Credentials (credentials.json file)
-
Go to Google Cloud Console
-
Create a new project (e.g., "MCP Google Assistant")
-
Enable the following APIs:
- Calendar API
- Gmail API
- Google Docs API
- Google Slides API
- Google Sheets API
- Google Drive API
- Maps JavaScript API (for Maps features)
- Geocoding API (for address lookups)
- Directions API (for travel times)
-
Go to APIs & Services → Credentials
-
Click Create Credentials → OAuth 2.0 Client ID
-
Choose Web application or Desktop app
-
Add authorized redirect URI:
http://localhost:3001/auth/callback -
Download the credentials and save as
credentials.jsonin the project root
# Install server dependencies
npm install
# Install client dependencies
cd client
npm install
cd ..Create a .env file in the root directory (you can copy from .env.example):
PORT=3001
GOOGLE_CLIENT_ID=your_client_id_here
GOOGLE_CLIENT_SECRET=your_client_secret_here
GOOGLE_REDIRECT_URI=http://localhost:3001/auth/callback
GOOGLE_MAPS_API_KEY=your_maps_api_key_here
NODE_ENV=developmentImportant Notes:
- If you have
credentials.json, the app will use it automatically for OAuth credentials - You must set
GOOGLE_MAPS_API_KEYin.envfor Maps features to work - Get your Maps API key from Google Cloud Console → APIs & Services → Credentials
Development Mode:
# Terminal 1: Start the backend server
npm start
# Terminal 2: Start the React frontend
cd client
npm startThe application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
Production Mode:
# Build the React app
cd client
npm run build
cd ..
# Start the server (serves both API and frontend)
NODE_ENV=production npm start- Click "Sign in with Google" on the login page
- Authorize the application to access your Google services
- You'll be redirected back to the application
The assistant understands natural language queries. Here are some examples:
Calendar Queries:
- "What's my schedule today?"
- "Show me my upcoming meetings"
- "Do I have any meetings this week?"
Travel Queries:
- "How long to get to Central Park?"
- "Travel time from Times Square to JFK Airport"
- "How long from my location to 123 Main St?"
Document Creation:
- "Create a report about Q4 sales"
- "Generate a presentation on project status"
- "Make a document called Meeting Notes"
Combined Intelligence:
- When you ask about your schedule and a meeting is coming up soon, the assistant will automatically:
- Check your current location
- Calculate travel time to the meeting location
- Show multiple transportation options (driving, transit, walking)
- Suggest when to leave
-
Ask about schedule: "What's my schedule?"
- Assistant shows upcoming events
- If a meeting is within 3 hours, it automatically calculates travel time
-
Travel planning: "How long to get to my 3pm meeting?"
- Assistant looks up the meeting location
- Calculates travel time from your current location
- Shows all transportation options
-
Document creation: "Create a report about today's meetings"
- Assistant creates a Google Doc
- Provides a link to view/edit
Google-AIO/
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── App.js # Main app component
│ │ └── index.js # Entry point
│ └── package.json
├── config/ # Configuration files
│ └── googleAuth.js # OAuth setup
├── routes/ # Express routes
│ ├── auth.js # Authentication routes
│ ├── api.js # API endpoints
│ └── mcp.js # MCP protocol routes
├── services/ # Service integrations
│ ├── assistantService.js # Main assistant logic
│ ├── calendarService.js # Calendar integration
│ ├── mapsService.js # Maps integration
│ ├── docsService.js # Docs integration
│ ├── gmailService.js # Gmail integration
│ ├── sheetsService.js # Sheets integration
│ └── keepService.js # Notes integration
├── server.js # Express server
├── package.json # Dependencies
├── credentials.json # OAuth credentials (not in repo)
└── README.md # This file
GET /auth/login- Get OAuth login URLGET /auth/callback- OAuth callback handlerGET /auth/tokens/:sessionId- Get tokens for session
POST /api/query- Main query endpoint (requires session header)
GET /api/calendar/upcoming- Get upcoming eventsGET /api/calendar/date/:date- Get schedule for specific date
POST /api/maps/travel-time- Calculate travel timePOST /api/maps/geocode- Geocode an address
POST /api/docs/create- Create a Google DocPOST /api/slides/create- Create a Google Slides presentation
GET /api/gmail/messages- Get recent messagesPOST /api/gmail/search- Search messages
POST /api/sheets/create- Create a spreadsheetGET /api/sheets/:id/read- Read spreadsheet data
MIT
Contributions are welcome! Please feel free to submit a Pull Request.