HTTP OAuth

v1.0.0Securitystable

A reference implementation for creating an MCP server supporting Streamable HTTP & SSE Transports with OAuth authorization, allowing developers to build OAuth-authorized MCP servers with minimal configuration.

http-oauth-mcp-servermcpai-integration
Share:
105
Stars
0
Downloads
0
Weekly
0/5

What is HTTP OAuth?

HTTP OAuth is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to reference implementation for creating an mcp server supporting streamable http & sse transports with oauth authorization, allowing developers to build oauth-authorized mcp servers with minimal configu...

A reference implementation for creating an MCP server supporting Streamable HTTP & SSE Transports with OAuth authorization, allowing developers to build OAuth-authorized MCP servers with minimal configuration.

This server falls under the Security category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A reference implementation for creating an MCP server suppor

Use Cases

Implement OAuth-authorized MCP servers with Streamable HTTP and SSE transports. Reference implementation for secure MCP authentication.
NapthaAI

Maintainer

LicenseMIT License
Languagetypescript
Versionv1.0.0
UpdatedMay 18, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx http-oauth-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use HTTP OAuth

The HTTP OAuth MCP Server is a reference implementation for building MCP servers that support both Streamable HTTP and Server-Sent Events (SSE) transports with OAuth 2.0 authorization. It integrates with Auth0 for identity management including dynamic client registration, and issues its own tokens rather than exposing upstream credentials to clients. Developers use it as a production-ready starting point for building secure, remotely-accessible MCP servers where authentication is required before tools can be invoked.

Prerequisites

  • Bun runtime installed (bun.sh) — the recommended and primary runtime for this server
  • An Auth0 account with a configured tenant, client ID, and client secret
  • Auth0 dynamic client registration enabled on your tenant
  • An MCP client that supports remote HTTP/SSE transports (e.g., Claude Desktop with mcp-remote)
  • Node.js (optional, for limited npm/tsc compatibility)
1

Clone the repository

Clone the http-oauth-mcp-server repository from NapthaAI.

git clone https://github.com/NapthaAI/http-oauth-mcp-server.git
cd http-oauth-mcp-server
2

Install dependencies

Install the project dependencies using Bun.

bun install
3

Configure Auth0 credentials

Copy the environment template and fill in your Auth0 tenant credentials. You need your Auth0 client ID, client secret, and tenant domain.

cp .env.template .env
# Edit .env and set:
# AUTH0_CLIENT_ID=your-client-id
# AUTH0_CLIENT_SECRET=your-client-secret
# AUTH0_TENANT_DOMAIN=your-tenant.auth0.com
4

Start the server in stateless HTTP mode

Run the stateless variant of the server, which is suitable for deployment behind a load balancer or serverless environment.

bun run src/app.stateless.ts
5

Or start in stateful SSE mode

Run the stateful variant that supports Server-Sent Events for clients that require persistent connections.

bun run src/app.stateful.ts
6

Connect an MCP client via mcp-remote

Use the mcp-remote bridge package to connect Claude Desktop or another stdio-based MCP host to your running HTTP server.

bunx mcp-remote --transport http-first https://your-server-domain.com/mcp

HTTP OAuth Examples

Client configuration

Claude Desktop configuration using mcp-remote to connect to the OAuth-protected HTTP MCP server. Replace the URL with your deployed server address.

{
  "mcpServers": {
    "http-oauth": {
      "command": "bunx",
      "args": [
        "mcp-remote",
        "--transport",
        "http-first",
        "https://your-server-domain.com/mcp"
      ]
    }
  }
}

Prompts to try

Example interactions once connected to a server built on this reference implementation.

- "Authenticate me to access the protected tools on this server."
- "What tools are available on this MCP server?"
- "Connect using SSE transport instead of HTTP streaming."
- "Show me the OAuth token details for my current session."

Troubleshooting HTTP OAuth

OAuth authorization fails with 'dynamic client registration not enabled'

Log into your Auth0 dashboard, navigate to Applications > APIs, and enable dynamic client registration for your tenant. The server relies on this Auth0 feature to onboard new MCP clients automatically.

Server starts but clients cannot connect via SSE transport

SSE (stateful) mode requires persistent in-memory connections and cannot be deployed behind a stateless load balancer. Either use the stateless HTTP variant (app.stateless.ts) or ensure clients connect to a single server instance. Use --transport sse-only with mcp-remote for SSE-only mode.

bun command not found

Install Bun by running `curl -fsSL https://bun.sh/install | bash` on macOS/Linux, then restart your terminal. Verify with `bun --version`.

Frequently Asked Questions about HTTP OAuth

What is HTTP OAuth?

HTTP OAuth is a Model Context Protocol (MCP) server that reference implementation for creating an mcp server supporting streamable http & sse transports with oauth authorization, allowing developers to build oauth-authorized mcp servers with minimal configuration. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install HTTP OAuth?

Follow the installation instructions on the HTTP OAuth GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with HTTP OAuth?

HTTP OAuth works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is HTTP OAuth free to use?

Yes, HTTP OAuth is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

HTTP OAuth Alternatives — Similar Security Servers

Looking for alternatives to HTTP OAuth? Here are other popular security servers you can use with Claude, Cursor, and VS Code.

Casdoor

13.6k

An open-source Agent-first Identity and Access Management (IAM) /LLM MCP & agent gateway and auth server with web UI supporting OpenClaw, MCP, OAuth, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, Face ID, Google Workspace, Azure AD

ghidraMCP

9.0k

An Model Context Protocol server that enables LLMs to autonomously reverse engineer applications by exposing Ghidra's decompilation and analysis tools. It allows AI agents to list code structures, rename methods, and analyze binaries directly through

HexStrike AI

8.9k

HexStrike AI MCP Agents is an advanced MCP server that lets AI agents (Claude, GPT, Copilot, etc.) autonomously run 150+ cybersecurity tools for automated pentesting, vulnerability discovery, bug bounty automation, and security research. Seamlessly b

IDA Pro MCP

8.7k

Enables AI-assisted reverse engineering in IDA Pro by providing tools to analyze binaries, decompile functions, manage comments, search patterns, and interact with the IDA database through natural language.

Anthropic Cybersecurity Skills

6.6k

754 structured cybersecurity skills for AI agents · Mapped to 5 frameworks: MITRE ATT&CK, NIST CSF 2.0, MITRE ATLAS, D3FEND & NIST AI RMF · agentskills.io standard · Works with Claude Code, GitHub Copilot, Codex CLI, Cursor, Gemini CLI & 20+ platform

Hooker

5.1k

🔥🔥 hooker is a Frida-based reverse engineering toolkit for Android. It offers a user-friendly CLI, universal scripts, auto hook generation, memory roaming to detect activities/services, one-click SOCKS5 proxy setup, Frida JustTrustMe, and BoringSSL u

Browse More Security MCP Servers

Explore all security servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "http-oauth-mcp-server": { "command": "npx", "args": ["-y", "http-oauth-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use HTTP OAuth?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides