> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langmail.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Claude

> Add the Langmail MCP server to Claude Code or Claude Desktop and authorize it against your mailbox.

The Langmail MCP server is a remote server at `https://mcp.langmail.me/mcp`, speaking the Streamable HTTP transport with OAuth authorization. Both Claude surfaces connect to it directly — nothing to install or run locally.

## Prerequisites

* A Langmail account — [sign up at app.langmail.me](https://app.langmail.me) with Google.

<Tabs>
  <Tab title="Claude Code">
    Add the server:

    ```sh theme={null}
    claude mcp add --transport http langmail https://mcp.langmail.me/mcp
    ```

    Then authorize it. Inside a Claude Code session, run:

    ```text theme={null}
    /mcp
    ```

    Select **langmail** and follow the authentication prompt. Your browser opens for Google sign-in and a consent screen; approve it and return to the terminal.

    Verify:

    ```sh theme={null}
    claude mcp list
    ```

    ```text Output theme={null}
    langmail: https://mcp.langmail.me/mcp (HTTP) - ✓ Connected
    ```

    Use `/mcp` at any time to inspect the connection, list the exposed tools, or re-run authentication.
  </Tab>

  <Tab title="Claude Desktop">
    1. Open **Settings** and go to **Connectors**.
    2. Choose **Add custom connector**.
    3. Enter a name (for example `Langmail`) and the URL `https://mcp.langmail.me/mcp`, then add it.
    4. Claude Desktop starts the authorization flow: sign in with the Google account you use for Langmail and approve the consent screen.

    Once connected, Langmail's tools appear in Claude's tools menu. You can disconnect or re-authorize the connector from the same Connectors settings page.
  </Tab>
</Tabs>

## Test it

Ask Claude:

```text Prompt theme={null}
Which emails in my Langmail inbox are flagged as to-dos?
```

Claude calls `search_emails` with `{ "keywords": ["todo"] }` and answers from the result. If the call fails with an authorization error, re-run the authentication from `/mcp` (Claude Code) or the Connectors settings (Claude Desktop).

## Ending access

Removing the server from your client discards its tokens; without the refresh token, access lapses when the current access token expires:

```sh theme={null}
claude mcp remove langmail
```

In Claude Desktop, remove the connector from **Settings → Connectors**.

## Next steps

<CardGroup cols={2}>
  <Card title="Search and triage email" icon="magnifying-glass" href="/guides/search-and-triage">
    Real prompts and the tool calls they produce.
  </Card>

  <Card title="Other MCP clients" icon="plug" href="/connect/other-clients">
    Cursor and any client that speaks Streamable HTTP with OAuth.
  </Card>

  <Card title="How authorization works" icon="key" href="/connect/authorization">
    What happens between "add server" and "connected".
  </Card>

  <Card title="Tool reference" icon="wrench" href="/reference/mcp/overview">
    Exact parameters and output shapes for all 10 tools.
  </Card>
</CardGroup>
