mcp-oauth21-scalekit

Add OAuth 2.1 token validation middleware to MCP servers using Scalekit.

1|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/scalekit-inc/cursor-authstack --skill mcp-oauth21-scalekit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcp-oauth21-scalekit
Source: https://github.com/scalekit-inc/cursor-authstack/tree/main/plugins/mcp-auth/skills/add-mcp-auth
Command: npx skills add https://github.com/scalekit-inc/cursor-authstack --skill mcp-oauth21-scalekit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Secure an MCP server so only authenticated + authorized users (and approved MCP clients) can call your tools, using Scalekit as the OAuth 2.1 authorization server and your MCP server as the resource server.

Core Features & Use Cases

  • Public discovery endpoint at /.well-known/oauth-protected-resource
  • Bearer token validation middleware for MCP endpoints
  • Optional per-tool scope enforcement
  • Templates and references for Node.js and Python

Quick Start

Register your MCP server in the Scalekit dashboard, enable Dynamic Client Registration (DCR) and Client ID Metadata Document (CIMD) as needed for public clients, and implement the discovery endpoint to enable OAuth 2.1 token validation.

Frequently Asked Questions about mcp-oauth21-scalekit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add OAuth 2.1 authorization to an MCP server?

To add OAuth 2.1 authorization to an MCP server, implement a discovery endpoint and use token-validation middleware to secure it as a resource server. This protects tools so only authenticated users and approved clients can call them.

Can I enforce per-tool scope checks on an MCP resource server?

Yes, you can enforce per-tool scope checks on an MCP resource server. The middleware supports optional per-tool scope enforcement, allowing you to apply scoped permissions to specific tools accessed by clients.

Does OAuth 2.1 bearer token validation work with Claude Desktop and Cursor?

OAuth 2.1 bearer token validation works with Claude Desktop, Cursor, and VS Code. The middleware secures MCP endpoints so these clients can safely access tools with scoped permissions.

What is the OAuth 2.1 protected resource discovery endpoint for MCP?

The OAuth 2.1 protected resource discovery endpoint for MCP is a public route at /.well-known/oauth-protected-resource. It enables MCP clients to discover the server's authorization requirements and initiate dynamic client registration.

Do I need to enable Dynamic Client Registration for public MCP clients?

You need to enable Dynamic Client Registration (DCR) and Client ID Metadata Document (CIMD) in the Scalekit dashboard for public MCP clients. This configuration allows public clients to securely access your protected resource server.

Are there Node.js and Python templates for MCP OAuth 2.1 middleware?

Node.js and Python templates are available for MCP OAuth 2.1 middleware. These references provide the implementation structure for bearer token validation and discovery endpoints to secure your resource server.