← Docs

MCP Integration

inbox.dog implements the MCP Authorization spec. Any MCP client can connect, authenticate via OAuth, and use Gmail tools — no SDK needed.

Quick setup (stdio)

Create a key, connect Gmail in the browser, then run the stdio MCP proxy. No OAuth flow in the client:

  1. Go to inbox.dog/connect
  2. Create an API key and click "Connect Gmail"
  3. Configure your MCP client with npx inbox.dog mcp and env vars
{
  "mcpServers": {
    "inbox-dog": {
      "command": "npx",
      "args": ["-y", "inbox.dog", "mcp"],
      "env": {
        "INBOX_DOG_CLIENT_ID": "your_client_id",
        "INBOX_DOG_CLIENT_SECRET": "your_client_secret"
      }
    }
  }
}

OAuth flow (MCP-native)

MCP clients can also discover auth endpoints automatically via standard OAuth metadata:

  1. Client connects to https://inbox.dog/mcp
  2. Server returns 401 with WWW-Authenticate header pointing to resource metadata
  3. Client discovers OAuth endpoints via /.well-known/oauth-authorization-server
  4. Client registers dynamically, runs PKCE OAuth flow, user authenticates with Google
  5. Client gets bearer token — Gmail tools just work

Discovery Endpoints

# Protected Resource Metadata (RFC 9728)
GET https://inbox.dog/.well-known/oauth-protected-resource

# Authorization Server Metadata (RFC 8414)
GET https://inbox.dog/.well-known/oauth-authorization-server

# Dynamic Client Registration (RFC 7591)
POST https://inbox.dog/oauth/register

Available Tools

Once authenticated, these Gmail tools are available:

read_emails

List recent emails with optional search query and label filters.

read_email

Read full content of a specific email by message ID.

send_email

Send an email (to, subject, body, optional cc/bcc).

search_emails

Search emails using Gmail search syntax.

get_profile

Get authenticated user's email address, message count, threads.

Quick Test

# List available tools (no auth required)
curl -X POST https://inbox.dog/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Standards