oauth-auth0-mcp-prototype
Provides authentication and authorization via Auth0, validating RS256 JWTs and extracting org_id to map to cabinet_id, with protected endpoints for HTTP and MCP using access tokens.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@oauth-auth0-mcp-prototypewho am i"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Standalone Auth0 + MCP prototype
This folder is isolated from the plugin workspace so the OAuth/Auth0 test can be run on its own.
For the full narrative, mistakes, and final working flow, see AUTH0_PROTOTYPE_RUNBOOK.md.
Pourquoi j’ai fait ce prototype
Le passage le plus important que je veux m’assurer qu’il fonctionne, c’est la chaîne d’identité de bout en bout :
Auth0 émet un access token valide, Alpic le transmet à mon serveur MCP, le backend valide le JWT,
et je peux mapper de façon fiable org_id vers cabinet_id.
Pour m’en assurer, je suis passé par un prototype minimal au lieu de brancher Turso tout de suite. Ça m’a permis d’isoler la couche identité et transport du reste de l’application.
Pour tester ça, je n’ai exposé que la surface la plus simple utile :
GET /healthpour le contrôle publicGET /whoamipour le contrôle HTTP protégéPOST /mcpavec un seul outilwhoami()pour le contrôle MCP protégé
Comme ça, je peux prouver que le chemin d’authentification fonctionne avant d’ajouter la persistance ou la logique métier.
Related MCP server: MCP Auth
Erreurs de déploiement que j’ai faites
J’ai d’abord pris le mauvais runtime pour le code existant avant de réaligner le prototype sur le runtime réellement attendu par Alpic.
J’ai oublié
pyproject.toml, ce qui a cassé le build Python avecNo pyproject.toml found.J’ai oublié
uv.lock, alors qu’Alpic lance le build Python en mode figé avecUV_FROZEN=1.J’ai oublié
main.py, alors qu’Alpic essayait de démarrer le serveur avec ce point d’entrée.J’ai hardcodé le port
8000au lieu de lire le port fourni par l’environnement Alpic, ce qui peut empêcher la connexion même si le déploiement est marqué comme réussi.
Endpoints
GET /healthGET /whoamiPOST /mcp
Environment
Set these variables in Alpic:
AUTH0_DOMAIN=dev-v4m6lbgizxmu1vhc.us.auth0.comAUTH0_AUDIENCE=<your Auth0 API identifier>ENV=production
Optional but useful:
AUTH0_ISSUER=https://dev-v4m6lbgizxmu1vhc.us.auth0.com/AUTH0_JWKS_URL=https://dev-v4m6lbgizxmu1vhc.us.auth0.com/.well-known/jwks.jsonCABINET_ID_BY_ORG_JSON={"org_123":"cabinet-a"}DEFAULT_CABINET_ID=cabinet-aCORS_ALLOWED_ORIGINS=http://127.0.0.1:3000PUBLIC_BASE_URL=https://your-alpic-deployment-url
For local tests, AUTH0_JWKS_JSON can hold a JWKS document directly.
The server now exposes OAuth discovery metadata at:
/.well-known/oauth-protected-resource/.well-known/oauth-authorization-server
For Alpic DCR proxy discovery, the metadata self-references the deployed MCP public URL as its issuer while still pointing authorization and token endpoints to Auth0.
Run
Backend:
python server.py --host 127.0.0.1 --port 8000Local Auth0 token helper:
python client_server.py --host 127.0.0.1 --port 3000Then open http://127.0.0.1:3000/, sign in, and copy the access token.
If the project is installed as a package, the console script is:
oauth-auth0-mcp-prototypeAlpic can also start the repository entrypoint directly from main.py.
Local Auth0 setup
In the Auth0 SPA application, set:
Allowed Callback URLs:
http://127.0.0.1:3000/callbackAllowed Logout URLs:
http://127.0.0.1:3000/Allowed Web Origins:
http://127.0.0.1:3000Allowed Origins (CORS):
http://127.0.0.1:3000
If you want the page button to call the backend directly, start the backend with:
$env:CORS_ALLOWED_ORIGINS="http://127.0.0.1:3000"
python server.py --host 127.0.0.1 --port 8000Test
python -m unittest discover -s testsWhat this proves
/healthworks without auth/whoamirejects missing tokens/whoamiaccepts a valid Auth0 RS256 access tokenorg_idis extracted from the tokencabinet_idis resolved from the organization metadatathe MCP
whoami()tool returns the same identity payloadthe local client on port 3000 can complete Auth0 PKCE login and recover the access token
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Baadr-IA/oauth-auth0-mcp-prototype'
If you have feedback or need assistance with the MCP directory API, please join our Discord server