mcp-auth-expressjs-scalekit

Add Scalekit OAuth authentication to an Express MCP server.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Add production-ready Scalekit OAuth authentication to an Express.js MCP server, enabling secure client discovery, token validation, and protected tool execution.

Core Features & Use Cases

  • Public discovery endpoint at /.well-known/oauth-protected-resource
  • Bearer token validation middleware using Scalekit SDK
  • MCP endpoint protected by middleware using StreamableHTTPServerTransport
  • Two modes: scaffold a new MCP server or retrofit an existing Express app

Quick Start

Run npm install and npm run dev to start the Express MCP server with Scalekit OAuth authentication.

Frequently Asked Questions about mcp-auth-expressjs-scalekit

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

FAQPage Schema
How do I add OAuth authentication to an Express MCP server?

You can add OAuth authentication to an Express MCP server by applying this Skill's Scalekit bearer token validation middleware to protect your MCP POST endpoint using StreamableHTTPServerTransport.

What environment variables are required for Scalekit OAuth token validation?

Scalekit OAuth token validation requires the SK_ENV_URL, SK_CLIENT_ID, SK_CLIENT_SECRET, EXPECTED_AUDIENCE, and PROTECTED_RESOURCE_METADATA environment variables to be configured for secure discovery and endpoint protection.

How does OAuth protected resource discovery work with Express MCP?

OAuth protected resource discovery works in Express MCP by exposing a public endpoint at /.well-known/oauth-protected-resource, allowing clients to automatically locate your server's authentication metadata and initiate the OAuth flow.

Can I retrofit an existing Express app with Scalekit OAuth middleware?

Yes, you can retrofit an existing Express app with Scalekit OAuth middleware, as the Skill supports two modes: scaffolding a new authenticated MCP server or integrating validation directly into your current Express application.

Does StreamableHTTPServerTransport support bearer token validation middleware?

Yes, StreamableHTTPServerTransport supports bearer token validation middleware, allowing you to secure your MCP tool execution by validating Scalekit OAuth tokens before processing requests on the Express server.