Registering an MCP client is not trusting it: three checks before you connect an MCP server or client
Registering an MCP client is not trusting it: three checks before you connect A client that registered successfully has told you nothing about whether you should trust it. Run three checks before you connect an MCP ser
Registering an MCP client is not trusting it: three checks before you connect
A client that registered successfully has told you nothing about whether you should trust it. Run three checks before you connect an MCP server or client: where the authorisation code can go, whether consent belongs to this exact client, and what the token can reach.
The reason comes from research the Salt Labs Research Team published on 1 December 2026. They found issues in the MCP servers of a leading social network, a leading online payment service and a leading cloud collaboration platform. Together, the post says, these serve hundreds of millions of users. A single malicious link was enough for an attacker to act as the victim. The companies asked to be unnamed, and the issues were reported through coordinated disclosure.
Why open registration matters
MCP is meant to be "paste a URL and connect". An MCP server cannot know in advance which clients will show up. The MCP authorisation documentation Salt quotes says clients and servers SHOULD support OAuth 2.0 Dynamic Client Registration (DCR), so a client can get a client_id without user interaction.
In DCR the client sends its own name, redirect URI and other metadata to the server's registration endpoint, and the server returns a new client_id. Salt's point is that the client decides what to send. The protocol does not check who is registering. Neither the MCP nor the DCR standards say how the server should decide what to trust.
So an attacker can register a client with a redirect URI on a server they control. Salt describes the flow:
- The attacker finds an MCP server whose authorisation server accepts anyone at its registration endpoint.
- They register a client with their own redirect URI and get a valid
client_id. - They build an authorisation link with that
client_id, that redirect URI and their own PKCE challenge, and send it to the victim. - The victim clicks. The flow runs against the real service.
- If the flow completes, the victim's browser is redirected to the attacker's redirect URI with an authorisation code.
- The attacker swaps the code for an access token and acts as the victim.
PKCE does not save you here. In Salt's words, it protects against a third party intercepting the code, not against the party who started the flow.
Salt found three real-world cases. Registration was open in all three. What turned it into a takeover was a second flaw, and it was different each time. As the post puts it: "The attack flow stayed the same, and only the weak link changed."
Check 1: Where can the authorisation code go?
Case 1 was a redirect URI validation bypass. The service rejected a plain attacker URL but accepted one with the trusted name added after it. Salt's reading is that the check looked for the trusted name inside the URL and never verified the host the URL points to. The victim was already logged in, the flow completed with no consent screen, and the code arrived at the attacker's server.
What to check:
- Is the redirect URI compared as a complete, exact match against the value registered for that
client_id? Salt says the MCP specification requires exact matching. - Is it parsed with a real URL parser? A URI should never be accepted because it contains a trusted name.
- Are only HTTPS or loopback addresses allowed? Is this checked at registration and again on every authorisation request?
Check 2: Is consent tied to this exact client?
Two of the three cases failed here, in different ways.
Case 2 was a consent bypass through CSRF. The server accepted a cross-site POST to the authorisation step as if the user had approved the consent page. The attacker sent a link to a page they controlled. A victim already logged in opened it, the page auto-submitted a form to the real authorisation endpoint, and the browser attached the victim's session. The server treated it as the victim's own approval.
Case 3 was consent reused across clients. This service did show a consent page, and CSRF and open redirects did not work against it. The weakness was how consent was remembered. The platform's official MCP client and Salt's test client were two different OAuth clients, but the service treated a user's earlier approval of the official integration as approval for the new one. For a user who had already connected the official client, one click gave access with no new prompt. In Salt's phrasing, the question "did this user approve this application?" was being answered for the wrong application.
What to check:
- Does every new client get a consent screen that names the application and the host of its redirect URI?
- Is the approval stored against that specific
client_id, redirect URI and set of scopes? It should never be reused across clients, even when they share OAuth infrastructure. - Is the consent step protected like any state-changing request: CSRF tokens, validated
stateparameter,SameSiteon session cookies, no framing of the consent page? Salt says the authorisation request must only be accepted from your own consent page.
Salt's own test for this is simple and worth copying. Approve the official client, then try a second client on the same account. Also submit the authorisation request from another origin. If either completes without the user explicitly approving the new client, the flow is exposed.
Check 3: What can the token reach?
Salt says the server must decide "where the authorization code can be sent, what the user approved, and what the token can reach." A stolen token is only as dangerous as its scope.
Salt's examples show the stakes. A token for the collaboration platform's MCP could read confidential files, create share links that expose content outside the organisation, or upload files. For the payments platform, it could read financial information and carry out supported operations in the victim's name. Salt says each depends on the victim's permissions and the tools the MCP exposes.
What to check:
- Least privilege: grant only the scopes the integration needs.
- Short-lived tokens, with PKCE required.
- Tokens bound to your MCP server with the
resourceparameter, and the audience validated.
For unknown clients, Salt suggests a trust policy: allow-list trusted domains, give unknown ones minimal scopes, and show the client's domain on the consent screen.
I wrote about the scoping side in Agents don't go rogue. Scopes do..
If you connect agents to your own accounts
Salt's advice for users is short. Review the connected applications and tokens in your account settings from time to time, and revoke the ones you don't recognise. Be careful with any link that starts an authorisation flow for an application you don't know.
The Salt article puts it plainly: "Registration only creates an identity." Trusting that identity is a decision someone has to make on purpose.
Credit where it is due: the research, the three cases and the test steps are the Salt Labs Research Team's work. Read the full post before you change your own flow.
mcp #oauth #security #ai
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.