How Sign-In Works
- The agent calls Earnie’s MCP address without a token. Earnie answers that it needs one and says where to sign in. The agent registers itself with Earnie the first time.
- The agent opens Earnie’s sign-in page in your browser. If you aren’t signed in to Earnie, you sign in as usual: with your identity provider, such as Microsoft Entra ID, Okta, or Google, or with your password if your organisation uses passwords.
- The first time a client asks, Earnie shows which client is asking, where the sign-in goes, the account it will act as, and what it may do. Select Allow. Earnie doesn’t ask again for the same client and destination for 30 days.
- The browser hands a one-time code back to the agent on your own machine. The agent exchanges it for a token.
- From then on, the agent renews its token on its own. After 7 days you sign in again.
What the Agent Can Do
The agent has your role, read again on every call:- If an administrator changes your role, the agent’s access changes on its next call.
- If an administrator removes you from the organisation, the agent’s next call is refused.
- The agent can see and use the projects you can.
Connect Claude Code
Your administrator has to turn on single sign-on for MCP first. Run this in the repository you want the agent to work in:/mcp, select earnie, and choose Authenticate. Your browser opens. Sign in, allow Claude Code, and return to Claude Code.
There’s no key in the command, so the same command works for every developer.
If your organisation manages Claude Code for you, Earnie may already be in your list of servers. Run /mcp and choose Authenticate on earnie.
Use the Earnie CLI and Review Hooks
The Earnie CLI signs in the same way, so a developer needs no key for the CLI or for the review hooks either:earnie mcp setup writes each client without a key when single sign-on for MCP is on. See Signing in in the CLI reference.
For Administrators: Turn It On
Single sign-on for MCP is off until you turn it on.- If SCANOSS hosts your Earnie, contact SCANOSS support.
- If you host it yourself, set these in
tenant.envand apply the change:
Earnie’s address (
EARNIE_PUBLIC_BASE_URL) must start with https:// and have no path. Earnie refuses to start with single sign-on for MCP turned on otherwise.
Nothing changes in your identity provider. Developers sign in through the application you registered for the web app in Single sign-on. Without single sign-on, they sign in with their Earnie password.
Roll It Out to Every Developer
Claude Code’s managed settings can add Earnie for everyone in your organisation, and stop developers from removing it. Add this entry to themanagedMcpServers setting, with your Earnie address:
Other Clients
Any MCP client that signs in with OAuth and runs on the developer’s machine works the same way: Cursor, VS Code, and others. Earnie accepts a client only if it receives the code on the developer’s own machine, at alocalhost address or through the client’s own link, written like cursor://....
A client registers itself the first time it connects. Registrations are limited per network address and for the whole Earnie, so a client that registers many times in a row is asked to wait.
Claude.ai and ChatGPT can’t use this sign-in. They connect from the vendor’s cloud and receive the code on a web address. See Claude.ai and ChatGPT.
Withdrawing Access
- Someone leaves. Remove the member in Settings → Members. Their agents’ next call is refused, and Earnie forgets every client they allowed.
- A developer wants to cut off their agents. Changing or resetting their Earnie password ends every agent sign-in and forgets the clients they allowed. The next sign-in asks again. A developer who signs in only with single sign-on has no Earnie password, so their agents stop when the sign-in ends or when an administrator removes them.
- On its own. An allowed client is asked again after 30 days, and a sign-in ends after
MCP_OAUTH_SESSION_TTL.
MCP_OAUTH_SESSION_TTL. Remove them in Earnie too.