mcp-auth s
🔒 Reference MCP servers that demo how authentication works with the current Model Context Protocol spec.
claude mcp add --transport stdio localden-mcp-auth-servers node server.js \ --env PORT="3000 (or preferred port)" \ --env MCP_ENV="development or placeholder" \ --env MCPC_SPEC_URL="Description or placeholder (Model Context Protocol spec URL)"
How to use
This MCP server collection demonstrates authentication flows that align with the Model Context Protocol (MCP) specification. Each server in this repository is designed to illustrate how different identity providers and client types interact with the MCP authentication model, including session tokens, OAuth integrations, and local/wam scenarios. The environment is intended for experimentation and learning, with prototype-level implementations suitable for demonstration and threat-modeling exercises rather than production use. To explore the capabilities, start the local server instance, review the example scenarios under the identity provider sections, and examine the reference implementations that map to real-world Authentication and Authorization flows as described in the MCP spec. You can use the included examples to observe how tokens are issued, refreshed, validated, and mapped to user sessions, as well as how remote and dual-purpose configurations can operate in local development contexts.
How to install
Prerequisites:
- Node.js (LTS) and npm installed on your machine
- Git installed
- Basic understanding of MCP concepts and the repository structure
Install steps:
-
Clone the repository: git clone https://github.com/your-org/localden-mcp-auth-servers.git cd localden-mcp-auth-servers
-
Install dependencies (per server project; adjust if a monorepo uses a workspace): npm install
-
Configure environment (example):
- Create a .env file or export environment variables as needed by the server
- Required/placeholder vars may include MCPC_SPEC_URL, MCP_ENV, PORT, and any provider-specific credentials
-
Start the server: npm run start # or node server.js if the entry point is server.js
-
Verify locally by hitting the endpoints described in the server's README or by using client samples to trigger authentication flows.
Additional notes
Notes and tips:
- This repository contains prototype/demo implementations intended for reference and learning; review and tailor security controls before any production use.
- The official reference for MCP authentication behavior is located in the MCP spec and the Azure-Samples/mcp-auth-servers repository referenced in the README. Use those sources for authoritative guidance and updates.
- If you encounter port conflicts, adjust the PORT variable in your environment or in a .env file.
- Some servers may require additional provider credentials or redirect URLs; ensure you configure them according to the provider documentation and your local development setup.
- For local debugging, inspect logs and enable verbose/debug mode if available to trace token issuance, validation, and session mapping flows.
Related MCP Servers
ironcurtain
A secure* runtime for autonomous AI agents. Policy from plain-English constitutions. (*https://ironcurtain.dev)
CanvasMCPClient
Canvas MCP Client is an open-source, self-hostable dashboard application built around an infinite, zoomable, and pannable canvas. It provides a unified interface for interacting with multiple MCP (Model Context Protocol) servers through a flexible, widget-based system.
js
🔐 Plug-and-play auth for Node.js MCP servers.
keycloak-model-context-protocol
MCP server implementation for Keycloak user management. Enables AI-powered administration of Keycloak users and realms through the Model Context Protocol (MCP). Seamlessly integrates with Claude Desktop and other MCP clients for automated user operations.
strava
A Model Context Protocol (MCP) server with Strava OAuth integration, built on Cloudflare Workers. Enables secure authentication and tool access for MCP clients like Claude and Cursor through Strava login. Perfect for developers looking to integrate Strava authentication with AI tools.
oauth-callback
Lightweight OAuth 2.0 authorization code capture for CLI tools & desktop apps. Works with Node.js, Deno, Bun. MCP SDK ready.