Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I Built an Open-Source Local Google Calendar API and OAuth Server for Testing AI Agents and MCP Tools

Description and use

Calendarpit is a local emulator for Google Calendar API and OAuth 2.0 that lets developers test integrations without real credentials or affecting live data.

Problem

Testing Google Calendar integrations against the live API requires a Google Cloud project, OAuth credentials, and test accounts, leading to state drift and risk of affecting real data.

Outcome

Calendarpit enables developers to test Calendar and OAuth flows locally, eliminating the need for real Google credentials, preventing accidental data changes, and providing deterministic state via fixtures.

Workflow

  • 1. Install Calendarpit via Docker, Homebrew, or a standalone binary.
  • 2. Start the server (e.g., docker run --rm -p 127.0.0.1:4173:4173 ghcr.io/iktakahiro/calendarpit:latest).
  • 3. Point the Google SDK endpoints to http://127.0.0.1:4173 (e.g., configure rootUrl, oauth2AuthBaseUrl, oauth2TokenUrl).
  • 4. Use the local OAuth consent screen to select a test user and approve or deny requests.
  • 5. Run tests; the server logs requests in the admin UI and stores state in a local SQLite file or in-memory database.
  • 6. Reset state by providing a JSON fixture with --config or using the built-in default.
  • 7. Repeat for parallel workers by using --database :memory: or separate database files.

Evidence

Testing them against the live Google Calendar API is painful.

Source

Calendarpit is an MIT-licensed open-source local server for development and testing.

Source

It ships as a GHCR image, a Homebrew formula, and standalone executables on GitHub Releases for macOS, Linux glibc, and Windows.

Source

Calendarpit implements the OAuth flow locally without passwords. On the consent page, you pick a test user from a dropdown and approve or deny the request.

Source

  • Record date: 2026-10-19T13:41:10.672Z