oauth-callbackSAFE
OAuth 2.0 login for CLI tools and desktop apps: opens the browser and captures the authorization code on a loopback redirect (RFC 8252). Node.js, Deno, Bun. One-line MCP client auth.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Turn a browser authorization into a validated OAuth 2.0 authorization code on a loopback redirect URI, in Node.js, Deno and Bun. For CLI tools and desktop apps, with a one-line browser authorization provider for the MCP SDK.
Features
- 🚀 Node.js 22+, Deno 2 and Bun — one
node:httplistener everywhere - 🔌 Ephemeral loopback ports (RFC 8252) — the default for
getAuthCode(): no port collisions, no port config - 🛡️ Secure by default —
stateon every flow, strict callback and URL validation, neutral pages with security headers - 🤖 MCP SDK integration —
browserAuth().connect(client)handles the whole browser flow - ⚡ Zero runtime dependencies — the browser launcher is bundled and loaded lazily
- 🎯 Small, typed API — one function, one error class
Installati
70dd87e20886OBSERVED · 2026-10-12Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add oauth-callback --env GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET} -- npx -y [email protected]{
"mcpServers": {
"oauth-callback": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"GITHUB_CLIENT_SECRET": "${GITHUB_CLIENT_SECRET}"
}
}
}
}Exposed tools (1)
1 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
whoami | read |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (11)
.replit
`getAuthCode()` binds `http://127.0.0.1:<free port>/callback`, calls your builder with that redirect URI and a fresh `state`, opens the system browser, and resolves with the code once a callback with
await getAuthCode(authUrl, { redirectUri: "http://127.0.0.1:8765/callback" });redirectUri: "http://127.0.0.1:8765/callback", // default http://127.0.0.1:0/callback (port 0 = free port)
redirectUri: "http://127.0.0.1:8765/callback",
- The redirect URI is the only address option: `http:` on `127.0.0.1`, `[::1]` or `localhost`; no fragment, credentials or duplicate query keys; port 0 (ephemeral) only in builder form. Builder defaul
@modelcontextprotocol/client, @modelcontextprotocol/server, @types/bun, @types/deno, @types/node, bun-types, mermaid, open
The result's `redirectUri` is the exact redirect URI of the flow, never re-serialized. When the authorization request carried `redirect_uri` (always with a builder), send it verbatim in the token requ
examples/notion.gif
load: () => keychain.get(name),
But the real killer? API keys can't adapt. They're static credentials with fixed permissions. Need to request additional scopes? Your users must generate a new key. Want to implement granular permissi
Gates applied: no_behavioural_pass.
70dd87e20886full audit observations/trust-audit/mcp-server/kriasoft__oauth-callback.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-12 | 70dd87e20886 | SAFE | B | 89 | first audit |
Questions
What is the oauth-callback MCP server?
OAuth 2.0 login for CLI tools and desktop apps: opens the browser and captures the authorization code on a loopback redirect (RFC 8252). Node.js, Deno, Bun. One-line MCP client auth.
What tools does oauth-callback expose?
1 in total: 1 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is oauth-callback safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does oauth-callback need?
It reads GITHUB_CLIENT_SECRET from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does oauth-callback run?
It speaks streamable-http, so it runs as a service you connect to over the network. It is published on npm as oauth-callback at 3.1.1.
How current is this page?
The grade is for one exact copy of the source (70dd87e20886), read on 2026-10-12. The repository is watched and re-audited when it changes.