Security¶
Where credentials go¶
Only to your own servers. The sign-in page is served by Sesamcp:
- The MCP client (say claude.ai) sends the person's browser to Sesamcp's
/authorize. - They sign in there: at your identity provider, or on the form. The browser posts the form to Sesamcp over your HTTPS.
- Sesamcp checks it the way the config says. Nothing from the form, no claim and no token is logged.
- The client receives an authorization code and trades it for opaque tokens, which mean nothing outside this deployment.
The client never sees what was typed, the provider's tokens, or the credential Sesamcp sends to the app. Requests to the app carry upstream_headers only: the client's own headers, its token above all, never reach it.
What is stored¶
In /data, encrypted with a key derived from MCP_OAUTH_SECRET and store_salt: the registered clients, and for each login its tokens and the variables the calls to the app need.
| Way in | A login keeps |
|---|---|
users |
the user name only |
verify, upstream |
the form values the headers use (an API key) |
exchange |
the token from the login answer, plus form values the headers use |
oidc |
the user name, plus a credential if one is made; the provider's tokens are dropped after the check |
oidc with link |
the user name and the linked key; the link itself under a hash of the issuer and sub |
Anyone with the volume and the secret could use what is stored: keep MCP_OAUTH_SECRET out of the compose file and treat the volume like the app's own data.
Who gets in¶
- At the provider: only
allowed_usersor members ofallowed_groups; an account alone is never enough. The ID token is checked (issuer, audience, nonce, signature), the state is single-use, PKCE throughout. - On the form: a refused login answers after a short delay; after a few on the same page it has to start again.
- With
users: argon2id hashes only, an unknown name takes as long as a wrong password, and raw tokens are refused, since nothing behind would check them. - With link once: a key is linked only after the app accepted it, and only to an account the provider signed in.
What it can't protect¶
A signed-in client has whatever the app gives that credential. The app's own port must not be reachable from where Sesamcp is published. Connect only clients you trust, and remove the ones you no longer use.
Reporting¶
Report a vulnerability privately through GitHub's Report a vulnerability on the repository, not in an issue.