Skip to main content
By the end of this page, Claude Code is connected to your Langmail mailbox and has run its first real search over your mail.

Prerequisites

1

Add the Langmail MCP server

Add the server as a remote MCP server over the Streamable HTTP transport:
claude mcp add --transport http langmail https://mcp.langmail.me/mcp
2

Authorize access

Start Claude Code and run /mcp. Select langmail and choose to authenticate. Your browser opens: sign in with the Google account you used for Langmail, then approve the consent screen.The grant is per-client: you authorize this Claude Code installation, not a shared credential. Your agent never sees your password.
3

Verify the connection

claude mcp list
Output
langmail: https://mcp.langmail.me/mcp (HTTP) - ✓ Connected
Inside a session you can also ask directly: “Which Langmail tools do you have available?” — the answer should list 10 tools, from search_emails to respond_to_event.
4

Make your first tool call

Ask Claude:
Prompt
Search my Langmail inbox for the 5 most recent messages.
Claude calls search_emails with { "mailbox": "Inbox", "limit": 5 } and gets back a compact, newest-first hit list:
Result
5 message(s) matched:

1. Your invoice for June
   id: Mabc123
   from: Acme Billing <billing@acme.example>
   date: 2026-07-05T08:12:00Z
   tags: receipt

2. Lunch on Thursday?
   id: Mabc122
   from: Jonas <jonas@example.com>
   date: 2026-07-04T16:40:00Z
   tags: direct
...
Search results deliberately omit message bodies to stay light on tokens — Claude fetches a full message with get_email when it needs one.

Next steps

Search and triage email

Find to-dos, filter by category and sender, read whole threads.

Calendar workflows

Schedule meetings with invitations, create recurring series, RSVP.

How authorization works

The OAuth flow behind the browser window, endpoint by endpoint.

Tool reference

Exact parameters and output shapes for all 10 tools.