Categories
Artificial Intelligence Dovecot Keycloak Mail OIDC Postfix SSO

How many OIDC clients does an OAuth-enabled MCP mail server need?

One, two, three or four? The number of OIDC client registrations an MCP server for OAuth-enabled IMAP/SMTP needs depends on the architecture. Five scenarios compared: token passthrough, single-client broker, split broker, IdP as authorization server with token exchange, and hosted providers.

Categories
Artificial Intelligence Dovecot Keycloak Mail OIDC python SSO

OAuth2 for an MCP mail server: what I learned on the way

Building an OAuth2-secured MCP mail server against a real Dovecot/Postfix mailbox surfaced four separate Keycloak client registrations, a Default-vs-Optional scope trap, and a genuinely counter-intuitive Audience-mapper gotcha behind a mysterious active: false.