Local OAuth + MCP Test Server
Provides a local test server that reproduces GitHub's OAuth behavior, including quirks like token endpoint response format, to debug AI Studio OAuth provider integration. Supports refresh token rotation, auto-discovery, and dynamic client registration for testing.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Local OAuth + MCP Test Servertest OAuth token endpoint with form-urlencoded response"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Local OAuth + MCP Test Server
A tiny local server that reproduces GitHub's real OAuth behavior — including
its quirks — so you can test your AI Studio OAuth provider against something
you fully control, instead of debugging blind against github.com.
Setup
Plain HTTP. For a public HTTPS URL, put a tunnel (ngrok, cloudflared, tailscale funnel) in front — it terminates TLS at the edge and forwards to this server over loopback HTTP.
npm install
cp .env.example .env # optional - everything has working defaults
npm run dev # tsx watch mode (TypeScript, no build step)
# or:
npm run build && npm start # compile to dist/ then runConfiguration is read from a .env file and validated through a Zod
schema at startup. Invalid values produce a structured error report and
the process exits before binding the port.
Precedence: shell exports > .env file > built-in defaults — so
PORT=9999 npm run dev just works.
Booleans accept true / false / 1 / 0 / yes / no / on / off
(case-insensitive). Anything else fails with a clear error.
Server starts on http://0.0.0.0:4587 by default, advertising
http://localhost:4587 as its PUBLIC_URL.
Related MCP server: mock-mcp
Environment variables
Server / network
Variable | Default | Purpose |
|
| Listen port |
|
| Bind address. Set to |
|
| URL this server advertises in protocol metadata (OAuth issuer, resource identifier, discovery doc). Set when behind a tunnel so advertised identifiers match what clients see. |
OAuth / MCP
Variable | Default | Purpose |
|
| Must match what you configure in your OAuth client (e.g. AI Studio). |
|
|
|
|
| Set |
|
| Access token lifetime — set low (e.g. |
|
| Refresh token lifetime. |
|
| Each refresh issues a new refresh token and invalidates the old one; set |
|
| Set |
|
| Set |
|
| Set |
|
| Where dynamically-registered clients are persisted. Set |
This server cannot be deployed
Maintenance
Related MCP Connectors
Minimal streamable HTTP MCP server used for owned-account registry connectivity tests.
Experimental MCP server for current empirical verification of explicit public HTTPS endpoint claims.
- StytchOAuthdev.stytch.mcp
The Stytch MCP server is a reference implementation that demonstrates remote MCP server authentication and authorization using Stytch Connected Apps. It provides OAuth 2.1-compliant authorization (including PKCE), Dynamic Client Registration, and validates Stytch-issued access tokens to enable AI agents to securely interact with external services through permissioned access, supporting scopes like openid, email, profile, and manage:project_data.
Self-hosted federated MCP gateway: one OAuth 2.1 MCP server in front of N apps, user-level scopes.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMinimal MCP server for testing SkyStage's self-auth auto-detection feature. It includes tools like ping, echo, server_info, and read_secret, and uses a mock OAuth provider for login.-
- FlicenseNot gradedqualityBmaintenanceA minimal local HTTP MCP mock server for development and testing, providing predictable tool responses with OAuth token support and zero dependencies.-
- FlicenseNot gradedqualityDmaintenanceA simple MCP server with OAuth 2.0 authentication for testing OAuth support in mcp-cli.-
- FlicenseNot gradedqualityBmaintenanceA simple HTTP-based MCP server that provides demo tools (get_test_string, echo, check_maintenance), greeting prompts, and test resources, with optional OAuth 2.1 support.-