HTTP OAuth
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.
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
Maintainer
Works with
Installation
Manual Installation
npx http-oauth-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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)
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-serverInstall dependencies
Install the project dependencies using Bun.
bun installConfigure 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.comStart 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.tsOr 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.tsConnect 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/mcpHTTP 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.6kAn 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.0kAn 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.9kHexStrike 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.7kEnables 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.6k754 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.
Set Up HTTP OAuth in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.