Skip to main content

Local-first email and calendar inbox for AI agents

Project description

Chronos — agent-inbox

License: MIT Python 3.11+

Local-first email and calendar inbox for AI agents. Syncs Gmail and Google Calendar into a single queryable SQLite database and exposes all data through an MCP server.

Features

  • Sync multiple Gmail and Google Calendar accounts into one SQLite database
  • Full-text search via FTS5 (messages and events)
  • MCP server at localhost:7071/sse for agent integration
  • HTTP REST API at localhost:7070 for direct queries
  • Read-only SQL interface via POST /v1/query
  • Optimistic event writes with provider-wins conflict resolution
  • Incremental sync with historyId (Gmail) and syncToken (Calendar)
  • ULID primary keys, WAL mode, no cloud dependencies at query time

Installation

pipx install chronos-mcp

Or from source:

git clone https://github.com/CourtimusPrime/chronos.git
cd chronos
pip install -e .

Setup

Prerequisites

  1. Go to console.cloud.google.com
  2. Create a project and enable Gmail API and Google Calendar API
  3. Create an OAuth client ID (Desktop app type)
  4. Download the credentials JSON file

Register an account

Run chronos --help for full Google Cloud Console setup instructions.

# Step 1: Stage your credentials (Desktop app OAuth JSON from Google Cloud Console)
chronos --use /path/to/credentials.json

# Step 2: Register an account (opens browser for OAuth2 consent)
chronos --add personal

Staged credentials persist until the next --use call, so you can register multiple accounts with one credentials file:

chronos --use /path/to/credentials.json
chronos --add personal
chronos --add work

The --add step:

  • Writes ~/.chronos/personal_token.json (self-contained token file)
  • Creates two rows in the accounts table (gmail + google_calendar)
  • Prints a confirmation summary

Start syncing

chronos --start

The daemon starts on 127.0.0.1:7070 (HTTP) and 127.0.0.1:7071 (MCP/SSE).

CLI Reference

chronos --use CREDENTIALS_PATH          # Stage a credentials JSON for --add
chronos --add ALIAS                     # Register a new account (requires prior --use)
chronos --remove ALIAS                  # Remove an account and its data
chronos --list                          # List all registered accounts
chronos --test ALIAS                    # Test account tokens
chronos --start [--http-port N] [--mcp-port N]  # Start daemon
chronos --stop                          # Stop the running daemon (preserves synced data)
chronos --status                        # Show sync status
chronos --sync [ALIAS] [--type full|incremental]  # Trigger sync

Ctrl+C vs --stop: Pressing Ctrl+C while chronos --start is running wipes synced data (emails, threads, events, calendars) but preserves accounts. Use chronos --stop from another terminal for a clean shutdown that preserves data.

Run chronos --help for Google Cloud Console setup steps.

Environment Variables

Variable Default Description
CHRONOS_HOME ~/.chronos Credentials and database directory
CHRONOS_DB_PATH $CHRONOS_HOME/chronos.db SQLite database file
CHRONOS_HTTP_PORT 7070 HTTP API port
CHRONOS_MCP_PORT 7071 MCP server port
CHRONOS_LOG_LEVEL INFO Log level

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chronos_mcp-0.1.2.tar.gz (50.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chronos_mcp-0.1.2-py3-none-any.whl (51.8 kB view details)

Uploaded Python 3

File details

Details for the file chronos_mcp-0.1.2.tar.gz.

File metadata

  • Download URL: chronos_mcp-0.1.2.tar.gz
  • Upload date:
  • Size: 50.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for chronos_mcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9993260e7c72e8536e21a162513f5860d08d3a24f5ab0bb5603740e4a269c53b
MD5 fb741e622cb19abf2d3182649c5fa508
BLAKE2b-256 0a4f1a5147518d563dcd86208e77e7b4771998db15dd1b7273b56a29e3de4c94

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronos_mcp-0.1.2.tar.gz:

Publisher: workflow.yml on CourtimusPrime/chronos-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chronos_mcp-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: chronos_mcp-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 51.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for chronos_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 abafa5b8ffdbdced8c19bd53d8615eff84dd86a2e8693f736734f0b582395dc5
MD5 24364bc539324fc3d7304cc0c7b00c45
BLAKE2b-256 bb8020de97b10fd18a4b91dcfff723360b21b9acced1eab2c7f8b8f493948684

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronos_mcp-0.1.2-py3-none-any.whl:

Publisher: workflow.yml on CourtimusPrime/chronos-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page