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:
- 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
- A policy engine runs in the background โ every 60 seconds, it evaluates every pending commitment against 7 conditions before deciding whether to act
- When you open a new session, Claude reads
vigil://pendingand opens with urgent items naturally โ "Hey, you said you'd finish the README. Still on it?" - Desktop and push notifications fire when things are overdue and you haven't opened Claude yet
- Nudges go to Slack or Discord if you've configured a webhook
- V3 integrations run every 5 minutes โ idle detection, adaptive learning, and weekly reports work silently in the background
- 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_HOURSenv 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-herein 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)
- Go to api.slack.com/apps โ Create New App โ From Scratch
- Incoming Webhooks โ Enable โ Add to Workspace โ pick a channel โ copy the URL
- 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)
- Slash Commands โ Create New Command:
- Command:
/vigil - Request URL:
https://your-app.up.railway.app/api/slack/command - Short Description:
Create a Vigil commitment
- Command:
- Basic Information โ Signing Secret โ copy it โ set
VIGIL_SLACK_SIGNING_SECRETenv var
Usage: /vigil remind me to push the PR before EOD
Discord integration
- In Discord: Channel Settings โ Integrations โ Webhooks โ New Webhook โ copy URL
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vigil_mcp-0.2.1.tar.gz.
File metadata
- Download URL: vigil_mcp-0.2.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b13afaa87eb151ea3261e90c99810582b056b68087794c173bf2307eeb4945ad
|
|
| MD5 |
384da2b9437f5410623d2d1478b01c92
|
|
| BLAKE2b-256 |
16de6250eba5942d1648b2ddb34359a7a7a9255c581c49c3064a7370e4ffd471
|
File details
Details for the file vigil_mcp-0.2.1-py3-none-any.whl.
File metadata
- Download URL: vigil_mcp-0.2.1-py3-none-any.whl
- Upload date:
- Size: 70.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
889b67fae9195540c9621bc0ca505f0e132fbc3f2bc0d94a7717bab9e6a1c102
|
|
| MD5 |
fc9c212025904447eef7aafa2a8a774a
|
|
| BLAKE2b-256 |
d7aa2f70ae6f0ece19356653fef9102f943c364547cfe637123c2331ee4a7b7b
|