Skip to main content

Proactive memory layer for AI โ€” the AI that reaches back out to you

Project description

๐Ÿ”ฅ Vigil MCP

The AI that reaches back out to you.

Most AI tools wait. You open them, you ask, they answer. Vigil flips that.

Connect it to Claude once โ€” and it remembers what you said you'd do, reasons about when it's worth interrupting you, and follows up on its own.


The problem

Every AI interaction ends the same way: you close the tab and the context disappears. The AI has no persistence, no agency, no follow-through. It's reactive by design.

Vigil is a layer that changes that.


How it works

Vigil is an MCP server โ€” a tool layer that any compatible AI can plug into. When connected:

  1. Claude detects commitments automatically โ€” "I'll come back tomorrow", "remind me to push this on Friday", "I'll do X after lunch" โ†’ saved instantly, no command needed
  2. A policy engine runs in the background โ€” every 60 seconds, it evaluates every pending commitment against 7 conditions before deciding whether to act
  3. When you open a new session, Claude reads vigil://pending and opens with urgent items naturally โ€” "Hey, you said you'd finish the README. Still on it?"
  4. Desktop and push notifications fire when things are overdue and you haven't opened Claude yet
  5. Nudges go to Slack or Discord if you've configured a webhook
  6. V3 integrations run every 5 minutes โ€” idle detection, adaptive learning, and weekly reports work silently in the background
  7. Every decision is logged and explainable โ€” ask "why did you message me?" and get the full trace

Policy engine

Vigil doesn't act on a timer. It reasons.

Every potential nudge passes through a 7-step decision chain:

1. Hypothetical intent?              โ†’ never act
2. Grace period (<30 min old)?       โ†’ too fresh, skip
3. Early phase (>48h to deadline)?   โ†’ too soon, skip
4. Cooldown window active?           โ†’ avoid spam (4h / 1h / 2h by phase)
5. Daily attention budget exhausted? โ†’ suppress unless importance โ‰ฅ 0.8
6. Soft intent?                      โ†’ reduce effective importance by 0.2
7. Phase + importance threshold      โ†’ fire or stay silent

Every decision โ€” including suppressed ones โ€” is written to decision_log with phase, urgency, budget used, and full reasoning text.

Temporal phases

Phase Window Cooldown Behavior
early > 48h until due โ€” No nudge
execution 4โ€“48h until due 4h Nudge if importance โ‰ฅ 0.6
risk < 4h until due 1h Always nudge
overdue Past deadline 2h Escalate

Auto-decay

Nudged 3+ times with no response โ†’ importance decays 15% per cycle. After 6 ignored nudges โ†’ auto-archived. No noise, no spam.


Features

Feature Description
๐Ÿง  Policy engine 7-step reasoning chain, not a simple timer
๐Ÿ’ฌ Natural language input "remind me to push the PR before EOD" โ†’ parsed and saved automatically
๐Ÿ“ฌ Proactive notifications Native macOS/Windows/Linux OR Web Push to phone/browser
๐Ÿ”” Slack/Discord integration Nudges delivered to your Slack or Discord channel
๐Ÿค– Slack slash commands /vigil remind me to X creates a commitment from Slack
๐Ÿ“ฑ Installable PWA Add dashboard to phone home screen โ€” iOS 16.4+ / all Android
โ˜๏ธ Hosted mode One-click Railway/Render deploy, auth-protected, multi-user
โœ๏ธ Edit commitments Update deadline, importance, intent, or description after saving
๐Ÿ” Recurring commitments Daily, weekly (specific days), monthly โ€” auto-reschedules
๐Ÿ“‰ Auto-decay Importance drops on ignores; auto-archives after 6 nudges
๐ŸŒ… Daily digest Optional morning summary notification
๐Ÿ–ฅ๏ธ Web dashboard Dark-theme UI at localhost:7734 (or your hosted URL)
๐Ÿ” Full explainability Every decision logged with reasoning โ€” "Why did you message me?"
๐Ÿ’ค Idle detection Nudges escalate when no Claude session detected for 4+ hours
๐Ÿ“Š Adaptive policy Learns your follow-through patterns per category, boosts flagging commitments
๐Ÿ“‹ Reliability reports Weekly Monday summary: follow-through % by category

Architecture

Claude Desktop
    โ”‚
    โ”œโ”€โ”€ Tools     (save / create_from_text / get / complete / snooze /
    โ”‚              update / explain / budget / digest / set_slack_webhook /
    โ”‚              set_discord_webhook / list_features / enable_feature /
    โ”‚              disable_feature)
    โ””โ”€โ”€ Resources (vigil://pending ยท vigil://status ยท vigil://history)

vigil-mcp process
    โ”œโ”€โ”€ server.py       โ€” FastMCP server, tools, resources, background loop
    โ”œโ”€โ”€ policy.py       โ€” Decision engine (phase โ†’ urgency โ†’ budget โ†’ action)
    โ”œโ”€โ”€ db.py           โ€” SQLite layer (thread-local, multi-user, migrations)
    โ”œโ”€โ”€ dashboard.py    โ€” HTTP dashboard + PWA + CRUD API (localhost:7734 / $PORT)
    โ”œโ”€โ”€ api.py          โ€” FastAPI REST layer (localhost:7735) + cloud entrypoint
    โ”œโ”€โ”€ analyzer.py     โ€” Signal analysis + NL commitment parsing (Claude API)
    โ”œโ”€โ”€ webhooks.py     โ€” Slack/Discord outbound nudges + slash command handler
    โ”œโ”€โ”€ push.py         โ€” Web Push delivery (VAPID + pywebpush)
    โ”œโ”€โ”€ pwa.py          โ€” Manifest, service worker, icons
    โ”œโ”€โ”€ notify.py       โ€” Shared notification delivery (push โ†’ webhooks โ†’ desktop)
    โ”œโ”€โ”€ features.py     โ€” V3 feature flag registry (7 toggleable features)
    โ”œโ”€โ”€ logger.py       โ€” Rotating structured log at ~/.vigil/vigil.log
    โ””โ”€โ”€ integrations/
        โ”œโ”€โ”€ __init__.py              โ€” Fan-out runner (importlib-based, fault-isolated)
        โ”œโ”€โ”€ idle_detection.py        โ€” Live: session heartbeat + idle escalation
        โ”œโ”€โ”€ adaptive_policy.py       โ€” Live: per-category follow-through learning
        โ”œโ”€โ”€ reliability_reports.py   โ€” Live: weekly Monday digest by category
        โ”œโ”€โ”€ github_integration.py    โ€” Stub: stale PR commitment creation
        โ”œโ”€โ”€ calendar_sync.py         โ€” Stub: pre-meeting commitment surfacing
        โ”œโ”€โ”€ accountability_partners.py โ€” Stub: Slack DM to accountability partner
        โ””โ”€โ”€ shared_commitments.py    โ€” Stub: team-visible commitments via Slack

~/.vigil/
    โ”œโ”€โ”€ commitments.db  โ€” All data (commitments, decision_log, settings)
    โ””โ”€โ”€ vigil.log       โ€” Structured log (grep-friendly)

Tools

Tool What it does
create_from_text Parse natural language into a commitment automatically
save_commitment Capture a commitment with explicit fields (due date, intent, importance, recurrence)
get_commitments List all pending with phase, state, and stats
complete_commitment Mark done; auto-reschedules if recurring
snooze_commitment Push deadline to a later time
update_commitment Edit description, deadline, importance, intent, or summary
explain_nudge Full decision trace for a commitment
set_attention_budget Set daily nudge cap (default: 10)
set_daily_digest_time Morning summary notification at HH:MM
set_slack_webhook Route nudges to a Slack channel
set_discord_webhook Route nudges to a Discord channel
list_features Show all V3 features and their on/off state
enable_feature Turn on a V3 feature by name
disable_feature Turn off a V3 feature by name

Resources

Resource Content
vigil://pending Pending commitments grouped by phase โ€” Claude reads this at session start
vigil://status System health: budget used, config, stats
vigil://history Completed commitments and follow-through rate

Commitment schema

{
  description:      str,
  due_by:           ISO 8601 datetime,
  ai_summary:       str,    # 2-sentence context of what was being worked on
  intent_strength:  "hard" | "soft" | "hypothetical",
  importance_score: 0.0โ€“1.0,
  confidence_score: 0.0โ€“1.0,
  state:            "captured" | "scheduled" | "in_progress" | "at_risk" | "overdue" | "completed" | "abandoned",
  recurrence:       "none" | "daily" | "weekly" | "monthly",
  recurrence_days:  ["monday", "thursday"],  # for weekly
  recurrence_time:  "HH:MM",
}

V3 Features

Vigil V3 adds three directions of capability behind toggleable feature flags. All are off by default โ€” turn them on via Claude or the dashboard.

Enable via Claude

list_features()
enable_feature("idle_detection")
enable_feature("adaptive_policy")
enable_feature("reliability_reports")

Enable at startup (env var)

VIGIL_FEATURES=idle_detection,adaptive_policy,reliability_reports vigil

Feature registry

Feature Direction Status Required env var
idle_detection Context Awareness Live โ€”
adaptive_policy Adaptive Live โ€”
reliability_reports Adaptive Live โ€”
github_integration Context Awareness Stub GITHUB_TOKEN
calendar_sync Context Awareness Stub GOOGLE_CALENDAR_TOKEN
accountability_partners Multi-Person / Team Stub VIGIL_SLACK_BOT_TOKEN
shared_commitments Multi-Person / Team Stub VIGIL_SLACK_BOT_TOKEN

Idle Detection

Tracks the last time Claude read vigil://pending (i.e. the last time you opened a session). If no session is detected for 4+ hours and you have overdue or at-risk commitments, Vigil fires a push/Slack/desktop nudge.

  • Cooldown: 2 hours between idle nudges
  • Threshold: VIGIL_IDLE_HOURS env var (default: 4)
  • Resumes normal nudge schedule once you open a new session

Adaptive Policy

Runs once per day. Looks at your completed and abandoned commitments grouped by context category. Categories with โ‰ฅ 3 resolved commitments and < 50% follow-through are marked low-reliability.

Pending commitments in those categories get their importance_score boosted 15% (capped at 0.95) so they are more likely to clear the policy engine's threshold and generate a nudge. Every boost is written to decision_log โ€” explain_nudge shows you exactly why.

Reliability Reports

Every Monday at 09:00 (configurable via VIGIL_REPORT_HOUR), Vigil sends a summary of the past week's follow-through, broken down by category:

Past 7 days: 7/10 done (70%)
3 still pending
By category:
  โœ“ work: 4/5 (80%)
  โœ“ personal: 2/3 (67%)
  โš  learning: 1/3 (33%)

Categories marked โš  are candidates for Adaptive Policy boosting. Report is deduped by ISO week โ€” it won't re-fire if the process restarts.


Web dashboard

A local dashboard runs at http://localhost:7734 whenever Vigil is active.

  • Natural language bar at the top โ€” type "remind me to push the PR before EOD" and press Enter
  • Stats: follow-through %, completed, pending, overdue, nudges today
  • Commitments grouped by phase with colour-coded left borders
  • "Why?" expandable button โ€” full policy decision trace per commitment
  • Integrations panel โ€” paste a Slack or Discord webhook URL and save
  • V3 Features panel โ€” toggle switches for all 7 features, amber warning when env var is missing
  • Auto-refreshes every 30 seconds
  • Installable as a PWA (mobile)

Installation

Requirements: Python 3.10+, macOS / Windows / Linux

git clone https://github.com/prodbysilky/vigil-mcp
cd vigil-mcp
python3 -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

Option A โ€” Claude Desktop (MCP) โ€” simplest

pip install -e .

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "vigil": {
      "command": "/absolute/path/to/vigil-mcp/.venv/bin/vigil-mcp"
    }
  }
}

Or with uvx (no venv needed):

{
  "mcpServers": {
    "vigil": {
      "command": "uvx",
      "args": ["vigil-mcp"]
    }
  }
}

Restart Claude Desktop (Cmd+Q, then reopen). Vigil starts automatically.

Option B โ€” Standalone / ChatGPT / any HTTP client

pip install -e ".[api]"   # adds FastAPI + uvicorn
vigil                     # starts dashboard + REST API, no Claude needed

The REST API runs at http://localhost:7735. Interactive docs at /docs. The dashboard runs at http://localhost:7734.

Option C โ€” Hosted mode (public URL, mobile push, auth-protected)

Deploy once, visit from any device, install the PWA to your home screen, get push notifications on your phone. Works on iOS 16.4+ and all Android.

1. Generate VAPID keys (one-time):

pip install -e ".[hosted]"
python -c "from vigil_mcp.push import generate_vapid_keys; \
           priv, pub = generate_vapid_keys(); \
           print('VIGIL_VAPID_PRIVATE_KEY=' + repr(priv)); \
           print('VIGIL_VAPID_PUBLIC_KEY=' + pub)"

2. Deploy to Railway (or Render / Fly โ€” all read $PORT):

  • New project โ†’ Deploy from GitHub repo
  • Set environment variables (see table below)
  • Railway auto-detects Procfile + railway.json; healthcheck hits /manifest.json

3. Set a secret token (so only you can access the dashboard):

VIGIL_SECRET_TOKEN=your-secret-here

Your dashboard URL becomes: https://your-app.up.railway.app/?token=your-secret-here

4. Install on phone:

  • Open https://your-app.up.railway.app/?token=your-secret-here in Safari (iOS) or Chrome (Android)
  • "Add to Home Screen"
  • Launch from home screen, tap "Enable notifications"

Environment variables

Variable Required Purpose
VIGIL_SECRET_TOKEN Recommended for hosted Bearer token for dashboard + API auth
ANTHROPIC_API_KEY For NL parsing + signal analysis Powers create_from_text and auto-commitment creation
VIGIL_VAPID_PRIVATE_KEY For Web Push Signs push notifications
VIGIL_VAPID_PUBLIC_KEY For Web Push Sent to browsers for subscription
VIGIL_VAPID_SUBJECT For Web Push mailto:you@example.com (defaults to mailto:admin@example.com)
VIGIL_SLACK_WEBHOOK For Slack nudges Incoming webhook URL (alternative to setting via Claude/dashboard)
VIGIL_DISCORD_WEBHOOK For Discord nudges Webhook URL (alternative to setting via Claude/dashboard)
VIGIL_SLACK_SIGNING_SECRET For Slack slash commands Verifies /vigil commands come from Slack
VIGIL_FEATURES Optional Comma-separated list of V3 features to auto-enable on startup
VIGIL_IDLE_HOURS Optional Hours of inactivity before idle nudge fires (default: 4)
VIGIL_REPORT_HOUR Optional Hour (0โ€“23) for Monday reliability report (default: 9)
TIMEZONE Optional Local timezone for recurring scheduling (default: Europe/Budapest)
PORT Set by Railway/Render Cloud port โ€” auto-detected, do not set manually
GITHUB_TOKEN For github_integration feature Personal access token with repo scope
GOOGLE_CALENDAR_TOKEN For calendar_sync feature OAuth token for Google Calendar API
VIGIL_SLACK_BOT_TOKEN For accountability/shared features Bot token with chat:write scope

Slack integration

Vigil sends nudges to Slack and accepts /vigil slash commands.

Outbound nudges (via webhook)

  1. Go to api.slack.com/apps โ†’ Create New App โ†’ From Scratch
  2. Incoming Webhooks โ†’ Enable โ†’ Add to Workspace โ†’ pick a channel โ†’ copy the URL
  3. Set in Claude: set_slack_webhook("https://hooks.slack.com/services/...")
    Or paste it in the dashboard Integrations panel.

Inbound slash commands (/vigil remind me to X)

  1. Slash Commands โ†’ Create New Command:
    • Command: /vigil
    • Request URL: https://your-app.up.railway.app/api/slack/command
    • Short Description: Create a Vigil commitment
  2. Basic Information โ†’ Signing Secret โ†’ copy it โ†’ set VIGIL_SLACK_SIGNING_SECRET env var

Usage: /vigil remind me to push the PR before EOD


Discord integration

  1. In Discord: Channel Settings โ†’ Integrations โ†’ Webhooks โ†’ New Webhook โ†’ copy URL
  2. Set in Claude: set_discord_webhook("https://discord.com/api/webhooks/...")
    Or paste it in the dashboard Integrations panel.

Vigil sends rich embeds (amber colour) to the channel whenever a nudge fires.


Example flows

Natural language capture

You:   "remind me to push this PR before EOD"
Vigil: parses โ†’ description="Push PR", due_by="today 18:00", importance=0.7
       โ†’ saved. No form filling needed.

High-importance missed deadline

You:     "I'll push this to GitHub before end of day"
Vigil:   saves commitment, importance=0.7, due=17:00

[17:00 โ€” no action yet]
Policy:  phase=overdue, urgency=0.72, budget=3/10
         โ†’ NOTIFY: desktop + Slack: "You said you'd push to GitHub"

[next Claude session]
Claude:  "Hey โ€” your GitHub push is overdue. Want to do it now?"

Idle detection escalation

You:     "I'll review those PRs this afternoon"
Vigil:   saves commitment, due=17:00

[No Claude session opened since 13:00 โ€” 4 hours idle]
Idle:    phase=overdue, no session detected
         โ†’ PUSH + Slack: "4h idle โ€” PR review is overdue"

Adaptive policy in action

[End of day โ€” adaptive_policy runs]
Policy:  "learning" category: 1/4 resolved (25% rate)
         โ†’ 3 pending "learning" commitments boosted +15% importance
         โ†’ Next policy cycle: importance 0.5 โ†’ 0.58, clears threshold
         โ†’ Nudge fires that would have been suppressed

Recurring commitment

You:     "Every Monday morning I want to review my job applications"
Vigil:   saves with recurrence=weekly, recurrence_days=["monday"], recurrence_time="09:00"

[Monday 09:00] โ†’ NOTIFY
You:     "Done" โ†’ complete_commitment โ†’ next Monday auto-scheduled

Weekly reliability report

[Monday 09:00]
Vigil:  "Past 7 days: 7/10 done (70%)
         โœ“ work: 4/5 (80%)
         โœ“ personal: 2/3 (67%)
         โš  learning: 1/3 (33%)"

REST API

The REST API runs at http://localhost:7735 when fastapi + uvicorn are installed (pip install vigil-mcp[api]). Interactive OpenAPI docs at /docs.

Method Endpoint Description
GET /commitments List all pending
POST /commitments Save a commitment (structured)
POST /commitments/from-text Create from natural language
GET /commitments/{id} Get one commitment
PATCH /commitments/{id} Edit fields
POST /commitments/{id}/complete Mark done
POST /commitments/{id}/snooze Snooze to new time
DELETE /commitments/{id} Archive
GET /commitments/{id}/decisions Policy decision trace
GET /signals Recent behavioral signals
POST /signals Ingest a signal
GET /stats Overall follow-through stats
GET /settings Current settings
PUT /settings/budget Set daily attention budget
PUT /settings/digest Set daily digest time
GET /features List V3 features
PUT /features/{name} Enable/disable a V3 feature

All endpoints accept Authorization: Bearer <VIGIL_SECRET_TOKEN> when a token is set.


Logs

tail -f ~/.vigil/vigil.log
grep "action=notify" ~/.vigil/vigil.log
grep "auto_abandoned" ~/.vigil/vigil.log
grep "commitment_id=3" ~/.vigil/vigil.log
grep "adaptive_boost" ~/.vigil/vigil.log
grep "idle_nudge_sent" ~/.vigil/vigil.log
grep "reliability_report_sent" ~/.vigil/vigil.log

Compatibility

Platform How to connect Notes
Claude Desktop pip install -e . โ†’ MCP config Plug-and-play, full tool support
Cursor / Cline / Zed Same as Claude Desktop Works out of the box
ChatGPT Custom GPT Deploy hosted mode โ†’ point GPT Action at /openapi.json Full CRUD via REST
iPhone / Android Visit hosted URL โ†’ Add to Home Screen โ†’ enable notifications PWA + Web Push, no app store
Slack Incoming webhook (outbound) + slash command (inbound) /vigil creates commitments
Discord Incoming webhook Nudges as rich embeds
Any web app / script REST API at localhost:7735 or hosted URL Standard JSON HTTP
No AI at all vigil โ†’ open localhost:7734 Full dashboard UI โ€” add/complete/snooze without any AI

Why this is different

  • Not a reminder app โ€” it reasons about when to interrupt you, not just what to remind you about
  • Not a wrapper โ€” the policy engine is the product
  • Explainable โ€” every decision is logged and queryable. Ask "why did you message me?" and get the full trace
  • Self-tuning โ€” adaptive policy adjusts importance scores based on your actual follow-through behavior
  • Idle-aware โ€” knows when you've been away too long and escalates accordingly
  • Local-first โ€” all data stays on your machine (SQLite in ~/.vigil/)
  • Natural input โ€” type plain English; Vigil figures out the structure
  • Extensible โ€” V3 feature flag system lets you add GitHub, calendar, and team features when you need them

Built with

  • MCP Python SDK โ€” FastMCP server
  • Anthropic SDK โ€” NL parsing via claude-haiku
  • SQLite โ€” local-first, thread-safe persistence
  • Python stdlib only for webhooks โ€” no extra dependencies for Slack/Discord delivery

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

vigil_mcp-0.2.0.tar.gz (72.8 kB view details)

Uploaded Source

Built Distribution

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

vigil_mcp-0.2.0-py3-none-any.whl (70.2 kB view details)

Uploaded Python 3

File details

Details for the file vigil_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: vigil_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 72.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for vigil_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ae428318876724b002e044de5c9e3637ceadba0737aa2f4fa898ccf0176c8200
MD5 adeb582a5cc096b070d5d6221b846f73
BLAKE2b-256 9a9d95f4f986bd38912f899101552e6b7b5d15a6d0c89dd75d51f6e4d9b3ad23

See more details on using hashes here.

File details

Details for the file vigil_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: vigil_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 70.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for vigil_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c74c72b70a1e146db12d6e27caa9e1d3dddab450a09ee74cacfa5d391411bc42
MD5 735ec500ed54e7feac00c2e5ae2e908c
BLAKE2b-256 4dd4df3b069d19353aff6f66be07557e60436e26ec32b05403455c61249f07c9

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