Descope Auth MCP Server Template
Enables deployment and hosting of the MCP server on Render's platform with automatic configuration through render.yaml Blueprint, supporting both free and paid hosting plans.
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., "@Descope Auth MCP Server Templatesay hello to me"
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.
MCP Server Template with Descope Auth
A simple FastMCP server template for Render, with full MCP authentication by Descope.
What's included
A working MCP server using FastMCP with Streamable HTTP transport
Full MCP Authorization Support with FastMCP's
DescopeProviderand thedescope-mcpSDKOne example tool (
hello) that returns"Hello, world!"and enforces tool-level scope requirements (mcp:greet)A
render.yamlBlueprint for easy deployment
Note: This template deploys on Render's free plan by default. Free services spin down after 15 minutes of inactivity, causing cold starts of 30-60 seconds on the next request. MCP clients may time out during this delay. For reliable use, upgrade to a paid plan in the Render Dashboard — the Starter plan keeps your service running continuously.
Prerequisites
Descope Setup
Log in to the Descope Console.
Navigate to Agentic Identity Hub → MCP Servers.
Click + MCP Server to create a new MCP server and give it a name.
Under MCP Client Registration, enable Client ID Metadata Documents (CIMD) and Dynamic Client Registration (DCR). Optionally, you can restrict allowed domains for clients registering via CIMD (e.g.
https://claude.ai) - feel free to leave this field blank.Under MCP Server Scopes, add a scope named
mcp:greetand a simple description like "Greet the user".Click Create.
Expand the
Connect your MCP server to Descopesection on the confirmation pageCopy the Well-Known URL. It looks like this:
https://api.descope.com/v1/apps/agentic/.../.well-known/openid-configurationThis is your
DESCOPE_CONFIG_URL.
Note: Descope issues tokens following Resource Indicators (RFC 8707), as required by the MCP spec. When you're deploying on Render or running locally, you'll need to update the MCP Server URLs section.
Deploying on Render
Ensure that you've completed the Descope Setup step prior to developing locally, as you'll need your
DESCOPE_CONFIG_URL.
Fork this repository to your GitHub account.
Click Deploy to Render (or fork this repo on GitHub and import it as a Blueprint in your Render account).
In your Specified Configurations, set the environment variable to the value obtained in the Descope Setup step:
Key
Value
DESCOPE_CONFIG_URLYour Well-Known URL from the Descope Console
Click Deploy Blueprint.
Once live, copy your Render service URL (e.g.
https://<your-project>.onrender.com), append/mcp, and add it to MCP Server URLs in the Descope Console.
You now have a remotely hosted MCP Server with the full auth spec supported!
Local development
Ensure that you've completed the Descope Setup step prior to developing locally, as you'll need your
DESCOPE_CONFIG_URL.
First, fork this repo to your GitHub account, then follow the instructions below to set up your environment.
# Install dependencies
uv sync
# Set required environment variables
export DESCOPE_CONFIG_URL="<your URL from Descope>"
export SERVER_URL="http://localhost:8000"
# Run the server
uv run server.py --transport http --port 8000When you run this locally, your server will run at http://localhost:8000/mcp.
Available tools
Tool | Description | Required scope |
| Returns |
|
Next steps
Now that you're all set up, there's a few more steps we recommend if you're taking your MCP Server to production.
Add your own tools
Replace or extend the hello tool in server.py with your own logic. For each new tool:
Define a new scope in the Descope Console under MCP Server Scopes (e.g.
mcp:your-scope).Add the tool using the
@mcp.tool()decorator.Call
require_scopes(token, ["mcp:your-scope"])inside the tool body to enforce access control.Add the new tool and its required scope to the Available tools table above.
@mcp.tool()
def my_tool() -> str:
token = validate_token()
require_scopes(token, ["mcp:your-scope"])
return "your result"Use a custom domain on Render
By default, your service is reachable at https://<your-project>.onrender.com. To use a custom domain:
In the Render Dashboard, go to your service → Settings → Custom Domains.
Add your domain and follow the DNS instructions provided.
Once the domain is verified, update MCP Server URLs in the Descope Console to use your custom domain (e.g.
https://mcp.yourdomain.com/mcp).No code changes are needed -
RENDER_EXTERNAL_URLis set automatically by Render and will reflect the primary domain.
Protect all tools with scopes
The require_scopes() check is intentionally opt-in per tool so you can add unauthenticated tools if needed. For a production server, it is good practice to call require_scopes() in every tool. You can also centralize this by writing a helper that wraps validate_token() and require_scopes() and calling it at the top of each tool handler.
How MCP Auth works
An MCP client (e.g. Claude Desktop, Cursor) discovers OAuth metadata from
/.well-known/oauth-authorization-serverwhen trying to connect to your MCP Server.The client registers dynamically (via CIMD or DCR) to the authorization server and redirects the user to Descope's login / consent flow.
After login, Descope issues a signed JWT. The client includes this as a Bearer token on every MCP request.
DescopeProvidervalidates the JWT using Descope's JWKS endpoint before any tool is called.Inside the tool,
validate_token()parses the claims andrequire_scopes()checks thatmcp:greetis present, returning an error to the client if not.
Learn more
This server cannot be installed
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
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/render-examples/descope-render'
If you have feedback or need assistance with the MCP directory API, please join our Discord server