praisonai mcp serve --transport http-stream includes a built-in OAuth 2.1 authorization server so editors and coding agents sign in to your remote PraisonAI MCP server automatically β no static API keys to distribute.
--oauth locally) and editors like Cursor, VS Code, Claude Code, Zed, Antigravity, Kiro, Codex, Goose, and OpenCode discover the login flow automatically.
This page covers the server side β PraisonAI acting as the OAuth 2.1 authorization server for incoming MCP clients. For a PraisonAI agent connecting as a client to an external OAuth-protected MCP server, see MCP OAuth Authentication.
Quick Start
1
Install with server and auth extras
2
Start an OAuth-protected remote MCP server
Local If
stdio and --host 127.0.0.1 remain zero-auth. Binding to a non-loopback address without --api-key or --keys-file turns OAuth 2.1 on automatically (or pass --oauth to enable it on localhost too):PRAISONAI_MCP_OWNER_KEY is unset, a one-time owner key is generated and printed at startup.3
Approve on the consent page
When an editor connects, it opens your browser to the consent page. Enter the owner key once, review whether the client is Verified or On this device, untick any scopes you want to withhold (or click Allow read-only), pick a lifetime, and approve.
How It Works
Choosing an Auth Mode
Best Practices
Set --issuer to your public HTTPS URL
Set --issuer to your public HTTPS URL
Always pass
--issuer https://your-domain.example behind TLS so OAuth discovery metadata and token audiences match the URL clients connect to.Use Allow read-only for untrusted or exploratory clients
Use Allow read-only for untrusted or exploratory clients
The consent page lets you untick
tools:call or click Allow read-only so a client can inspect tools and resources without executing actions.Use the device flow over SSH or containers
Use the device flow over SSH or containers
For headless terminals where opening a local browser callback is awkward, use the built-in RFC 8628 device flow (
/oauth/device β /oauth/device/verify).Related
praisonai connect
One-command MCP client installation across 22 editors
MCP OAuth Authentication (Client)
Connect a PraisonAI agent to an external OAuth-protected MCP server
praisonai-mcp Package
Full praisonai-mcp installation and host CLI reference
Scoped API Keys
Static scoped bearer keys for scripts and service accounts

