morning-inbox-mcp
Provides tools for interacting with Gmail, including fetching recent messages, reading full message bodies, archiving messages, marking messages read, starring messages, applying labels, and listing labels.
Allows posting messages to Slack channels, channel IDs, or users as DMs, enabling delivery of a morning inbox summary to Slack.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@morning-inbox-mcp run my morning inbox routine"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gmini
gmini is an MCP server for a daily inbox routine: Gmail triage, a Google Calendar day view, and a five-section Slack summary.
Repository: https://github.com/rusuraluca/gmini
What it does
flowchart LR
Auto["OpenWork Automation 7:00 + 17:00"] --> Agent["Agent"]
Agent --> G["gmini MCP server"]
G --> Gmail["Gmail API"]
G --> Cal["Calendar API"]
G --> Slack["Slack Web API"]
Slack --> Out["DM or channel summary"]Gmail: fetch recent mail, read bodies, archive, star, label, mark read
Calendar: list one day of primary-calendar events
Slack: post a summary in five sections — Today, To reply, Important, Top news, Clean up summary
The agent (OpenWork + a scheduled Automation) decides what is noise, what is urgent, and what needs a reply. gmini only exposes the tools.
Related MCP server: Gmail MCP Server
Tools
Tool | Action |
| List recent messages: metadata + snippet |
| One message, decoded body |
| Remove INBOX label (never deletes) |
| Remove UNREAD label |
| Add STARRED label |
| Apply a label by name, creating it if missing |
| List system and custom labels |
| One day of primary-calendar events |
| Post to |
Quick start
git clone git@github.com:rusuraluca/gmini.git
cd gmini
npm install
cp .env.example .envCloud Console: create a project, enable Gmail API and Calendar API.
OAuth consent screen (External), add your Gmail address as a test user.
Credentials → OAuth client ID → Desktop app → client ID and secret into
.env.npm run auth:google— browser consent, writes.tokens/google-token.json.
Scopes: gmail.modify (cannot delete or send), calendar.readonly, userinfo.email. Upgrading an older token? Re-run step 4.
Slack
api.slack.com/apps → Create New App → From scratch.
Bot Token Scopes:
chat:write,channels:read,groups:read,im:write.Install to Workspace → Bot User OAuth Token (
xoxb-...) into.env.Optional in
.env:SLACK_DEFAULT_CHANNEL(#channel,C0123456789, or user id for a DM),CALENDAR_TIMEZONE(defaultEurope/London).
Slack listener (OpenWork bridge)
npm run start:slack turns your Gmini app into a two-way bridge: mentions and DMs become OpenWork Cloud agent sessions, and the answer is posted back in the same thread with a confirmation of every action taken.
flowchart LR
S["@Gmini or DM"] --> B["bridge (Socket Mode)"]
B --> O["OpenWork gateway"]
O --> C["Cloud agent session"]
C --> SSlack app → Socket Mode → enable → generate an app-level token (
xapp-...).Bot Token Scopes: add
app_mentions:read,im:history.Event Subscriptions → Subscribe to bot events:
app_mention,message.im→ reinstall the app..env:SLACK_SOCKET_TOKEN(xapp-...),SLACK_ALLOWED_USER(your user id — the bridge refuses everyone else).npm run start:slack— first run opens a browser to sign in to OpenWork once (token cached in.tokens/openwork-mcp.json,0600).
Notes: only SLACK_ALLOWED_USER can drive the bridge. Each ask runs one OpenWork agent session (uses your model quota). Session target comes from OPENWORK_SESSION_TARGET: desktop (default suggestion — runs in your signed-in OpenWork Desktop, which must be open) or cloud (needs an OpenWork Web subscription). The bridge never talks to your LLM provider directly — it hands the prompt to OpenWork and posts back the final text. Trashing mail from Slack uses OpenWork's own Gmail trash tool with its confirmation gate; permanent deletion stays impossible.
Test
npm testBuilds, then runs two smoke tests:
stdio: handshake, all 9 tools, credential error paths (hermetic — credentials are scrubbed even with a configured
.env)HTTP: initialize, session id,
tools/list, bogus session → 404, wrong path → 404bridge: event filtering, mention stripping, prompt guardrails (no network)
CI runs both on every PR.
Run
Transport | Start | Endpoint |
stdio | the client spawns | process pipes |
Streamable HTTP |
|
|
Slack listener |
| your Gmini DM / mentions |
PORT and HOST override the HTTP defaults (3000, 127.0.0.1). The HTTP endpoint has no authentication — do not expose it to a network.
Wire into OpenWork
{
"mcp": {
"gmini": {
"type": "local",
"command": ["node", "dist/index.js"],
"cwd": "/absolute/path/to/gmini",
"enabled": true
}
}
}cwd matters: the server loads .env from it. Rebuild after code changes; OpenWork starts the server on demand.
Automation prompt (daily, 7:00 and 17:00):
Run my inbox routine using the gmini MCP tools.
calendar_fetch_today.gmail_fetch_recentwith hours=24.gmail_get_messageonly when the snippet is not enough to judge a message.Triage: archive newsletters, promotions and automated notifications; mark the archived batch as read; label receipts "Receipts"; star anything that needs a reply, has a deadline, or involves money.
Post a Slack summary (
slack_send_message) with five sections: Today (calendar, mark what needs action), To reply, Important, Top news, Clean up summary (counts). One line per item, two sentences max. If nothing needs action, say so.Never trash messages. Never create, change or cancel calendar events.
Layout
Path | Role |
| MCP tool registrations, shared by both transports |
| Gmail API calls |
| Calendar API, day bounds in |
| Slack posts, channel and DM resolution |
| Streamable HTTP transport |
| Entry point: stdio, |
| OpenWork gateway client: OAuth, cloud sessions |
| Event filtering, mention stripping, guardrail prompt |
| Socket Mode bridge, replies |
| OAuth scopes and client |
| One-time browser consent flow |
| Smoke tests (stdio + HTTP) and bridge unit tests |
Security
.envand.tokens/are gitignored; the token file is written with0600.Gmail scope cannot delete or send mail; Calendar scope is read-only.
Revoke access anytime: Google Account → Third-party access.
License
MIT
Available Tools
8 toolsgmail_apply_labelApply a Gmail labelA
Apply a label to the given messages. The label is created if it does not exist yet (e.g. 'Newsletters', 'Receipts', 'To Review').
Inputs: ids (required), label (required).
gmail_archiveArchive Gmail messagesA
Archive messages by removing the INBOX label. Messages are kept, never deleted. Use for newsletters, promotions, notifications and other noise after triage.
Inputs: ids (required).
gmail_fetch_recentFetch recent Gmail messagesA
Fetch recent Gmail messages (metadata + snippet, newest first) for triage. Returns id, from, subject, date, snippet, labelIds and attachment flag for each message. Use gmail_get_message when the snippet is not enough to judge a message.
Inputs: hours, query, maxResults.
gmail_get_messageRead one Gmail messageA
Fetch a single Gmail message with its decoded body text. Use after gmail_fetch_recent when a snippet is not enough to decide what to do.
Inputs: id (required), maxChars.
gmail_list_labelsList Gmail labelsA
List all Gmail labels (system and custom) with their ids.
Inputs: no named parameters.
gmail_mark_readMark Gmail messages as readB
Remove the UNREAD label from the given messages.
Inputs: ids (required).
gmail_starStar Gmail messagesB
Add the STARRED label to the given messages. Use for urgent or action-needed mail.
Inputs: ids (required).
slack_send_messageSend a Slack messageA
Post a message to a Slack channel, or to a user id for a DM. Uses Slack mrkdwn formatting (bold, italic, > quote, • bullet). channel defaults to SLACK_DEFAULT_CHANNEL when omitted.
Inputs: text (required), channel.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct action, and the descriptions explicitly differentiate gmail_fetch_recent (list/snippet) from gmail_get_message (full body). There is mild conceptual overlap since archive, mark_read, star, and apply_label all manipulate labels, but the intent of each is clearly spelled out.
All tools use a consistent service_verb_noun snake_case pattern (gmail_fetch_recent, gmail_mark_read, slack_send_message), with the service prefix cleanly partitioning Gmail vs Slack operations. Minor verb variation (fetch vs get) is still predictable and readable.
Eight tools is well-scoped for a focused inbox-triage assistant. Each tool earns its place, covering the read/triage, label, and notify steps without redundancy.
The triage lifecycle (fetch, inspect, archive, mark read, star, label) plus Slack notification is well covered. Minor gaps remain: no reply/send-email tool, no unread/undo path, and Slack is limited to sending with no channel listing or read capability.
Related MCP Connectors
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Email for AI agents: read, search and send from your Gmail, Outlook, Yahoo, iCloud or IMAP inbox.
One inbox for all your addresses: your AI agent reads, sorts, drafts and sends with your permission.
Email inboxes for AI agents: send, receive, search, drafts with owner approval, and webhooks.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Gmail by reading unread emails with automatic classification, creating AI-generated draft replies, and saving drafts directly to Gmail through the Gmail API.-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Gmail accounts for reading unread emails, creating draft replies with proper threading, and managing messages, with optional professional writing guidelines, templates, and Google Docs/Calendar integration.-
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI agents to interact with Gmail for classifying messages, extracting action items, and performing batch inbox triage. It supports automated labeling, smart replies, and task creation for external platforms like Linear, Jira, and Todoist.-
- AlicenseAqualityCmaintenanceEnables AI assistants to review unread emails and perform email management operations like delete, archive, and label through Gmail integration.7Apache 2.0