Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

Oauth

MCP server by mcp-z Verified · npm:@mcp-z

Adds multi-account OAuth handling and secure token storage to MCP servers. Built for developers who connect Google or Microsoft accounts to their assistant tools.

  • Score 85
  • 0 stars
  • 3.4k a week
  • MIT
  • Updated

Install Oauth

Built from the published package, never by AI.

claude mcp add oauth -- npx -y @mcp-z/oauth

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install Oauth in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the oauth block.

About

@mcp-z/oauth is a Node.js package for developers who build OAuth-based MCP servers. It adds consistent account tools to an MCP server and stores OAuth tokens with a shared config and storage backend. The same account lifecycle can be reused across Google and Microsoft providers.

In loopback mode, AccountServer.createLoopback adds account-me, account-switch, account-remove and account-list for servers that manage multiple stored accounts. Stateless mode, created with createStateless, exposes only account-me, which reports the account behind the client's bearer token. The package also includes createCimdResolver for resolving public client ID metadata documents with SSRF protections, and a sanitizeForLoggingFormatter helper to keep secrets out of logs.

Written from the project's README and checked against it.

Tools it gives your assistant

  • account-meReports the account in use. In stateless mode, it reports the account behind the bearer token.
  • account-switchSwitches between stored accounts in loopback mode.
  • account-removeRemoves a stored account in loopback mode.
  • account-listLists stored accounts in loopback mode.

What you need

  • Node.js 18 or later
  • A Keyv store, logger and OAuth provider from your application for loopback mode

Try asking

  • Which account am I currently signed in with?
  • Switch my tools over to my work account.
  • List all the accounts I have stored.

Good to know

  • Loopback mode requires a Keyv store, logger and OAuth provider from your application.
  • HTTP loopback client metadata documents are allowed only when allowHttpLoopback is set to true.
  • The source recommends an egress proxy or network policy in production to block internal destinations.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to Oauth

All alternatives →
Agentmesh MCP Proxy microsoft
94

Agentmesh MCP Proxy is a security proxy for MCP servers, described by its publisher as a firewall for the Model Context Protocol. It is aimed at teams that run AI agents which call tools and other agents.

AAA Local 6.6k
Bla qybaihe
94

Hardens client-side artifacts such as binaries, Electron apps, JS bundles, Python and WebAssembly against AI reverse-engineering agents. Built for developers who ship proprietary logic to user-controlled devices.

AAA Local 7.3k
Bla Agents qybaihe
94

Bla Agents is an MCP server and CLI that adds seeded, format-specific decoys to shipped binaries, JavaScript, WebAssembly and other artifacts. It is for developers who ship proprietary logic to user-controlled devices and want to make AI reverse-engineering slower.

AAA Local 11k/wk
MCP Auth zgeoff
94

A shared OAuth server for the MCP route of an app, built on better-auth, with passkey sign-in for the owner

AAC Local 44k/wk
Agentos MCP Server microsoft
94

Agent Governance Toolkit adds policy enforcement, identity, sandboxing and audit logging to autonomous AI agents. It is aimed at teams shipping agents to production. The source does not confirm the Claude Desktop MCP server named in the listing.

AAA Local 6.6k
Convex MCP Gateway tfohlmeister
93

Convex MCP Gateway is a Convex component that exposes selected Convex functions as MCP tools. It checks each call with your own authorize callback and writes an audit log. It is for developers who run Convex apps and want AI assistants to call parts of them.

AAC Local 37k/wk

Compare with Agentmesh MCP Proxy, Bla or Bla Agents

Oauth: common questions

Which tools does @mcp-z/oauth add to an MCP server?

Loopback mode adds account-me, account-switch, account-remove and account-list. Stateless mode adds only account-me.

Where are OAuth tokens stored?

Tokens are stored through a Keyv-based store. The source names optional backends keyv-duckdb and keyv-file.

How does it help keep secrets out of logs?

The package includes sanitizeForLoggingFormatter, which the source describes as a way to avoid leaking secrets in logs.

How do I install Oauth?

In Claude Code run claude mcp add oauth -- npx -y @mcp-z/oauth. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is Oauth the official server?

Oauth is published by npm:@mcp-z from its verified domain in the official MCP Registry.

Is Oauth free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is Oauth safe to use?

It scores 85 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to Oauth?

Similar MCP servers: Agentmesh MCP Proxy, Bla, Bla Agents, MCP Auth.

Does Oauth work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

Add to stack

Loading.