HTTP OAuth icon

HTTP OAuth

CreatedNapthaAI

Provides a reference implementation for creating a remote MCP server that supports Streamable HTTP & SSE Transports, authorized with OAuth.

About

This repository offers a ready-to-use reference implementation for building a remote MCP (Model Context Protocol) server. It showcases how to integrate Streamable HTTP and SSE transports with OAuth authorization, based on the MCP specification. The server includes an Express.js application managing both transports and OAuth authentication, allowing developers to easily plug in their own MCP server and OAuth credentials. It is designed to address the lack of documentation and complete implementations for OAuth-authorized MCP servers with streamable HTTP, particularly in TypeScript and Python SDKs.

Key Features

  • Implements Streamable HTTP and SSE transports.
  • Supports OAuth authorization based on the MCP specification.
  • Includes an Express.js application managing transports and OAuth.
  • Proxies OAuth to an upstream OAuth server supporting dynamic client registration (RFC7591).
  • Offers both stateless and stateful server implementations.
  • 2 GitHub stars

Use Cases

  • Integrate with MCP hosts like Cursor or Claude via `mcp-remote` for OAuth authorization and transport bridging.
  • Develop agents in JS/TS using `StreamableHTTPClientTransport` with authorization headers for OAuth-protected servers.
  • Build a custom MCP server with OAuth authorization for enhanced security and access control.
Craft Better Prompts with AnyPrompt