Skip to main content
Make AgentOS its own OAuth 2.1 authorization server for MCP connector clients. The synchronous OS-level SQLite database stores clients, codes, signing keys, and refresh tokens for local development; use synchronous PostgresDb for a restart-safe, multi-replica production deployment.
oauth_builtin.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export environment variables

4

Run the example

Save the code above as oauth_builtin.py, then run:
Full source: cookbook/05_agent_os/14_mcp/oauth_builtin.py