Get the FREE Ultimate OpenClaw Setup Guide →

entra-id -session-demo

Demo showing how to use Entra ID with MCP servers without passing access tokens through.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio dend-entra-id-mcp-server-session-demo node dist/server.js

How to use

This MCP server implements a minimal Entra ID (Azure AD) authenticated MCP server that demonstrates session mapping and HTTP+SSE transport. It relies on a confidential client inside the MCP server to perform the Entra ID authentication flow and assigns sessions via a token-like mechanism that resembles a JWT, suitable for MCP tooling without cookies. To try it, first ensure the server is built and started, then connect with an MCP client or inspector that supports HTTP+SSE transport to observe session allocation, authentication status, and token-like session data.

How to install

Prerequisites:

  • Node.js and npm installed on your machine

Installation steps:

  1. Clone the repository: git clone <repository-url>
  2. Navigate to the project directory: cd <project-directory>
  3. Install dependencies: npm install
  4. Build the project (as suggested by the README): npm run build
  5. Start the server: npm run start

If you encounter port or authentication-related errors, ensure environment variables for any authentication endpoints or client credentials are properly set per your environment (see additional notes).

Additional notes

Notes and tips:

  • The repository is archived and intended as a minimal sample. Do not use as-is for production without proper security hardening, token handling, and caching.
  • If using Entra ID, ensure you configure the confidential client credentials and redirect URI in your Entra ID app registration according to your deployment.
  • Transport is HTTP+SSE for MCP; ensure your MCP client supports SSE and that firewalls allow the required ports.
  • If you need to customize behavior, look for session-mapping logic inside the server code and adapt token issuance and validation accordingly.
  • Common issues include missing dependencies after npm install, port collisions, or misconfigured authentication endpoints. Check server logs for startup errors and verify that the built artifacts exist at dist/server.js (or adjust path if your build outputs a different location).

Related MCP Servers

Sponsor this space

Reach thousands of developers