Token导航 LogoToken导航TokenDH.com
MCP Msgraph logo
开发工具stdio官方级别未说明来源级核验

MCP Msgraph

MCP Server

A prototype MCP server which reads a user profile from Microsoft Graph.

工具数

0

提示词数

0

GitHub Stars

1

资源数

0
开发工具Python本地部署

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

kevinbellinger

提供方

kevinbellinger

最后核验

2026/5/18 03:28

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

python3 -m venv venv

详细介绍

MCP MSGraph

原型 MCP(模型上下文协议) 从中读取用户配置文件的服务器 微软图形.\ 该项目演示了如何将MCP连接到存储在Microsoft Graph中的数据,作为概念验证。

______________________________________________________________________

创建Azure AD应用程序

  1. 登录到 Azure门户.
  2. 引导到 Azure Active Directory > 应用程序注册 > 新注册.
  3. 创建新应用程序。
  4. 注意生成的 应用程序(客户端)ID客户端密钥.
  5. 在...之下 API权限,添加 用户。读。全部 (视情况而定)并授予管理员同意。

______________________________________________________________________

运行服务器的说明:

  1. 克隆 存储库或设置自己的文件夹和文件结构。
  1. 创建虚拟环境:
python3 -m venv venv
source venv/bin/activate
  1. 安装所需的软件包:
pip install fastapi uvicorn requests requests-oauthlib pydantic
  1. 打开'main.py',将占位符值替换为您的应用程序ID、租户ID和客户端密钥。
  1. 启动服务器
uvicorn main:app --reload

您的服务器将在http://127.0.0.1:8000.

______________________________________________________________________

示例请求

使用curl(或任何REST客户端)发送请求以检索用户的配置文件:

curl -X POST http://localhost:8000/mcp \
  -H "Content-Type: application/json" \
  -d '{
        "action":"readUserProfile",
        "contextId":"abc123",
        "data": {"userId":"someUser@yourtenant.onmicrosoft.com"}
      }'

结果应该看起来像:

{"status":"success","action":"readUserProfile","contextId":"abc123","data":{"@odata.context":"https://graph.microsoft.com/beta/$metadata#users('adelev%40M365x17584779.onmicrosoft.com')/profile/$entity","id":"profileId","account@odata.context":"https://graph.microsoft.com/beta/$metadata#users('adelev%40M365x17584779.onmicrosoft.com')/profile/account","account":[{"ageGroup":"","countryCode":"","userPrincipalName":"AdeleV@M365x17584779.OnMicrosoft.com","allowedAudiences":"organization","createdDateTime":"2025-01-30T11:06:01.7661211Z","lastModifiedDateTime":"2025-01-30T11:06:01.9431431Z","id":"c74cb3af-2f62-43fa-9709-5d2cfc4b4042","isSearchable":false,"inference":null,"preferredLanguageTag":{"locale":null,"displayName":null},"createdBy":{"user":null,"device":null,"application":{"displayName":"AAD","id":null}},"lastModifiedBy":{"user":null,"device":null,"application":{"displayName":"MsGraph","id":null}},"source":{"type":["AAD","MsGraph"]},"sources":[{"sourceId":"4ce763dd-9214-4eff-af7c-da491cc3782d","isDefaultSource":true},{"sourceId":"0024a795-114d-4031-95c7-5fb543e00e80","properties":["isSipEnabled"]}]},{"ageGroup":"","countryCode":"","userPrincipalName":"","allowedAudiences":"federatedOrganizations","createdDateTime":"2025-01-30T11:06:01.7661213Z","lastModifiedDateTime":"2025-01-30T11:06:01.9431431Z","id":"750f8cc2-2f72-4b38-88c6-531dfc5ed47f","isSearchable":false,"inference":null,"preferredLanguageTag":{"locale":null,"displayName":null},"createdBy":{"user":null,"device":null,"application":{"displayName":"AAD","id":null}},"lastModifiedBy":{"user":null,"device":null,"application":{"displayName":"MsGraph","id":null}},"source":{"type":["AAD","MsGraph"]},"sources":[{"sourceId":"4ce763dd-9214-4eff-af7c-da491cc3782d","isDefaultSource":true},{"sourceId":"0024a795-114d-4031-95c7-5fb543e00e80","properties":["isSipEnabled"]}]}]}}%  

目录标签

目录标签

开发工具Python本地部署developer-toolsMicrosoftGraph用户配置文件MCP协议

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP