oauth-auth0-mcp-prototype

oauth-auth0-mcp-prototype

This MCP server demonstrates end-to-end Auth0 authentication, validating JWT tokens and mapping org_id to cabinet_id via a whoami tool.

Category
Visit Server

README

Standalone Auth0 + MCP prototype

This folder is isolated from the plugin workspace so the OAuth/Auth0 test can be run on its own.

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 /health pour le contrôle public
  • GET /whoami pour le contrôle HTTP protégé
  • POST /mcp avec un seul outil whoami() 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.

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 avec No pyproject.toml found.
  • J’ai oublié uv.lock, alors qu’Alpic lance le build Python en mode figé avec UV_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 8000 au 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 /health
  • GET /whoami
  • POST /mcp

Environment

Set these variables in Alpic:

  • AUTH0_DOMAIN=xxx.eu.auth0.com
  • AUTH0_AUDIENCE=https://memoire-classification-api
  • ENV=production

Optional but useful:

  • AUTH0_ISSUER=https://xxx.eu.auth0.com/
  • AUTH0_JWKS_URL=https://xxx.eu.auth0.com/.well-known/jwks.json
  • CABINET_ID_BY_ORG_JSON={"org_123":"cabinet-a"}
  • DEFAULT_CABINET_ID=cabinet-a

For local tests, AUTH0_JWKS_JSON can hold a JWKS document directly.

Run

python server.py --host 127.0.0.1 --port 8000

If the project is installed as a package, the console script is:

oauth-auth0-mcp-prototype

Alpic can also start the repository entrypoint directly from main.py.

Test

python -m unittest discover -s tests

What this proves

  • /health works without auth
  • /whoami rejects missing tokens
  • /whoami accepts a valid Auth0 RS256 access token
  • org_id is extracted from the token
  • cabinet_id is resolved from the organization metadata
  • the MCP whoami() tool returns the same identity payload

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured