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
评论