Streamable HTTP MCP server with OAuth device flow

Streamable HTTP MCP server with OAuth device flow

mcp_oauth_server•byasibyl

A Streamable HTTP MCP server that supports OAuth authorization through GitHub's device flow, paired with a headless MCP client for testing.

License: Not specified•Runtime: Awaiting documentation review•Category: auth security

WHAT IT DOES

  • •Offers a Streamable HTTP MCP server that implements OAuth using GitHub's device flow rather than a browser-based redirect flow.
  • •Stores the GitHub access token plus a generated session token in its token store and issues a temporary auth code to the client.
  • •Includes a companion MCP client that supports OAuth in headless mode without PKCE.
  • •Performs all token exchange server-to-server using a short-lived device code, passing only the user code to the client.

BEST FOR

  • •Testing OAuth-protected MCP servers in headless environments without a browser for session storage.
  • •Studying or experimenting with a device flow based OAuth implementation for MCP.
  • •Connecting an MCP client to an MCP server secured via a GitHub auth provider.

ABOUT MCP_OAUTH_SERVER

Streamable HTTP MCP server with OAuth device flow is cataloged as an MCP server attributed to asibyl. A Streamable HTTP MCP server that supports OAuth authorization through GitHub's device flow, paired with a headless MCP client for testing. It is categorized under auth security. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Streamable HTTP MCP server with OAuth device flow are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Why is PKCE not needed in this implementation?

Because there is no redirect or client-side code handling, and all token exchange happens server-to-server with a short-lived device code.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 739f938262f1 · 采集于 2026-11-13 10:57:12 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Implementing OAuth for Streamable HTTP Server & Client without PKCE

Overview

This repo provides:

  1. A Streamable HTTP Server with with support OAuth (via device flow)
  2. A Streamable HTTP Client with support for OAuth (in headless mode)

OAuth Support

At the time of writing this, I wasn't able to use the MCP Inspector to test a Streamable HTTP Server with OAuth. This set me down the path of implementing OAuth through device flow.

In a typical browser-based flow (say using the MCP Inspector):

  1. MCP Client requests connection to MCP server.
  2. Server authorizes clients through a GitHub AuthProvider (redirect to GitHub); once user authorizes the scope, Server's callback handler: a. Retrieves access token from GitHub, then retrieves user data b. Stores access token + new session token in its token store c. Generates temp auth code for client, saves it with newly generated session token d. Redirects back to client with temp auth code
  3. Client exchanges temp auth code for session token, uses for subsequent requests

I wanted to replace this browser flow based OAuth flow with device flow based OAuth. This would work as follows:

image

In device flow based OAuth, we don't need PKCE because:

  1. There's no redirect or client-side code handling.
  2. The device code flow is inherently more secure because:
    • User opens the URL and enters code on GitHub's page directly
    • All token exchange happens server-to-server
    • The device code itself is short-lived and can only be used by the same client that requested it (our server)
    • Only the user code is passed down from the server to the client

However, we also don't have the browser for session storage. We may still need to implement certain methods of that the MCP's OAuthServerProvider currently requires (e.g. exchangeAuthorizationCode and challengeForAuthorizationCode).

How to use

  1. Clone this repository. Install the dependencies.
npm install
  1. Go to your Developer Settings on GitHub (under Settings) and create an OAuth app. Enter "http://localhost for callback URL if needed. Be sure to select 'Enable Device Flow'. Note the Client ID and Client Secret.

  2. Set the GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET environment variables in your local dev environment.

  3. Start the MCP Server.

npx tsx server/index_streamable.ts
  1. In a different terminal, start the MCP Client.
npx tsx client/client.ts

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Streamable HTTP MCP server with OAuth device flow from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp_oauth_server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related auth security MCP Servers

Alternative and complementary servers in the same category

View all in auth security →

A modular FastMCP server for interacting with Microsoft Graph API, supporting advanced queries for users, sign-in logs, MFA status, and privileged users.

Repository stats unavailable
Security & Secrets
Keycloak MCP Server
keycloak-mcp-server•sshaaf

A Model Context Protocol (MCP) server that provides programmatic access to Keycloak administration functionality.

Repository stats unavailable
Security & Secrets

An MCP server for LLM-driven penetration testing that wraps Kali tools and adds scope enforcement, engagement tracking, and structured output.

Repository stats unavailable
Security & Secrets