
A modular FastMCP server for interacting with Microsoft Graph API, supporting advanced queries for users, sign-in logs, MFA status, and privileged users.

A sample MCP server that uses OAuth2 Bearer tokens from Microsoft Entra ID (Azure AD) to protect its endpoint, runnable locally with FastAPI and FastMCP.
Sample authenticated MCP server built with FastAPI and FastMCP is cataloged as an MCP server attributed to flowsoft-org. A sample MCP server that uses OAuth2 Bearer tokens from Microsoft Entra ID (Azure AD) to protect its endpoint, runnable locally with FastAPI and FastMCP. It is categorized under auth security. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for Sample authenticated MCP server built with FastAPI and FastMCP are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
It uses OAuth2 Bearer tokens from Microsoft Entra ID (Azure AD) to protect the MCP server.
Requests with no or an invalid token receive a 401 Unauthorized response.
README.md · 62ca4e56fa73 · Fetched 2026-11-13 13:54:19 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
This repository contains sample code for building Model Context Protocol (MCP) servers with authentication using FastAPI and FastMCP.
pip install -r requirements.txt
python server.py
The server will start on http://localhost:8000
This sample demonstrates how to protect your MCP server using OAuth2 Bearer tokens from Microsoft Entra ID (Azure AD).
api://<APPUUID>).mcp.tools).Update BearerAuthProvider in server.py:
<ENTRATENANTID> with your Entra tenant ID.<APPUUID> with your Application (client) ID or Application ID URI.jwks_uri, issuer, audience, and required_scopes.Example:
auth = BearerAuthProvider(
jwks_uri="https://login.microsoftonline.com/<ENTRATENANTID>/discovery/v2.0/keys",
issuer="https://sts.windows.net/<ENTRATENANTID>/",
algorithm="RS256",
audience="api://<APPUUID>",
required_scopes=["mcp.tools"]
)
Update oauth-protected-resource.json:
{
"resource": "api://<APPUUID>",
"issuer": "https://sts.windows.net/<ENTRATENANTID>/",
"scopes": ["mcp.tools"]
}
Replace placeholders with your actual values.
This MCP server can also be used in GitHub Copilot Agent mode in VS Code. To enable this:
mcp.json file to configure the MCP server for GitHub Copilot.mcp.json configuration.You can test the protected endpoint using curl:
curl -H "Authorization: Bearer <token>" http://localhost:8000/mcp
If no or an invalid token is provided, you will receive a 401 Unauthorized response.
See LICENSE.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for Sample authenticated MCP server built with FastAPI and FastMCP from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/mcp-authentication-samples)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

A modular FastMCP server for interacting with Microsoft Graph API, supporting advanced queries for users, sign-in logs, MFA status, and privileged users.

A Model Context Protocol (MCP) server that provides programmatic access to Keycloak administration functionality.

An MCP server for LLM-driven penetration testing that wraps Kali tools and adds scope enforcement, engagement tracking, and structured output.