Skip to main content
Glama
EllGree
by EllGree

mailbox-mcp

MCP server for inter-agent mailbox communication. Structured API over the existing <repo>/.claude/{inbox,outbox}/*.md file convention used by Grygoriy's Claude-Code orchestration setup.

Status: Phase 1 in development.

Full spec: see SPEC.md.

Quick start

npm install
npm run build
npm start                # runs the MCP server over stdio

Register in ~/.claude.json under mcpServers:

{
  "mcpServers": {
    "mailbox": {
      "command": "node",
      "args": ["C:\\Users\\Gree\\workspace\\tools\\mailbox-mcp\\dist\\index.js"]
    }
  }
}

Restart Claude Code. Verify via /mcp — should list mailbox as connected.

Related MCP server: claude-presence

Tool surface (Phase 1)

  • mail_send(to, topic, body, [status, refs, reply_to, labels]) — drop a mail into target agent's inbox

  • mail_list(agent, folder, [status, since, labels, limit]) — list mails

  • mail_get(id, agent, folder) — read full mail

  • mail_reply(in_reply_to, body, [topic, to, parent_status, initial_status, ...]) — reply + auto-flip parent. Topic defaults to the parent's — same conversation continues; pass an explicit topic only to fork the subject.

  • mail_status(id, agent, folder, status) — flip status, audit-logged

  • mail_thread(root_id) — full thread tree

See SPEC.md for details.

Phase 2 (planned)

GitLab pipeline / MR watchers + templates + scheduled / conditional send. Separate background daemon.

Layout

src/
├── index.ts              # MCP server entrypoint
├── types.ts              # Mail types
├── config.ts             # Agent enum + paths
├── tools/                # One file per tool
└── storage/              # File I/O, frontmatter, naming, audit

Notes

mail_reply topic behavior — the reply's topic defaults to the parent's topic (same conversation continues). Pass an explicit topic only when the reply forks the subject. Previously the schema required topic; if a caller omitted it, the JS coerced undefined → the literal string "undefined" past the regex-only validator, producing filenames like 2026-07-07-1111-undefined.md and frontmatter with no topic: key — which mail_list then silently skipped as malformed. assertValidTopic now hard-rejects non-string / empty.

License

MIT — see LICENSE.

Available Tools

7 tools
mail_getA

Fetch a single mail by id from a given agent's folder. Returns full metadata + markdown body + absolute path.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesMail id (YYYYMMDD-HHMM-xxxxxx).
agentYes
folderYes

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It reveals return content (full metadata + markdown body + absolute path), which is useful, but does not disclose if the operation is read-only, any required permissions, or potential errors. The description adds some value but is not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences that front-load the purpose and return information. No redundant words or phrases. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity and lack of output schema, the description adequately covers the core functionality and return values. However, it could mention error cases or state that the operation is read-only to be fully complete. Minor gap for a straightforward fetch tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 3 parameters with only 33% description coverage (only 'id' has a description). The description mentions 'from a given agent's folder', matching 'agent' and 'folder', but does not add further meaning about their enumeration values or constraints. It fails to compensate for the low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (fetch), the resource (a single mail), and the context (by id from a given agent's folder). It distinguishes from siblings like mail_list (list) and mail_thread (thread).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when needing a single mail by id, but does not provide explicit guidance on when to use this over alternatives like mail_list for batch retrieval or mail_thread for conversation context. No exclusions or prerequisites mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mail_listA

List mails in a target agent's inbox or outbox. Filters: status, since (ISO date), labels (any-match), limit (default 100). Sorted newest-first.

ParametersJSON Schema
NameRequiredDescriptionDefault
agentYes
limitNo
sinceNoISO 8601 date.
folderYes
labelsNo
statusNoSingle status or array.

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that results are sorted newest-first and that filters are available, but does not mention read-only nature, rate limits, or any side effects. Adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that immediately states the purpose and lists key filters, with no wasted words. It is efficiently front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the basic list operation and filters, but lacks details on return format, pagination behavior, error handling, and does not mention offset or total count. Given the absence of an output schema, more completeness would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds context beyond the schema by specifying 'any-match' for labels, 'ISO date' for since, and default limit of 100. However, with only 33% schema description coverage, it does not fully compensate for the undocumented parameters like agent and folder (though they are enums).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List mails in a target agent's inbox or outbox', specifying verb and resource. It distinguishes from sibling tools like mail_get, mail_send, and mail_reply by focusing on listing, and lists specific filters.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly indicates when to use the tool (to list mails) and mentions filters for narrowing results. However, it does not provide explicit guidance on when not to use it or alternatives among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mail_migrateA

Backfill id: frontmatter into hand-written legacy briefs in a given folder. Scans .md files, generates an id from filename timestamp + nanoid suffix for any file missing one, rewrites atomically. Use dry_run: true first to preview.

ParametersJSON Schema
NameRequiredDescriptionDefault
agentYes
folderYes
dry_runNo

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Describes the process: scans .md files, generates id from filename timestamp + nanoid, only for files missing id, rewrites atomically. Good detail given no annotations; missing state about files with existing id.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with verb and object, no wasted words. Efficient and scannable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema; description does not specify return values or failure modes. Lacks details on file matching and atomic rewrite guarantees. Somewhat complete but missing key aspects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description mentions folder and dry_run but does not explain the 'agent' parameter, which is an enum with unclear purpose. Schema provides no descriptions, so parameter semantics are weak.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (backfill id frontmatter) and resource (hand-written legacy briefs in a given folder). It distinguishes from sibling mail tools which handle email operations, so purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides a clear instruction to use 'dry_run: true' first for preview. No explicit comparison to alternatives, but siblings are different domains, so it's adequately guided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mail_replyA

Reply to a mail. Finds parent in the CALLER's own inbox or outbox (use mail_send if you need to reply across agents), sends the reply with to = parent.from by default, and auto-flips the parent's status to 'done'. One tool call instead of three.

ParametersJSON Schema
NameRequiredDescriptionDefault
toNoOverride recipient. Default = parent.from.
refNo
bodyYes
refsNoExternal links: issue, mr, ticket URLs + depends_on (array of mail ids).
topicNoOptional topic override. Default = parent's topic (same conversation continues). Pass an explicit slug only when forking the subject. Slug for the filename. Letters, digits, dashes; start with alphanum; max 81 chars. Uppercase allowed for ticket prefixes — e.g. 'OXXII-2577-pass-2' or 'fix-nbsp-encoding'.
labelsNo
in_reply_toYesParent mail id (must exist in caller's inbox or outbox).
parent_statusNoStatus to flip parent to. Default 'done'.
initial_statusNoStatus of the new reply mail. Default 'open'.

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries the full burden. It discloses key behaviors: finding parent, default `to`, auto-flipping parent status to 'done', and consolidating operations. However, it omits error handling and response format.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences with essential information front-loaded. No unnecessary words; every sentence contributes to understanding the tool's purpose and usage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While the description covers purpose and key behaviors, it does not mention the return value or expected output. With no output schema, this is a gap. The tool also has nested objects not described in the tool description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67%, so baseline is 3. The description adds value by explaining defaults for `to` and `parent_status`, but does not detail each parameter. Overall, it supplements the schema adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool replies to a mail, specifies scoping to caller's inbox/outbox, and distinguishes from sibling `mail_send` for cross-agent replies. It is specific and action-oriented.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells when to use this tool vs `mail_send` for cross-agent replies, and notes it consolidates three operations into one call, providing clear context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mail_sendA

Send a brief/message to another agent's inbox. Writes a YAML-frontmatter markdown file to /.claude/inbox/-.md atomically. Caller identity comes from MAILBOX_MCP_AGENT_ID env var (default 'workspace'). Use this instead of writing files manually — it enforces naming, frontmatter, and audit.

ParametersJSON Schema
NameRequiredDescriptionDefault
toYesTarget agent.
refNoOne-line summary for list views.
bodyYesMarkdown body of the brief.
refsNoExternal links: issue, mr, ticket URLs + depends_on (array of mail ids).
topicYesSlug for the filename. Letters, digits, dashes; start with alphanum; max 81 chars. Uppercase allowed for ticket prefixes — e.g. 'OXXII-2577-pass-2' or 'fix-nbsp-encoding'.
labelsNo
statusNoInitial status. Default 'open'.
reply_toNoParent mail id. Use mail_reply for the convenience wrapper that also flips parent status.

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It discloses atomic write and caller identity from env var, but does not specify overwrite behavior, failure modes, or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two efficient sentences with front-loaded purpose. No fluff, all information is relevant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 8 parameters (3 required) and no output schema, the description covers core behavior and file naming adequately. Missing details on error handling and idempotency are minor gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 88%, so baseline 3. Description does not add parameter details beyond the schema, which is sufficient given the high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool sends a brief/message to another agent's inbox, specifies the mechanism (atomic write to a specific path), and distinguishes from writing files manually.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly recommends using this tool instead of manual file writes, providing context for when to use it. It does not explicitly contrast with sibling tools like mail_reply but the context is clear enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mail_statusB

Change a mail's status. Validates the state-machine transition (open ↔ holding → done/superseded; done and superseded are terminal). Atomic write + audit entry.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes
agentYes
folderYes
statusYes

TDQS

B3.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses atomic write and audit entry behavior, and states that the tool validates state-machine transitions. This adds valuable behavioral context beyond what annotations (which are absent) would provide. It is clear about the operation being a state change with constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise at two sentences, with the core action in the first sentence. It efficiently conveys the state-machine validation and atomic/audit behavior without unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (4 required parameters with enums, no output schema, no annotations), the description is incomplete. It omits parameter details and does not specify what the tool returns (e.g., a success indicator or updated mail object). The state-machine info is helpful but insufficient for full invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fails to explain any parameters. The status parameter's allowed transitions are implied but not explicitly linked. The agent and folder parameters are left completely unexplained, leaving the agent without guidance on their meaning or usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'change' and the resource 'mail's status'. It explains the state-machine validation and distinguishes this tool from sibling tools focused on reading, listing, migrating, replying, sending, or threading mails.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives (e.g., mail_reply might also change status). The description implies it is for status updates but does not provide when-not-to-use or mention alternative tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mail_threadA

Walk the reply_to graph rooted at the given mail. Returns root + descendants in breadth-first order with depth annotation. Scans all known agents' folders — expensive but complete.

ParametersJSON Schema
NameRequiredDescriptionDefault
root_idYesMail id of the thread root.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, but the description discloses it scans all agents' folders and is expensive, providing good behavioral insight without contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences are front-loaded with the core action and then context; no redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with one parameter and no output schema, the description explains return order, depth annotation, and the expensive nature, but missing failure behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the parameter description is clear; the description does not add significant semantics beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool walks the reply_to graph and returns root and descendants in BFS order with depth annotation, distinguishing it from siblings like mail_get or mail_reply.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions it is expensive but complete, implying use for thorough thread traversal, but does not explicitly list alternatives or when not to use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 7 tool updatesv0.1.0
    • First observedmail_get
    • First observedmail_list
    • First observedmail_migrate
    • First observedmail_reply
    • First observedmail_send
    • First observedmail_status
    • First observedmail_thread

TDQS

A4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: retrieving specific mails, listing mails, migrating legacy files, replying to mails, sending new mails, changing status, and traversing threads. No two tools overlap in functionality.

Naming Consistency5/5

All tool names follow the consistent pattern 'mail_<verb>' with lowercase snake_case verbs (get, list, migrate, reply, send, status, thread). The naming is perfectly uniform.

Tool Count5/5

7 tools is well-scoped for a mailbox server. The set covers the essential operations without being excessive. Each tool serves a distinct and necessary function.

Completeness4/5

The tool surface covers core mailbox operations: fetching, listing, sending, replying, status management, and thread traversal. Minor gaps exist (e.g., no direct deletion), but status updates (done/superseded) effectively serve as archival, so the surface is mostly complete.

Maintenance

ActivityStale
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    MCP server that gives Claude and other MCP hosts full access to Mail.app on macOS — search, read, send, reply, flag, move, and more across all accounts configured in Mail.app.
    24
    98
    1
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Minimal MCP server for inter-session coordination between parallel Claude Code instances, providing presence registry, advisory resource locks, and a broadcast inbox.
    20
    12
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Local IMAP/SMTP MCP server that lets Claude read, search, draft, send, flag, and move mail across multiple IMAP mailboxes. Credentials stay on your machine.
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/EllGree/mailbox-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server