Skip to main content

Connect AI agents to SaaS — one YAML file per service. OAuth, token vault, tool discovery.

Project description

ConnectKit

Purposefully built for AI Agents. ConnectKit gives agents access to user SaaS accounts — Gmail, Calendar, Drive, GitHub, Slack, and 520+ more — through one YAML file per service. OAuth, API keys, token vault, and tool discovery handled automatically. Used in production by the Executive Assistant agent system.

Embedded. Local. Open source. No cloud APIs, no hosted auth services. Runs entirely on-device with an encrypted SQLite credential vault + local YAML specs. Ships as a single Python package with zero external infrastructure dependencies.

Connect AI agents to SaaS. One YAML file per service. OAuth, token vault, tool discovery — handled automatically.

from connectkit import ConnectKitBridge

bridge = ConnectKitBridge(user_id="alice")
await bridge.discover()

# Agent gets tools for all connected services
tools = bridge.get_tool_definitions()
# → [google-workspace__gmail_list, github__issue_list, salesforce__soql_query, ...]

# Show the connector catalog
catalog = bridge.list_available()
# → [{name: "google-workspace", connected: true, setup_guide_url: "..."}, ...]

Why ConnectKit?

Every AI agent that needs access to user SaaS accounts ends up wiring three things together: OAuth flows, credential storage, and CLI/MCP tool wrappers. You build /auth/google/login, /auth/google/callback, token refresh logic, subprocess calls for gws gmail list... then you do it again for GitHub, again for Outlook.

ConnectKit does all of that once, done right. One YAML file per service. No Python code per connector.

Feature Status
524 SaaS connectors (from Nango's 779-provider baseline)
YAML-based connector spec (no Python code per service)
Encrypted SQLite credential vault (Fernet)
Universal OAuth 2.0 router (one endpoint, all services)
CLI adapter backend (wraps any SaaS CLI)
MCP adapter backend (connects to MCP servers)
Dual CLI + MCP support per connector (53+ connectors)
Connector catalog (list available services + status)
Agent meta-tools (list, connect, disconnect, health)
Per-user credential isolation
Self-hosted support (base_url for self-hosted instances)
No external API dependencies (works offline)

Installation

pip install connectkit

Core Concepts

One YAML file per service

# connectors/google-workspace.yaml
name: google-workspace
display: "Google Workspace"
setup_guide_url: "https://developers.google.com/workspace/guides/create-credentials"
auth:
  type: oauth2
  oauth2:
    authorize_url: https://accounts.google.com/o/oauth2/v2/auth
    token_url: https://oauth2.googleapis.com/token
    scopes:
      - https://www.googleapis.com/auth/gmail.readonly
      - https://www.googleapis.com/auth/calendar.readonly
  required_fields:
    - name: client_id
      label: "Client ID"
      input_type: text
    - name: client_secret
      label: "Client Secret"
      input_type: password
tool_sources:
  - type: cli
    command: gws
    install: npm install -g @googleworkspace/cli
  - type: mcp
    server_name: google-workspace
    command: gws mcp

Auth types

Type Use for Example
oauth2 OAuth 2.0 (Google, Microsoft, GitHub, Slack, 234+ services) Browser authorization → tokens vaulted
api_key API keys (Firecrawl, Stripe, Twilio, 288+ services) Paste key into form → vaulted
none No auth needed (local tools) Auto-connected

Tool source backends

Backend Count Best for
CLI 63 SaaS with official CLIs (gws, gh, glab, m365, stripe, sf, vercel, etc.)
MCP 514 SaaS with MCP servers (first-party or community)
Dual (CLI + MCP) 53 Best available backend picked at runtime

CredentialVault

All tokens are stored in an encrypted SQLite database (Fernet encryption). One vault per user. Master key from CONNECTKIT_VAULT_KEY env var.

from connectkit import CredentialVault

vault = CredentialVault("./data/users/alice")
vault.store_token("google-workspace", "oauth2", {
    "access_token": "ya29...", "refresh_token": "1//..."
})
token = vault.get_token("google-workspace")

OAuth flow

# 1. User fills in client_id + client_secret → stored in vault via POST /connectors/connect
# 2. Flutter renders "Connect" button → opens:
#    GET /auth/login?service=google-workspace&user_id=alice
# 3. Browser redirects to Google OAuth → user authorizes
# 4. Google redirects to:
#    GET /auth/callback?code=...&state=...
# 5. Gateway exchanges code for tokens → stores in vault
# 6. Google Workspace: ✅ Connected

OAuth states are Fernet-encrypted and self-contained — any vault with the same key can validate them (10-minute TTL).

Self-Hosted Support

Services like Firecrawl, Sentry, GitLab offer self-hosted deployments. ConnectKit supports them with an optional base_url field:

required_fields:
  - name: base_url
    label: "Self-Hosted URL"
    placeholder: "https://firecrawl.example.com"
    input_type: url
    help_text: "Leave empty for cloud version"
    optional: true

Connector Catalog

Category Count Services
dev-tools 120+ GitHub, GitLab, Jira, Bitbucket, GitLab, Sentry, Datadog, PagerDuty, Snowflake, Vercel, Netlify, Postman, Figma
productivity 80+ Google Workspace, Microsoft 365, Notion, Airtable, Monday, ClickUp, Trello, Asana, Evernote
crm 50+ HubSpot, Salesforce, Pipedrive, Zoho CRM, Close, Copper
communication 40+ Slack, Discord, Zoom, Twilio, WhatsApp, Intercom, Zendesk
payment 30+ Stripe, Square, PayPal, Braintree, Adyen, Checkout.com
marketing 30+ Mailchimp, Klaviyo, SendGrid, Apollo, Brevo, Constant Contact
e-commerce 25+ Shopify, WooCommerce, Amazon Selling Partner, BigCommerce
analytics 20+ Mixpanel, Amplitude, PostHog, Tableau, Looker, Heap
hr 20+ BambooHR, Workday, Gusto, Personio, Greenhouse, Lever
storage 15+ Dropbox, Box, Google Drive, OneDrive, Egnyte
other 90+ Everything else

License

MIT — see LICENSE.

Author

Eddy Xu

Status

Alpha — actively developed. Core spec model, vault, OAuth router, and adapter backends are stable with full test coverage (152+ tests). 524 connectors shipped. Currently used in production in the Executive Assistant agent system.

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

connectkit-0.1.1.tar.gz (141.8 kB view details)

Uploaded Source

Built Distribution

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

connectkit-0.1.1-py3-none-any.whl (327.1 kB view details)

Uploaded Python 3

File details

Details for the file connectkit-0.1.1.tar.gz.

File metadata

  • Download URL: connectkit-0.1.1.tar.gz
  • Upload date:
  • Size: 141.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for connectkit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4e227c5501e5dcd97080a1457f88baea4ed87f2bf82a5ccbe9994d12f32d4849
MD5 eb6f55cac8fb396a86b55507a8fafd94
BLAKE2b-256 bdcedfee2e1b0958e9c7a947b25b07214ae10be1db39c0551ee0b3b1c5d9c255

See more details on using hashes here.

File details

Details for the file connectkit-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: connectkit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 327.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for connectkit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f6bb7dc97e0860b5ca2b0c64c201f74b87c79a9a5d58292c9754fd3d45a06eef
MD5 1fd51403b726fea1c69147f248d9a266
BLAKE2b-256 00b09ee841c0702a2776c1c696ba64bd00b8d8938b4487e97781eab2a75cafb4

See more details on using hashes here.

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