Skip to content

feat: implement MCP tasks and RFC 6154 mailbox roles#9

Merged
WeekendSuperhero merged 1 commit intomainfrom
weekendsuperhero/rmcp_1_4
Apr 10, 2026
Merged

feat: implement MCP tasks and RFC 6154 mailbox roles#9
WeekendSuperhero merged 1 commit intomainfrom
weekendsuperhero/rmcp_1_4

Conversation

@WeekendSuperhero
Copy link
Copy Markdown
Contributor

@WeekendSuperhero WeekendSuperhero commented Apr 10, 2026

Summary

  • Added MCP task management to support background execution and polling of long-running tools.
  • Replaced hardcoded mailbox names with auto-detection using RFC 6154 special-use attributes (\Trash, \Drafts).
  • Removed custom CompatStdioWorker and switched to the standard rmcp stdio transport.
  • Serialized destructive tool executions per-account using async mutexes.

Changes

Mailbox Roles

  • Removed explicit trash_mailbox and drafts_mailbox settings from AccountConfig.
  • Added role_from_attributes to parse RFC 6154 roles with fallback logic for older servers.
  • Updated MailboxInfo to expose no_select, no_inferiors, and role.

MCP Server & Tasks

  • Implemented TaskManager handling task enqueue, listing, info, results, and cancellation.
  • Added task_support = "optional" to all applicable tools.
  • Enforced synchronization for destructive tools via destructive_locks.

Dependencies & Config

  • Added parking_lot crate for task state synchronization.
  • Removed the Outlook provider from MailProvider.

Test plan

  • Verify tools run correctly as async tasks and correctly report completion status.
  • Check that destructive tools on the same account execute sequentially.
  • Ensure Trash and Drafts mailboxes are correctly identified on legacy and RFC 6154-compliant servers.
  • Validate standard MCP client connections succeed via rmcp stdio transport.

PR description generated by Agent

@agent-pr-updater agent-pr-updater bot changed the title tbd feat: implement MCP tasks and RFC 6154 mailbox roles Apr 10, 2026
@WeekendSuperhero WeekendSuperhero merged commit e1928b2 into main Apr 10, 2026
14 checks passed
@WeekendSuperhero WeekendSuperhero deleted the weekendsuperhero/rmcp_1_4 branch April 10, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant