descope-playwright-mcp-auth
Enables secure remote access to a Playwright-based MCP server with authentication and role-based access control powered by Descope.
README
Adding Remote Support and Authentication to a Local MCP Server
A secure Playwright MCP server with authentication and role-based access control powered by Descope. This project demonstrates how to add enterprise-grade security to MCP servers for safe remote access and team collaboration.
How it Works
- The MCP client, in this case, the MCP Inspector, registers with the proxy via the DCR.
- It redirects you to the authentication/consent flow set up in the Descope console.
- You log in and consent to the requested scopes.
- Descope issues an access token to the MCP client.
- The MCP client includes this token in its requests to the proxy server.
- The proxy server validates the token before forwarding the request to the MCP server.
Prerequisites
- Node.js 18+
- A Descope account
- Follow along with the article to set up the Descope project
Local Setup
-
Clone the repository:
git clone https://github.com/kimanikevin254/descope-playwright-mcp-auth.git cd descope-playwright-mcp-auth -
Install dependencies:
npm install -
Configure environment variables by copying the
.env.examplefile and replacing the placeholder values with the actual project credentials from the Descope Console:cp .env.example .env -
Start the MCP server (Terminal 1):
npm run start:mcp -
Start the auth proxy (Terminal 2):
npx nodemon --exec 'ts-node' src/auth-proxy.ts -
Test with MCP Inspector (Terminal 3):
npx @modelcontextprotocol/inspector@0.17.2 --transport http --server-url http://localhost:3000/mcpIf you have another machine running on the network, you can run the MCP Inspector on it with the command
npx @modelcontextprotocol/inspector@0.17.2 --transport http --server-url http://<AUTH-PROXY-MACHINE-IP>:3000/mcp, where<AUTH-PROXY-MACHINE-IP>is the IP address of the machine that is running both the MCP server and the auth proxy. -
Once the MCP Inspector UI launches, select Connect to connect to your MCP server.
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
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.