MCP authentication, on a remote server, is OAuth: the assistant sends an access token in the Authorization header of every request, and an MCP OAuth server refuses a request that has none. The first refusal is a 401; from there, the client finds out where to obtain a token. What you judge a server on comes next: which tokens it accepts, and what you can cut afterwards.
This article is for the developer or the security lead who has to approve a remote MCP server before it reads the company's code. The first half follows the MCP authorization specification, revision 2026-07-28, read on its own site and checked on 17 November 2026. The second half says what DeployIt does, as our security page states it.
Where is the token renewal handled, and with what delay?
In the session service. The access token lives 15 minutes; it is renewed on the first request made in its last 2 minutes.
A refused renewal closes the session.
// auth/session.ts
if (ttl < REFRESH_MS) {
token = await refresh()
}
A developer asks this about their own product, through an MCP server; the figures belong to an example product, seen with the Developers profile. Before that answer could come back, the server had to know who was asking. That is the subject here.
MCP authentication, step by step
Authorization is optional in the specification. When a server over HTTP supports it, it should follow the specification, and a server that reads private code has every reason to.
- The client calls the server with no token. The server answers
401 Unauthorized. The address of its protected resource metadata comes in aWWW-Authenticateheader, or sits at a well-known address. - The client reads that metadata. It names at least one authorization server, whose own metadata gives the endpoints.
- The client gets a client ID. A pre-registered one if it has one; otherwise an HTTPS URL that points to a metadata document, when the authorization server supports it. Dynamic registration is marked deprecated and kept for backwards compatibility.
- A person authorizes, in a browser. The client must use PKCE, and must send a
resourceparameter that names the server the token is for. - The client receives the token and sends
Authorization: Bearer …on every request. Never in the query string of the URL.
Two rules carry most of the security. The server must check that a token was issued for it as audience. And it must not accept or pass along any other token.
In plain terms: a server that follows the rule refuses a token issued for another service, and never forwards yours to a third party. The specification also recommends short-lived access tokens, to limit what a leaked one is worth.
What the specification leaves to each MCP OAuth server
The authorization pages of the specification say how a token is obtained and checked. They do not say who may sign up, what a signed-up person may see, or how you withdraw an access. The implementation of the authorization server is, in their own words, beyond the scope of the specification.
So the questions that matter on the day a contractor leaves are for the vendor. Four are enough for a first call:
- Does a request with no token get a
401, or an answer? - Does the server refuse a token issued for another service?
- Can one person be cut without touching the others?
- Does a credential to the underlying source ever reach the person who asks?
The full grid is in the twelve questions of an MCP server security review.
How DeployIt does it
DeployIt is an MCP server. Your company gets one link, https://mcp.deployit.ai/<company>/<code>; each person adds it to Claude (on the web, on the desktop or in Claude Code) and signs up with a name and an email, which is not verified; their questions are logged under that name. Everyone starts with the Everyone profile: questions about the product, answered from the code; a filter removes the code, the file paths and the names of team members it recognises from the answers, without proving their absence, and a leak test tells you what still gets through. An administrator gives the Developers profile (excerpts) or the Leadership profile (developer statistics) to whoever needs it. Repositories are connected from GitHub or GitLab; DeployIt makes no commit, branch or pull request, and only adds one webhook per repository.
It works over HTTP, with an OAuth authorization open to Claude (web and desktop) and to local clients such as Claude Code. Other web clients cannot sign up, and Cursor or Windsurf cannot sign up yet. The rest is written on the security page, under who gets in, and how:
- The code is the door. The link carries a code. Whoever adds it to their assistant signs up themselves, on the Everyone profile.
- A profile is given to a person, never to an address. An administrator raises the profile of a sign-up they can see. Signing up again with the same address gives Everyone back, never more.
- One token per person. After signing up, each person's assistant presents a token that belongs to them alone, valid for an hour and renewed.
- A key for machines. A data warehouse doesn't sign up: it presents a key in a header, shown only once, that opens the statistics and nothing else.
- Your identity provider, if you have one. If your Claude organization manages sign-ins through its identity provider, automatic sign-in is available in beta, on request: write to us. Each person's address is then attested when the issuer is Claude or when your provider marks it verified, and stays self-declared otherwise.
Is the code in the link a token in a URL?
The objection is fair: the specification keeps access tokens out of the URL's query string. The code is not an access token. It opens sign-up and nothing else; every call after that needs the person's own token.
The code still deserves care. It is the door, so keep the link out of any file you commit, and change the code when the link has travelled.
What you can cut, and what each cut stops
| What you cut | What it stops, and what stays |
|---|---|
| One person | Removing a person cuts their access without touching anyone else's. They stay listed among the people signed up, marked as removed; the log keeps their questions, and they don't come back through automatic sign-in. Someone who still has the link can sign up again, with the Everyone profile: change the code of the link as well. |
| The code of the link | If the link has left the company, you change its code: nobody can sign up with the old one, and people already signed up keep their access. |
| Everyone at once | In an emergency, you sign everyone out in one action. |
| A repository | Removing a repository from DeployIt removes its webhook and erases its working copy: access is cut at once, then a queued job erases the data, usually within the following hours. |
An example, labelled illustrative. An engineer from a consultancy signs up, from Claude, through the link of a client's company. Three months later, the engagement ends. An administrator removes that person, and only that person, then changes the code of the link, which the engineer still has: the people already signed up keep their access.
The repositories stay connected, because everyone else depends on them. And the engineer never held a repository credential: there is no token to hunt for at your Git host.
What we do not claim: that an unverified email identifies anyone, or that a shared link won't travel. Anyone with the link can sign up. You see every sign-up, and a log keeps who asked what and who changed which setting.
Where this sits
This article covers the mechanism. How to give AI access to your codebase safely explains why this shape of access holds over time, and where your code goes with AI follows the data once a call is accepted. For the product as a whole, read DeployIt: ask your code and follow each developer's work from Claude.
Next step: connect your repositories and add your company link to Claude in three steps, or add the demo, https://mcp.deployit.ai/demo, to your Claude connectors first. Then read who gets in, and how against the table above.
Price. Free plan: 15 questions a week for the whole company. A 30-day trial, no card. Plans from €290 a month excluding tax for up to 25 tracked developers: see pricing.
Ask your code from Claude
30-day trial, no card. Or try the demo first: add https://mcp.deployit.ai/demo to your Claude connectors.
Frequently asked questions
How does MCP authentication work?
On a remote server, with OAuth: the assistant sends an access token in the Authorization header of every request. A first request without a token gets a 401; the client reads the server's metadata, a person authorizes in a browser, and the client retries with the token. This follows the MCP authorization specification, revision 2026-07-28, checked on 17 November 2026.
Is OAuth mandatory for an MCP server?
The specification calls authorization optional. When a server over HTTP supports it, it should follow the specification. A server that reads private code has no reason to skip it.
Can a token issued for one MCP server be used on another?
It should not. The specification requires the client to name the target server when it requests a token, and requires the server to accept only tokens issued for it. A server must not pass a token on to another service either.
How do you revoke one person's access to an MCP server?
It depends on the server, so ask before you connect it. In DeployIt, each person has a token of their own, valid for an hour and renewed: an administrator removes the person, and that cuts their access without touching anyone else's. A removed person who still has the company link can sign up again, with the Everyone profile. Changing the code of the link prevents it, and people already signed up keep their access.
Does DeployIt verify the email of the person who signs up?
A person signs up with a name and an email, and the address is not verified: the code in the company link is the door, and a newcomer only gets the Everyone profile. With automatic sign-in through your Claude organization's identity provider (in beta, on request), the address is attested when the issuer is Claude or when your provider marks it verified.
Continue reading
How to connect Claude to a private GitHub repo without sharing the code
For a CTO: two ways to connect Claude to a private GitHub repo. Claude's own connector hands the files to whoever connects, with that person's GitHub access; one company link gives each person a profile and, with the Everyone profile, answers from which a filter removes the code (filtered and tested). The steps, in order.
MCP server security testing: how a leak test works, and how to read it
For a security lead or a CTO: most MCP server security testing checks who gets in. A leak test checks what gets out: trap questions fired at each profile that must not see code, a sorted report, and a warning that blocks nothing.
DeployIt: ask your code from Claude, and follow each developer's work
For the person who decides, CTO, CEO or head of product: the whole of DeployIt in one read. One link for your company's Claude, answers from the code without giving access to it, statistics on each developer, what happens to your code, and the price.