# proactive-mcp
Give every AI agent a reason to reach out first.
A local-first MCP server that turns read-only signals and local memory into grounded situations your existing agent can deliver at the right time.
English ·
한국어
     [](https://ko-fi.com/madrobot)
[Why](#why-proactive-mcp) · [How it works](#how-it-works) · [Get started](#get-started) · [Connect an agent](#connect-an-agent) · [Documentation](#documentation)
## Get started
Set up the local watcher and OS notifications first; connecting an agent is optional. Install [uv](https://docs.astral.sh/uv/getting-started/installation/) and Git, and prepare your own [Google Cloud Desktop OAuth client JSON](docs/SETUP_GOOGLE.md).
The PyPI release `0.2.0` does not yet contain the wizard. Until an onboarding release is published, the commands below use `uvx --from` to install the merged source at commit `7cd0f03`, without a manual checkout. Keep the same `--from` source for every command: bare `uvx proactive-mcp` still selects the older PyPI package. This is a source install, not a new PyPI release.
1. Install and start interactive setup:
```bash
uvx --from git+https://github.com/madrobotnet/proactive-mcp@7cd0f03243027df464084c3957f03d3c42169268 proactive-mcp setup
```
2. The wizard asks for the path to your own Google Cloud Desktop OAuth client JSON and whether it may open a browser on this device. Approve the read-only Gmail and Calendar consent with your own client. See [`docs/SETUP_GOOGLE.md`](docs/SETUP_GOOGLE.md) for the complete flow.
3. After Google authorization, accept the offer to install the watcher service. The shared `proactive-mcp service install|status|remove` interface manages a Linux systemd user service, a macOS LaunchAgent, or a Windows Task Scheduler task.
4. If you decline service installation, or if installation succeeds, interactive `setup` then attempts a fixed PII-free OS test notification titled `proactive-mcp` with the body `Setup test notification`. It contains no Gmail, Calendar, account, or Situation data. A redacted `unavailable`, `timeout`, `failed`, or `unsupported_platform` warning means the notification could not be shown.
5. If you decline service installation, or if installation fails, such as because of permissions, run the watcher manually. A failed installation exits before attempting the test notification.
**Terminal 1, foreground daemon**
```bash
uvx --from git+https://github.com/madrobotnet/proactive-mcp@7cd0f03243027df464084c3957f03d3c42169268 proactive-mcp daemon
```
**Terminal 2, daemon status**
```bash
uvx --from git+https://github.com/madrobotnet/proactive-mcp@7cd0f03243027df464084c3957f03d3c42169268 proactive-mcp status
```
`daemon --once` runs one evaluation pass and exits; `--poll-interval-minutes MINUTES` overrides the cadence. `status` prints redacted connection and daemon state as JSON. The daemon performs local sync, deterministic evaluation, queue maintenance, and the documented OS fallback only. It never runs a host or LLM. Host scheduling is separate: the host/operator starts scheduled agent runs, and those runs call `proactive_check`.
An OS fallback notification is neither agent delivery nor a `delivered` state transition. When fallback is enabled, only the first unreceived eligible Situation gets the one-time bootstrap exception; afterward the default fallback is critical-only. Agent delivery begins only when a host calls `proactive_check`.
### Compatibility mode
`--non-interactive`, `--headless`, `--client-secrets PATH`, and `--reauth` all bypass the wizard. They do not prefill wizard answers, and they also bypass the service proposal and setup test notification. Use them only when you need direct OAuth setup, then install the service manually or use the manual daemon route above. To manage the service, use the same source prefix:
```bash
uvx --from git+https://github.com/madrobotnet/proactive-mcp@7cd0f03243027df464084c3957f03d3c42169268 proactive-mcp service install
```
Replace `install` with `status` to inspect the service or `remove` to unregister it. `uvx` does not add a permanent `proactive-mcp` command to your shell; command names such as `proactive-mcp status` in this guide use the full `uvx --from` prefix above.
## Why proactive-mcp?
AI agents know how to answer. They rarely know when to start.
proactive-mcp supplies that direction. It watches approved read-only sources in the background, combines them with memory the user intentionally saved, and produces a structured Situation only when something is worth raising now.
| Read-only signals | Local context | Agent-neutral delivery |
|:---|:---|:---|
| Gmail and Google Calendar are read through minimal scopes. | Memories, situations, delivery confirmations, and sync state stay in local SQLite. | Any local MCP client can use the same tools and deliver through its own channel. |
### Situations, not notifications
proactive-mcp doesn't push every new event into your chat. Deterministic detectors turn source data into a small set of situations grounded in the source data:
| Situation | Example |
|:---|:---|
| `reply_deadline` | A message is a conservative reply candidate, not a verdict that the user must act. |
| `calendar_conflict` | Two accepted or owned timed events overlap. |
| `personal_occasion` | A saved personal date is approaching and relevant now. |
Each result carries a title, why it matters now, bounded evidence, suggested actions, priority, and expiry. External text remains explicitly untrusted.
## How it works
```mermaid
flowchart LR
G["Gmail