Token导航 LogoToken导航TokenDH.com
O365 Admin logo
运维云端未说明官方级别未说明来源级核验

O365 Admin

MCP Server

一个基于API的Microsoft 365管理服务器,通过懒加载技能文件提供核心管理功能。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
TypeScriptClaudeAPI集成Claude

安装说明

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

作者 / 组织

MagicTurtle-s

提供方

MagicTurtle-s

最后核验

2026/5/17 20:20

快速接入

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

详细介绍

o365管理员MCP

基于技能的Microsoft 365管理MCP服务器,围绕API而非应用程序进行组织。功能是从指令文件中延迟加载的,而不是作为大型工具清单公开。

建筑

此MCP仅暴露 4个基础工具:

工具目的
list_skills返回可用技能和资源参考
read_skill将技能或资源引用加载到上下文中
graph_api_call通用图形API执行器
powerplatform_api_call通用动力平台API执行器

没有特定于域的工具。 Claude阅读技能/资源来学习API调用什么来构建,然后通过通用工具执行。

目录结构

o365-Admin/
├── src/
│   └── index.ts           # MCP server with 4 base tools
├── skills/
│   ├── graph-api.md       # Core: auth, request patterns, pagination, errors
│   └── powerplatform-api.md  # Core: auth, environments, request patterns
├── resources/
│   ├── graph/
│   │   ├── sites.md       # SharePoint: sites, drives, lists, permissions
│   │   ├── teams.md       # Teams: teams, channels, tabs, apps
│   │   ├── users.md       # Entra: users, groups, directory roles
│   │   └── mail.md        # Exchange: messages, folders, rules, calendars
│   └── powerplatform/
│       ├── flows.md       # Flow definitions, runs, connections
│       └── environments.md # Environment management, DLP policies
├── README.md
├── package.json
└── tsconfig.json

先决条件

  • Node.js 18+
  • 具有适当权限的Azure AD应用程序注册
  • 访问Microsoft 365租户

Azure AD应用程序注册

步骤1:创建应用程序注册

  1. 首选 Azure门户 >Azure Active Directory>应用程序注册
  2. 点击“新建注册”
  3. 姓名: o365-Admin-MCP
  4. 支持的帐户类型:单租户(或多租户,如果需要)
  5. 点击“注册”

步骤2:创建客户端密码

  1. 在您的应用程序注册中,转到“证书和机密”
  2. 点击“新建客户端密码”
  3. 添加描述和到期时间
  4. 立即复制机密值 (仅显示一次)

步骤3:添加API权限

转到“API权限”>“添加权限”>《Microsoft Graph》>“应用程序权限”

根据您的需要添加以下权限:

SharePoint/OneDrive:

  • Sites.ReadWrite.All
  • Sites.Manage.All

团队:

  • Team.Create
  • TeamSettings.ReadWrite.All
  • Channel.Create
  • ChannelSettings.ReadWrite.All
  • TeamsApp.ReadWrite.All

用户/目录:

  • Directory.Read.All
  • Directory.ReadWrite.All
  • User.ReadWrite.All
  • Group.ReadWrite.All
  • RoleManagement.ReadWrite.Directory

邮件/日历:

  • Mail.ReadWrite
  • Mail.Send
  • Calendars.ReadWrite
  • MailboxSettings.ReadWrite

步骤4:授予管理员同意

点击“授予\[您的租户\]管理员同意”并确认。

第五步:记下你的ID

从应用程序注册“概述”页面,复制:

  • 应用程序(客户端)ID
  • 目录(租户)ID

环境配置

设置以下环境变量:

export AZURE_CLIENT_ID="your-client-id"
export AZURE_CLIENT_SECRET="your-client-secret"
export AZURE_TENANT_ID="your-tenant-id"

或者创建一个 .env 文件(记得添加到 .gitignore):

AZURE_CLIENT_ID=your-client-id
AZURE_CLIENT_SECRET=your-client-secret
AZURE_TENANT_ID=your-tenant-id

安装

# Clone the repository
git clone https://github.com/yourusername/o365-Admin.git
cd o365-Admin

# Install dependencies
npm install

# Build TypeScript
npm run build

# Run the server
npm start

发展

# Run in development mode (no build step)
npm run dev

与Claude一起使用

MCP配置

添加到您的Claude MCP设置中:

{
  "mcpServers": {
    "o365-admin": {
      "command": "node",
      "args": ["path/to/o365-Admin/dist/index.js"],
      "env": {
        "AZURE_CLIENT_ID": "your-client-id",
        "AZURE_CLIENT_SECRET": "your-client-secret",
        "AZURE_TENANT_ID": "your-tenant-id"
      }
    }
  }
}

工作流示例

  1. 列出可用资源:
   Use list_skills to see what's available
  1. 加载相关文件:
   Use read_skill with type="resource" and name="graph/sites"
  1. 执行API调用:
   Use graph_api_call with method="GET" and endpoint="/sites/root"

对话示例

User: Create a new SharePoint document library called "Project Files" in the IT site

Claude: 
1. [Uses read_skill to load graph/sites resource]
2. [Uses graph_api_call GET /sites/contoso.sharepoint.com:/sites/IT to get site ID]
3. [Uses graph_api_call POST /sites/{site-id}/lists with library config]

Result: Document library "Project Files" created successfully.

添加新资源

要用新功能扩展MCP:

  1. 创建新 .md 文件在相应的目录中:

- skills/ 用于核心API模式 - resources/graph/ 用于Graph API端点 - resources/powerplatform/ 适用于Power Platform端点

  1. 遵循现有格式:

- 以“#Title”开头 - 包括“##所需权限”部分 - 用方法、URL和示例正文记录每个端点 - 用标记不完整的部分 一切:

  1. 新文件将自动出现在 list_skills 输出

资源模板

# Resource Name

Brief description of what this resource covers.

## Required Permissions

| Permission | Type | Description |
|------------|------|-------------|
| Permission.Name | Application | What it allows |

## Operation Name

Description of the operation.

\`\`\`
METHOD /endpoint/path
Content-Type: application/json

{
  "property": "value"
}
\`\`\`

安全考虑

  • 从不将凭据提交到版本控制
  • 使用环境变量或安全密钥管理
  • 分配权限时应用最小特权原则
  • 定期轮换客户机密
  • 监控API使用情况以发现异常

许可证

麻省理工学院

目录标签

目录标签

TypeScriptClaudeAPI集成Microsoft365管理本地部署API服务自动化工具企业IT管理

支持客户端

Claude

接入字段

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

未说明

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

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

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

0

权限和风险

未说明none部署方式未说明

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

安装前确认

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

仍需确认:installCommand

来源信息

继续浏览同类 MCP