entra-id-mcp-server-session-demo
by: dend
Demo showing how to use Entra ID with MCP servers without passing access tokens through.
📌Overview
Purpose: This framework aims to demonstrate the implementation of Entra ID authentication in an MCP server using HTTP+SSE transport.
Overview: The Minimal Entra ID-authenticated MCP Server provides a simple model for integrating Entra ID authentication with the Model Context Protocol (MCP). It utilizes a confidential client within the MCP server and employs session mapping for session assignment through a JWT-like token, avoiding the use of cookies.
Key Features:
-
Confidential Client Integration: Implements a confidential client within the server to securely manage authentication and session assignments.
-
Session Mapping with JWT: Utilizes session mapping to assign JWT tokens for session tracking, enhancing security and compliance with session management practices.
🔒 Minimal Entra ID-authenticated MCP Server
Minimal server demonstrating how to implement Entra ID authentication with MCP and HTTP+SSE transport. This implementation uses a confidential client within the MCP server and employs "session mapping" to assign sessions via a token resembling a JWT, as cookies cannot be used.
Important:
This repository has been archived. Refer to the reference collection for the latest samples and best practices.
Warning:
This is not intended for production use. If adopting any practices from this implementation, ensure proper caching and secure token/credential handling.
Run server
npm install
npm run build
npm run start
Testing
Use MCP Inspector or another tool that supports HTTP+SSE transport for MCP servers and authentication.