MCP Streamable HTTP Server with Device Flow OAuth
Overview
What is MCP OAuth Server?
MCP OAuth Server is a project that implements OAuth for a Streamable HTTP Server and Client without the need for PKCE, utilizing device flow for secure authentication.
How to use MCP OAuth Server?
- Clone the repository and install dependencies using
npm install. - Create an OAuth app in GitHub Developer Settings, enabling Device Flow, and note the Client ID and Client Secret.
- Set the environment variables
GITHUB_CLIENT_IDandGITHUB_CLIENT_SECRET. - Start the MCP Server with
npx tsx server/index_streamable.ts. - In a different terminal, start the MCP Client with
npx tsx client/client.ts.
Key features of MCP OAuth Server?
- Streamable HTTP Server and Client with OAuth support.
- Device flow based OAuth implementation for enhanced security.
- No need for browser-based PKCE flow.
Use cases of MCP OAuth Server?
- Securely authenticate devices without a browser.
- Implement OAuth in headless applications.
- Facilitate server-to-server token exchanges securely.
FAQ from MCP OAuth Server?
- Can I use this server for any type of application?
Yes, it is designed for applications that require secure OAuth authentication without a browser.
- Is there a need for PKCE in this implementation?
No, the device flow eliminates the need for PKCE, making it simpler and more secure.