About OpenAuth Server
OpenAuth Server is a demo of a universal user-authentication provider for application developers, deployable on Cloudflare Workers. It demonstrates login, registration, and password reset, using D1 and KV for storage and state.
Key features
- 01User login
- 02User registration
- 03Password reset
- 04D1 data storage
- 05KV state storage
Use cases
- 01Add user authentication to an application
- 02Deploy authentication on Cloudflare Workers
- 03Manage authentication data with D1 and KV
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEOpenAuth Server
OpenAuth is a universal provider for managing user authentication. By deploying OpenAuth on Cloudflare Workers, you can add scalable authentication to your application. This demo showcases login, user registration, and password reset, with storage and state powered by D1 and KV.
Important
When using C3 to create this project, select "no" when it asks if you want to deploy. You need to follow this project's setup steps before deploying.
Getting Started
Outside of this repo, you can start a new project with this template using C3 (the create-cloudflare CLI):
npm create cloudflare@latest -- --template=cloudflare/templates/openauth-template
A live public deployment of this template is available at https://openauth-template.templates.workers.dev
Setup Steps
- Install the project dependencies with a package manager of your choice:
npm install - Create a D1 database with the name "openauth-template-auth-db":
...and update thenpx wrangler d1 create openauth-template-auth-dbdatabase_idfield inwrangler.jsonwith the new database ID. - Run the following db migration to initialize the database (notice the
migrationsdirectory in this project):npx wrangler d1 migrations apply --remote openauth-template-auth-db - Create a kv namespace with a binding named "AUTH_STORAGE":
...and update thenpx wrangler kv namespace create AUTH_STORAGEkv_namespaces->idfield inwrangler.jsonwith the new namespace ID. - Deploy the project!
npx wrangler deploy
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.