dicklesworthstone/mcp_agent_mail/mcp-agent-mail
Claude Code and agent skill by dicklesworthstone/mcp_agent_mail
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
MCP Agent Mail - Mail-like coordination layer for multi-agent workflows. Identities, inbox/outbox, file reservations, contact policies, threaded messaging, pre-commit guard, Human Overseer, static exports, disaster recovery. Git+SQLite backed. Python/FastMCP.
Install
npx vskill@latest install dicklesworthstone/mcp_agent_mail/mcp-agent-mailSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
MCP Agent Mail
A mail-like coordination layer for coding agents exposed as an HTTP-only FastMCP server. Provides memorable identities, inbox/outbox, file reservation leases, contact policies, searchable message history, and Human Overseer messaging. Backed by Git (human-auditable artifacts) and SQLite (fast queries with FTS5).
Why This Exists
Without coordination, multiple agents:
- Overwrite each other's edits or panic on unexpected diffs
- Miss critical context from parallel workstreams
- Require humans to relay messages between tools
Agent Mail solves this with:
- Memorable identities (adjective+noun names like "GreenCastle")
- Advisory file reservations to signal editing intent
- Threaded messaging with importance levels and acknowledgments
- Pre-commit guard to enforce reservations at commit time
- Human Overseer for direct human-to-agent communication
Starting the Server
Default: http://127.0.0.1:8765 Web UI for humans: http://127.0.0.1:8765/mail
Core Concepts
Projects
Each working directory (absolute path) is a project. Agents in the same directory share a project namespace. Use the same project_key for agents that need to coordinate.
Agent Identity
Agents register with adjective+noun names (GreenCastle, BlueLake). Names are unique per project, memorable, and appear in inboxes, commit logs, and the web UI.
File Reservations (Leases)
Advisory locks on file paths or globs. Before editing files, reserve them to signal intent. Other agents see the reservation and can choose different work. The optional pre-commit guard blocks commits that conflict with others' exclusive reservations.
Contact Policies
Per-agent policies control who can message whom:
| Policy | Behavior | |
|---|---|---|
open | Accept any message in the project | |
auto (default) | Allow if shared context exists (same thread, overlapping reservations, recent contact) | |
contacts_only | Require explicit contact approval first | |
block_all | Reject all new contacts |
Messages
GitHub-Flavored Markdown with threading, importance levels (low, normal, high, urgent), and optional acknowledgment requirements. Images are auto-converted to WebP.
Essential Workflow
1. Start Session (One-Call Bootstrap)
Returns: {project, agent, file_reservations, inbox}
This single call: ensures project exists, registers your identity, optionally reserves files, fetches your inbox.
2. Reserve Files Before Editing
Returns: {granted: [...], conflicts: [...]}
Conflicts are reported but reservations are still granted. Check conflicts and coordinate if needed.
3. Announce Your Work
4. Check Inbox Periodically
Or use resources for fast reads:
5. Release Reservations When Done
The Four Macros
Prefer macros for speed and smaller models. Use granular tools when you need fine control.
| Macro | Purpose | |
|---|---|---|
macro_start_session | Bootstrap: ensure project → register agent → optional file reservations → fetch inbox | |
macro_prepare_thread | Join existing conversation: register → summarize thread → fetch inbox context | |
macro_file_reservation_cycle | Reserve files, do work, optionally auto-release when done | |
macro_contact_handshake | Request contact permission, optionally auto-accept, send welcome message |
Beads Integration (bd-### Workflow)
When using Beads for task management, keep identifiers aligned:
Use bd-### as:
- Mail
thread_id - Message subject prefix
[bd-###] - File reservation
reason - Commit message reference
Beads Viewer (bv) Integration
Use bv's robot flags for intelligent task selection:
| Flag | Output | Use Case | |
|---|---|---|---|
bv --robot-insights | PageRank, critical path, cycles | "What's most impactful?" | |
bv --robot-plan | Parallel tracks, unblocks | "What can run in parallel?" | |
bv --robot-priority | Recommendations with confidence | "What should I work on next?" | |
bv --robot-diff --diff-since <ref> | Changes since commit/date | "What changed?" |
Rule of thumb: Use bd for task operations, use bv for task intelligence.
Cross-Project Coordination
For frontend/backend or multi-repo projects:
Option A: Shared project_key Both repos use the same project_key. Agents coordinate automatically.
Option B: Separate projects with contact links
Pre-Commit Guard
Install the guard to block commits that conflict with others' exclusive reservations:
Guard Features
- Composition-safe: Chain-runner preserves existing hooks in
hooks.d/ - Rename-aware: Checks both old and new paths for renames/moves
- NUL-safe: Handles paths with special characters
- Git-native matching: Uses Git wildmatch pathspec semantics
Set AGENT_NAME environment variable so the guard knows who you are.
Bypass in emergencies: AGENT_MAIL_BYPASS=1 git commit ...
Tools Reference
Project & Identity
| Tool | Purpose | |
|---|---|---|
ensure_project(human_key) | Create/ensure project exists | |
register_agent(project_key, program, model, name?, task_description?) | Register identity | |
whois(project_key, agent_name) | Get agent profile with recent commits | |
create_agent_identity(project_key, program, model) | Always create new unique agent |
Messaging
| Tool | Purpose | |
|---|---|---|
send_message(project_key, sender, to, subject, body_md, ...) | Send message | |
reply_message(project_key, message_id, sender, body_md) | Reply (preserves thread) | |
fetch_inbox(project_key, agent, limit?, since_ts?, urgent_only?) | Get messages | |
mark_message_read(project_key, agent, message_id) | Mark as read | |
acknowledge_message(project_key, agent, message_id) | Acknowledge receipt | |
search_messages(project_key, query) | FTS5 search | |
summarize_thread(project_key, thread_id) | Extract key points and actions |
File Reservations
| Tool | Purpose | |
|---|---|---|
file_reservation_paths(project_key, agent, paths, ttl?, exclusive?) | Reserve files | |
release_file_reservations(project_key, agent, paths?) | Release reservations | |
renew_file_reservations(project_key, agent, extend_seconds?) | Extend TTL | |
force_release_file_reservation(project_key, agent, reservation_id) | Clear stale reservation |
Contact Management
| Tool | Purpose | |
|---|---|---|
request_contact(project_key, from_agent, to_agent, reason?) | Request permission to message | |
respond_contact(project_key, to_agent, from_agent, accept) | Accept/deny contact request | |
list_contacts(project_key, agent_name) | List contact links | |
set_contact_policy(project_key, agent_name, policy) | Set open/auto/contacts_only/block_all |
Resources (Fast Reads)
Use resources for quick, non-mutating reads:
Search Syntax (FTS5)
Example: search_messages(project_key, '"auth module" AND error NOT legacy')
Web UI Features
Browse at http://127.0.0.1:8765/mail:
- Unified inbox across all projects
- Per-project search with FTS5
- Thread viewer with markdown rendering
- File reservations browser
- Human Overseer: Send high-priority messages to agents from the web UI
- Related Projects Discovery: AI-powered suggestions for linking repos
Human Overseer
Send direct messages to agents with automatic preamble:
- Messages marked as
highimportance - Bypasses contact policies
- Agents are instructed to pause current work, complete request, then resume
Static Mailbox Export
Export projects to portable, read-only bundles for auditors, stakeholders, or archives:
Export Features
- Ed25519 cryptographic signing
- Age encryption for confidential distribution
- Scrub presets:
standard(removes secrets) orstrict(redacts bodies) - Deploy to GitHub Pages or Cloudflare Pages via wizard
Disaster Recovery
Mailbox Health (Doctor)
Checks: stale locks, database integrity, orphaned records, FTS sync, expired reservations.
Common Pitfalls
| Error | Fix | |
|---|---|---|
| "sender_name not registered" | Call register_agent or macro_start_session first | |
| "FILE_RESERVATION_CONFLICT" | Wait for expiry, coordinate, or use non-exclusive | |
| "CONTACT_BLOCKED" | Use request_contact and wait for approval | |
| Empty inbox | Check since_ts, urgent_only, verify agent name matches exactly |
Installation
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingSKILL.md
Popularity
- Repository stars
- 1,805
- Repository forks
- 185
- 7-day trend score
- 37
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 19 Mar 2026, 8 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dicklesworthstone/mcp_agent_mail/mcp-agent-mail)