MCP.so
登录

Implementing OAuth for Streamable HTTP Server & Client without P…

@asibyl

基本信息

分类

开发工具

传输方式

stdio

作者

asibyl

关于 Implementing OAuth for Streamable HTTP Server & Client without PKCE MCP Server

MCP Streamable HTTP Server with Device Flow OAuth

Implementing OAuth for Streamable HTTP Server & Client without PKCE MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "streamable-http-server": {
      "command": "npx",
      "args": [
        "tsx",
        "server/index_streamable.ts"
      ],
      "env": {
        "GITHUB_CLIENT_ID": "",
        "GITHUB_CLIENT_SECRET": ""
      }
    }
  }
}

Implementing OAuth for Streamable HTTP Server & Client without PKCE MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

点击上方按钮,在临时沙箱中运行此服务器并实时获取工具列表。

概览

What is Implementing OAuth for Streamable HTTP Server & Client without PKCE?

A reference implementation that adds OAuth support to the Streamable HTTP Server and Client using the device authorization grant flow (device flow) instead of browser-based redirects. It integrates with GitHub as the OAuth provider and is intended for developers who need headless OAuth authentication for MCP (Model Context Protocol) servers.

How to use Implementing OAuth for Streamable HTTP Server & Client without PKCE?

Clone the repository, install dependencies with npm install, set the GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET environment variables from a GitHub OAuth App that has "Enable Device Flow" selected, then start the server with npx tsx server/index_streamable.ts and the client with npx tsx client/client.ts.

Key features of Implementing OAuth for Streamable HTTP Server & Client without PKCE

  • Streamable HTTP Server with OAuth device flow support
  • Streamable HTTP Client with headless OAuth support
  • Replaces browser-based OAuth with device code flow
  • No PKCE required due to device flow security
  • Uses GitHub as the OAuth provider

Use cases of Implementing OAuth for Streamable HTTP Server & Client without PKCE

  • Automating MCP server OAuth without an interactive browser
  • Running OAuth flows in headless environments or CI/CD
  • Testing Streamable HTTP OAuth without the MCP Inspector

常见问题

1

Why is PKCE not used?

Device flow does not require PKCE because there is no redirect or client-side code handling. The user interacts directly with GitHub, and all token exchange happens server-to-server. The device code is short-lived and tied to the requesting client.

2

What runtime dependencies are required?

Node.js, npm, and tsx for running TypeScript files.

3

How do I configure the GitHub OAuth app?

Go to GitHub Developer Settings, create an OAuth App, set a callback URL (e.g., `http://localhost`), and enable "Device Flow". Note the Client ID and Client Secret, then set them as environment variables.

4

Can I use a different OAuth provider?

The README only documents configuration with GitHub. The implementation is tied to GitHub’s device flow endpoint.

5

Where are tokens and sessions stored?

The server stores access tokens and session tokens in its own token store (in-memory). No persistent storage is described.

评论

开发工具 分类下的更多 MCP 服务器