
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.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
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 · 采集于 2026-11-13 13:54:19 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
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.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
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.