Skip to main content
Glama

Switchboard

Self-hosted hooks that let your personal assistant work with your own mail, calendars, contacts, bank data, orders, notifications, webhooks, home devices, local notes, tasks, and health checks — without paying an aggregator such as Plaid or an automation service such as Zapier, and without handing them your credentials.

Switchboard has a full Python reference implementation and a C++20-first native backend for selected local-first tools. C99 and Rust clients share the C++ engine through a versioned C interface; they are not three independent ports or Python launchers. See native language coverage.

The Python package has no third-party Python runtime dependencies; the native backend uses established transport, database, structured-data and cryptographic libraries. Python uses standard mail, calendar, and contact protocols, bank export files, and direct service interfaces. Both backends expose tools through the Model Context Protocol (MCP) with a policy gate: read and draft tools normally run immediately, act tools normally ask for approval, and no payment or checkout tool is implemented.

Status: v0.1 prototype. Validation records what has been run, where, and with what result; nothing has been run against a real account or device. Run the tests on your own computer first; see Deployment.

This is a prototype, not a sandbox or a verified bank integration. An assistant with shell access as your user can run approval commands, read your secrets, or edit the data directly. The optional broker moves credentials, data, and approvals to a dedicated service account so that only separate operating-system accounts can decide; see Isolation. Self-hosting also does not keep mail or financial results away from your assistant's model provider; use a local model and client if those results must stay on your machine. See the operating boundary.

What it connects

Connector

Talks to

Tools (tier)

mail

Standard mail servers; app passwords or the OAuth authorization framework

mail_accounts, mail_mailboxes, mail_search, mail_read (read); mail_draft (draft); mail_send (act)

calendar

Secret iCalendar feeds, calendar servers, .ics files, email invites

calendar_sources, calendar_agenda, calendar_free_slots (read); calendar_propose_event (draft); calendar_create_event, calendar_send_invite (act)

contacts

Contact synchronization servers and vCard files

contacts_sources, contacts_search (read)

finance

Bank .ofx, .qfx, and .csv exports and bank alert emails

finance_accounts, finance_transactions, finance_summary, finance_recurring (read); finance_import_inbox (draft)

shopping

Order and shipping emails; product pages you choose

shopping_orders, shopping_shipments, shopping_watch_list, shopping_check_prices (read); shopping_watch_add, shopping_watch_remove (draft)

notify

ntfy, Telegram, and email to yourself

notify_self (draft: it can only reach channels you configured)

webhooks

Verified inbound webhooks (GitHub, Microsoft Graph, Google Calendar, your own)

webhooks_recent (read)

home

Home Assistant's service interface

home_states (read); home_call_service (act)

telegram

Allowlisted incoming bot messages and replies

telegram_status, telegram_messages, telegram_read (read); telegram_mark_read (draft); telegram_reply (act)

linkedin

Your downloaded exports and explicitly enabled own-profile publishing

linkedin_search, linkedin_read, linkedin_drafts (read); linkedin_import_export, linkedin_draft_post (draft); linkedin_publish_post (act)

whatsapp

Your manually exported personal chat snapshots

whatsapp_import_export (draft); whatsapp_search, whatsapp_read (read); no live messaging

core

Switchboard itself

switchboard_status, approvals_pending, approvals_status (read)

Local-first extensions

Connector

Purpose

Boundary

home

Typed lighting, climate/fan and media controls, sensor/energy summaries, and state-change polling through Home Assistant

Explicit targets and safety limits; not arbitrary household automation

wled

Direct local lighting status and approved absolute controls/presets

Fixed configured endpoints; no firmware or arbitrary command interface

shelly

Direct generation 2+ device/energy reads and opt-in approved safe switch controls

Selected devices/components; not high-power appliance automation

documents

Bounded read-only listing, search and reading of selected local notes

Private allowlisted text collections, not a whole-disk assistant

tasks

Local tasks, revisions, and one-shot reminder events

Notification rules are separate from queueing; no task-provider synchronization

monitoring

Fixed-target health, backup-report freshness and disk-capacity observations

Read-only checks; not a backup, restore, shell or server-management tool

These are opt-in. Home Assistant is a separate self-hosted device gateway; direct WLED and Shelly hooks do not require it. Device compatibility, authentication, and exact capabilities depend on the selected model and firmware. No real device has been contacted.

There is no "buy" or "pay" tool. Price watches tell you when an item hits your target, and you buy it yourself. The reasons are in Tradeoffs.

Related MCP server: Xiaozhi AI MCP Bridge

How it fits together

  • Assistants call tools over MCP on standard input and output; no network port is opened.

  • The runner (switchboard run) runs enabled polling and health jobs, queues due task reminders, turns observations into events, and runs your automation rules — a local "if this, then that".

  • You approve pending actions from the terminal, flip the kill switch, and verify the audit log.

  • The action journal records every draft and act call before its handler runs. A write whose outcome is unknown, such as a send whose connection dropped, is marked uncertain, and an identical repeat is refused until you check and record what happened with switchboard actions resolve. See Recovery.

  • Deadlines bound each tool call (tool_timeout_seconds) and each polling-job run (job_timeout_seconds); the runner runs up to job_workers jobs at once, never two from the same connector.

  • The optional broker (switchboard broker serve) serves the assistant and the operator on separate local sockets under a dedicated account; the assistant connects with switchboard serve-mcp --broker SOCKET.

  • Data lifecycle commands create and verify backups, export or purge stored data under [retention], and archive and anchor the audit log. See Data lifecycle.

Every tool call goes through the same dispatcher: argument validation, policy, audit, then execution. Polling and connector-to-connector service calls are trusted application code, not additional dispatcher calls. See Architecture.

The Telegram connector is an assistant-pulled inbox/reply bridge, not a model runner: receiving a message does not start an assistant turn. Your assistant must check the inbox through its tools or an operator-configured loop. LinkedIn and WhatsApp imports are historical snapshots, not live personal-account access. LinkedIn publishing is off until explicitly configured; live WhatsApp messaging is not implemented.

Likewise, a device accepting a command is not proof of its physical state, and a reminder event is not a delivered notification. Read the returned verification/error state and each connector's limits before building a multi-step routine.

Start here: no accounts

Run this on your own machine from a fresh checkout. Start with the tests before enabling a connector or entering credentials. Existing configuration is not overwritten by init; do not add --force merely to get past that warning.

uv sync
uv run pytest -m "not integration"
uv run pytest -m integration
uv run switchboard init          # starter config at ~/.config/switchboard/config.toml (mode 600)
uv run switchboard doctor
uv run switchboard call switchboard_status

With an unchanged starter configuration and a fresh data directory, the last command should report status: "ok" and data containing connectors: [], tools: 4, and kill_switch: false. Its audit hash changes between calls; do not compare it with a fixed example. This checks local assembly and the dispatcher, not mail delivery or provider sign-in. These expected results come from reading the source, not from running these commands. scripts/ci/validate.sh runs every check stage, including the native builds, contract fixtures, fault tests, sanitizers and fuzzing; see Validation.

Stop here until that local path works. Then enable one connector, store its credential in your password manager, and reference it (password = "cmd:/usr/bin/pass show switchboard/mail"), and connect an assistant (examples for Claude Desktop, OpenClaw, and Hermes Agent are in Deployment).

Read one call before extending it

Follow cmd_call in the command-line entry, then Dispatcher.call in the tool dispatcher. It validates arguments, asks Policy.evaluate in the policy module, records the request, and only then invokes the handler. The switchboard_status handler is registered by _register_core_tools in application assembly. This is a small, account-free route through the actual code.

Next, read the worked pending-action case before chaining actions. For your first custom hook, use the schema and rule examples; the connector guide explains which mistakes are rejected at startup and which guarantees the automation engine does not provide.

Safety model in one table

Tier

Default

Meaning

read

allow

Retrieve data; may contact services and cache it

draft

allow

Save prepared content or notify your own channels

act

ask

Send, create, or change something outside

spend

deny

Move money (no such tool exists)

Plus: recipient allowlists, per-tool rate limits, amount caps, an exposure list for assistants, approvals that bind the exact arguments, a kill switch, secret references instead of secrets, owner-only file permissions, a hash-chained audit log, deadlines on every call and job, and an action journal that refuses to repeat a write with an unknown outcome until you reconcile it.

Approvals recheck the current argument schema and policy. Hourly limits include approved and in-flight calls; concurrent processes reserve capacity atomically. These controls do not identify a human independently of the local user account.

Documentation

License

Switchboard is released under the MIT License.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      One secure, self-hosted MCP endpoint connecting AI agents to your real accounts (mail, calendar, files, notes), with per-profile separation, explicit permission enforcement, and an append-only audit log.
      192 npm
      36
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables an AI assistant to invoke local file operations, multi-engine web search, weather, system commands, developer utilities, and code execution over MCP, and includes a web dashboard for managing endpoints, testing tools, and viewing live logs.
      57 npm
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables connecting over 1,000 apps once, self-hosted and with encrypted credentials, so that Claude, Codex, Cursor, Copilot and dozens of other AI agents can call their APIs as MCP tools. Agents authenticate with per-agent tokens to get ready-made tools for every connected app, including app-specific actions like searching mail or sending messages.
      1
      76 npm
      6
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Connects web AI chats and local clients to your own machine through one OAuth-gated MCP endpoint, exposing 38 governed tools for files, shell commands, search, Git, SQLite, browser automation, DevTools, background tasks, localhost services, clipboard, notifications, ports, and Postman control. It lets assistants build and edit projects, inspect databases and local APIs, drive browser workflows, and manage long-running jobs without handing every client unrestricted shell access.
      MIT