A Goose extension that integrates with Google Calendar using OAuth2 device flow authentication.
Works with Goose Desktop (STDIO) and Goose CLI (HTTP).
- β Google Calendar - List and create events
- π Device Flow Auth - Simple browser-based authentication
- πΎ Token Persistence - Auto-refresh, stays logged in
- π₯οΈ Windows Compatible - Tested on Windows with Goose Desktop
Due to Google's device flow OAuth restrictions, only Calendar scope works. Gmail and Tasks scopes return invalid_scope errors with device flow authentication. A future update may add localhost redirect flow to support these APIs.
git clone https://github.com/YOUR_USERNAME/goose-google-connector.git
cd goose-google-connector
npm install- Go to Google Cloud Console
- Create a new project (or select existing)
- Enable the Google Calendar API:
- Go to APIs & Services β Library
- Search for "Google Calendar API" and click Enable
- Configure OAuth consent screen:
- Go to APIs & Services β OAuth consent screen
- Choose External, fill in app name and email
- Add your email as a test user
- Create OAuth credentials:
- Go to APIs & Services β Credentials
- Click Create Credentials β OAuth client ID
- Application type: TVs and Limited Input devices
- Name: "Goose Google Connector"
- Copy the Client ID and Client Secret
Edit googleAuth.js and replace the placeholders:
const OAUTH_CONFIG = {
clientId: "YOUR_CLIENT_ID.apps.googleusercontent.com",
clientSecret: "YOUR_CLIENT_SECRET",
// ...
};Or use environment variables:
# Windows
set GOOGLE_CLIENT_ID=your_client_id
set GOOGLE_CLIENT_SECRET=your_client_secret
# Linux/Mac
export GOOGLE_CLIENT_ID=your_client_id
export GOOGLE_CLIENT_SECRET=your_client_secret- Open Goose Desktop β Settings β Extensions
- Click Add custom extension
- Configure:
- Name: Google Connector
- Type: Standard IO (STDIO)
- Command:
C:\Program Files\nodejs\node.exe(or your Node.js path) - Arguments:
C:\path\to\goose-google-connector\stdio-server.js
- Save and enable the extension
In Goose, say:
"Check my Google auth status"
Follow the instructions to complete authentication in your browser.
| Command | Description |
|---|---|
google_auth_status |
Check authentication or start login flow |
google_logout |
Clear saved credentials |
google_list_events |
List upcoming calendar events (next 7 days) |
google_create_event |
Create a new calendar event |
"Show my upcoming calendar events"
"Create a meeting called Team Standup tomorrow at 9am"
"Add a calendar event called Dentist Appointment on Friday at 2pm for 30 minutes"
"Log out of Google"
goose-google-connector/
βββ stdio-server.js # β Main entry point for Goose Desktop (STDIO)
βββ mcp-http-server.js # HTTP server for Goose CLI or testing
βββ googleAuth.js # OAuth2 device flow authentication
βββ package.json # Dependencies
βββ .gitignore
βββ LICENSE
βββ README.md
For development/testing without Goose:
node mcp-http-server.jsThen test with curl:
# Health check
curl http://localhost:3847/health
# Initialize
curl -X POST http://localhost:3847/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"1","method":"initialize","params":{}}'
# List tools
curl -X POST http://localhost:3847/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"2","method":"tools/list","params":{}}'
# Check auth
curl -X POST http://localhost:3847/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"3","method":"tools/call","params":{"name":"google_auth_status","arguments":{}}}'If you get process quit before initialization: stderr = error in Goose Desktop:
- Use absolute paths for both Node.js and the script
- Find your Node.js path:
where node - The
stdio-server.jsincludesprocess.chdir()fix for module resolution
| Error | Solution |
|---|---|
invalid_client |
Check Client ID/Secret are correct and from "TVs and Limited Input devices" type |
invalid_scope |
Gmail/Tasks don't work with device flow - only Calendar is supported |
process quit before initialization |
Use absolute paths in Goose Desktop config |
| Token refresh fails | Run google_logout then google_auth_status |
Device flow is ideal for CLI/desktop apps because:
- No need to run a local web server
- Works on headless systems
- Simple user experience (just enter a code)
Google restricts which OAuth scopes work with device flow. Calendar works, but Gmail (gmail.readonly) and Tasks (tasks) return invalid_scope. Supporting these would require switching to localhost redirect flow.
This extension implements the Model Context Protocol (MCP) for communication with Goose. It supports both:
- STDIO - For Goose Desktop (spawns as subprocess)
- HTTP - For Goose CLI or direct testing
Contributions welcome! Some ideas:
- Add localhost redirect flow for Gmail/Tasks support
- Add more Calendar features (update, delete events)
- Add Google Drive integration
- Improve natural language date parsing
MIT License - see LICENSE
- Built for Goose by Block
- Uses googleapis for Google API access