# Remote MCP servers and sign-in: OAuth, CIMD and enterprise login

Level 4: Build · 10 min · Updated 19 November 2026 · Path: Build MCP servers

By the end you'll design sign-in for a remote MCP server that apps can complete, that accepts only its own tokens, and that companies can manage centrally.

Your server works on localhost. Now it has to live at `https://mcp.yourcompany.com`, act for real users on their real accounts, and be added from Claude, ChatGPT and VS Code by people you've never met. Sign-in is where most remote servers go wrong, and where the 2026-07-28 spec changed the most.

## The shape of it

Your MCP server is a resource server. When an app calls it without a valid token, it answers with an authorization challenge; the app then sends the user through an OAuth flow with your authorization server, gets a token issued *for your MCP server*, and retries. Apps such as Claude call remote servers from their own cloud, so your server and its sign-in must be reachable on the public internet.

## What changed in 2026-07-28

**Steps**

1. **Client registration: CIMD, not DCR.** Dynamic Client Registration is deprecated in favour of Client ID Metadata Documents, where the client's ID is a URL to a document describing it. Support CIMD now; keep DCR during the window if existing clients rely on it.
2. **Issuer validation.** Clients must check the issuer (`iss`) before redeeming an authorization code, which blocks mix-up attacks between authorization servers. Make sure your authorization server sends it.
3. **Localhost redirects for desktop and CLI apps.** `application_type` in registration lets them use `localhost` redirect URIs.
4. **Issuer-bound credentials.** Client credentials can't be reused across authorization servers.

## Rules from the security best practices

- **Accept only tokens issued for your server** (check the audience). Never forward a client's token to another API ("token passthrough" is forbidden by the authorization spec).
- **If you proxy a third-party API with one fixed client ID, ask each client for consent** before sending the user to the third party, or an attacker can ride an earlier consent cookie.
- **Start with minimal scopes** and ask for more when a privileged tool is first used.
- **Verify every request**, and never treat a state handle (a cart or job ID) as authentication.
- If your authorization server fetches client metadata URLs (CIMD), apply SSRF protections: https only, no private or link-local addresses.

## Company-managed access

Enterprise-Managed Authorization, stable since 18 June 2026, lets a company grant your server to its people through its identity provider: the client exchanges an identity assertion from the IdP for an access token from your authorization server, and users skip per-server consent. The MCP blog lists Asana, Atlassian, Canva, Figma, Granola, Linear and Supabase among servers that support it. If you sell to companies, it's worth planning for.

## Test it like a user

**Try it**

Add your server to Claude as a custom connector with **Sign in when needed**, and to one other client. Complete the flow, revoke the token in your service, and check that the next call gets a clean challenge instead of an error.

## Key takeaways

- Your server is a resource server: challenge, OAuth, token issued for you.
- 2026-07-28: CIMD over DCR, issuer validation, localhost redirects for native apps.
- Check token audience, never pass tokens through, start with small scopes.

## What to try next

- Re-run the [security checklist](https://ai-powered.com/academy/build-mcp-servers/mcp-server-security-checklist).
- Defend the other side of the loop: [prompt injection for builders](https://ai-powered.com/academy/build-mcp-servers/prompt-injection-for-builders).

## Sources

Official documentation, checked on 19 November 2026:

- [The 2026-07-28 specification release (MCP blog)](https://blog.modelcontextprotocol.io/posts/2026-07-28/)
- [Security best practices (modelcontextprotocol.io)](https://modelcontextprotocol.io/docs/tutorials/security/security_best_practices)
- [Enterprise-Managed Authorization is stable (MCP blog)](https://blog.modelcontextprotocol.io/posts/enterprise-managed-auth/)
- [Getting started with custom connectors using remote MCP (Claude Help Center)](https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp)

Next lesson: [Prompt injection for MCP builders: design tools that fail safe](https://ai-powered.com/academy/build-mcp-servers/prompt-injection-for-builders)
