Ms Sharepoint MCP
概览
作者提供的说明(英文原文)
Microsoft SharePoint MCP server — access sites, lists, and documents through Microsoft Graph.
PopNx MCP 的三大支柱
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
- 用户评价i暂无评价评价功能将在后续阶段与账户功能一起开放
- 我们的基础检查i1 项中通过 1 项依据公开信息检查;尚未扫描代码
- 使用情况i非常新↓ 63/周 · ★ –
它能帮你做什么
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
- 连接方式: 在你的电脑上运行
- 传输方式: stdio
- 分类: 文档、表格与办公
安装
选择你使用的 AI 应用,然后复制设置。
安装之前
- 基础检查:1 项中通过 1 项
- 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
- 需要你自己填写:
MICROSOFT_CLIENT_ID
你需要
- npm已安装 Node.js(用于 npx 命令)
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"ms-sharepoint": {
"command": "npx",
"args": [
"-y",
"ms-sharepoint-mcp"
],
"env": {
"MICROSOFT_CLIENT_ID": "your-value"
}
}
}
}在终端中运行这条命令
claude mcp add ms-sharepoint --env MICROSOFT_CLIENT_ID=your-value -- npx -y ms-sharepoint-mcp运行前请先填写空着的值。
或者自己复制设置
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"ms-sharepoint": {
"command": "npx",
"args": [
"-y",
"ms-sharepoint-mcp"
],
"env": {
"MICROSOFT_CLIENT_ID": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
或者自己复制设置
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"ms-sharepoint": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"ms-sharepoint-mcp"
],
"env": {
"MICROSOFT_CLIENT_ID": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
需要你填写的值
MICROSOFT_CLIENT_IDenvEntra ID application (client) ID for the public client app used to sign in. Run `npx -y ms-sharepoint-mcp login` once to cache a refresh token.
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它能做什么
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
基础检查i
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日
- ✓ 通过
作者与仓库一致
注册名称已通过 GitHub 账户 0xka13b 验证,该账户拥有此仓库
- … 尚未检查
仍在维护
我们还没有从 GitHub 读取这个仓库
- … 尚未检查
有许可证
我们还没有从 GitHub 读取这个仓库
- – 不适用
端点有响应
它在你的电脑上运行,没有互联网端点
- – 不适用
使用 OAuth 登录
在你的电脑上运行,改用本地设置
- … 尚未检查
工具描述中没有隐藏指令
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与“文档、表格与办公”中的其他服务器比较i
- 星标数多于此分类中其他 3589 个服务器的 0%
- 发布到注册中心的时间比此分类中其他 3589 个服务器的 12% 更新
- 基础检查结果等于或优于此分类中其他 3589 个服务器的 100%
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
常见问题
Ms Sharepoint MCP 安全吗?
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
它需要哪些密钥或代码?
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在我的电脑上运行还是在云端?
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
它还在维护吗?
GitHub 仓库最后更新于–,最新版本(1.0.1)于5个月前进入注册中心。
哪些应用可以使用它?
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。
有什么可以替代它?
同一分类中有:Agent-Native Calendar, Excel MCP Server, MCP Server for Excel
替代选择
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Excel MCP Server
Create and edit Excel files with AI: charts, PivotTables, formulas. No Excel needed.
MCP Server for Excel
Excel automation for AI - Sheets, Power Query, DAX, VBA, Tables, Ranges and more. Windows only.
作者的 README
打开 README
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
Microsoft MCP
Model Context Protocol servers for Microsoft 365.
Calendar · Contacts · OneDrive · Outlook · SharePoint — on the official @modelcontextprotocol/sdk , over stdio or Streamable HTTP.
Each server speaks the real MCP protocol and runs over either transport:
- stdio — for local MCP clients that launch the server as a subprocess (Claude Desktop, IDEs, the MCP Inspector).
- Streamable HTTP — for remote/hosted use, with the Microsoft Graph access token supplied per request via
Authorization: Bearer.
Servers
| | Server | npm package (and binary) | Tools | | :-: | ----------- | ------------------------- | ----: | | | Calendar | ms-calendar-mcp | 9 | | | Contacts | ms-contacts-mcp | 7 | | | OneDrive | ms-onedrive-mcp | 9 | | | Outlook | microsoft-outlook-mcp | 14 | | | SharePoint | ms-sharepoint-mcp | 23 |
All tools are thin wrappers over the Microsoft Graph v1.0 API.
Layout
microsoft-mcp/
├── apps/ # one MCP server per Microsoft 365 product │ ├── calendar/ │ ├── contacts/ │ ├── onedrive/ │ ├── outlook/ │ └── sharepoint/ │ └── src/ │ ├── tools.ts # declarative tool definitions (schema + handler) │ └── index.ts # run({ name, version }, tools) └── packages/ # shared building blocks ├── core/ # MCP server bootstrap + dual transport (stdio / HTTP) ├── graph/ # Microsoft Graph HTTP client ├── validation/ # id / path / query sanitizers └── logger/ # structured JSON logging (stderr-only — stdio-safe)
A server is just a list of tools handed to run():
// apps/calendar/src/index.ts
import { run } from "@microsoft-mcp/core"; import { tools } from "./tools.js";
void run({ name: "microsoft-calendar", version: "1.0.0", title: "Microsoft Calendar" }, tools);
// a single tool
defineTool({ name: "get_event", description: "Get a single calendar event by ID.", inputSchema: { event_id: z.string().describe("Event ID") }, confirmationPolicy: "never", handler: ({ graph }, { event_id }) => { validateId(event_id, "event_id"); return graph.request("GET", /me/events/${event_id}); }, });
confirmationPolicy ("always" for mutating/destructive tools, "never" for read-only) is surfaced to clients as MCP readOnlyHint / destructiveHint annotations.
Requirements
- Node.js >= 20
- pnpm 10 (
corepack enable)
Setup
pnpm install
pnpm build # build all servers (turbo) -> apps/*/dist/index.js pnpm check-types # typecheck everything
Tests & CI
pnpm test # run the vitest suite once
pnpm test:watch # watch mode pnpm test:coverage # run with a v8 coverage report (-> coverage/)
Tests live next to the code as *.test.ts and run on TypeScript source directly (no build step). The shared packages/* are covered by unit and integration tests — including a full Streamable-HTTP round-trip against a live server — and CI enforces a coverage floor on them. Each apps/* server ships an invariant suite that locks its tool surface (unique snake_case names, valid schemas and confirmation policies).
Every push and pull request to master runs CI: typecheck → build → tests with coverage. The coverage badge is regenerated from the run.
Authentication
You sign in once with your Microsoft account; the server then caches a refresh token and acquires access tokens silently from then on — no pasting, no 1-hour expiry. Sign-in uses your own Microsoft Entra ID app registration (free) so the servers act on your behalf.
1. Register an Entra ID app (one time)
- Azure Portal → Microsoft Entra ID → App registrations → New registration. Name it anything; pick the Supported account types that fit (single-tenant, multi-tenant, and/or personal accounts).
- Authentication → Add a platform → Mobile and desktop applications → add redirect URI `http://localhost`, and set Allow public client flows to Yes (enables the
--device-codefallback). - API permissions → Add a permission → Microsoft Graph → Delegated permissions → add the scopes for the servers you use (then Grant admin consent if your tenant requires it):
| Server | Delegated scopes |
|---|---|
| Calendar | Calendars.ReadWrite |
| Contacts | Contacts.ReadWrite |
| OneDrive | Files.ReadWrite.All |
| Outlook | Mail.ReadWrite, Mail.Send |
| SharePoint | Sites.ReadWrite.All |
All servers also use User.Read. (offline_access is requested automatically for refresh.)
- Copy the Application (client) ID.
2. Sign in (one time per machine)
Set MICROSOFT_CLIENT_ID, then run the server's `login` command. A browser opens; after you consent, the token is cached under ~/.config/microsoft-mcp/:
export MICROSOFT_CLIENT_ID=<your-client-id>
npx -y ms-calendar-mcp login # opens the browser npx -y ms-calendar-mcp login --device-code # headless: shows a code to enter
From then on the server refreshes tokens automatically. Use a non-default tenant with MICROSOFT_TENANT_ID (default common).
Advanced: supply your own token
To bypass the built-in flow, supply a pre-acquired Graph token directly:
- stdio: set
MICROSOFT_ACCESS_TOKEN(takes precedence over the cached sign-in). Good for quick tests — mint one withaz account get-access-token --resource https://graph.microsoft.com --query accessToken -o tsv. - HTTP: send
Authorization: Beareron eachPOST /mcprequest. Each request is stateless with its own token, so callers never share credentials — this is the model for hosted/remote deployments, which handle their own auth.
Running
stdio (e.g. Claude Desktop)
Each server is published to npm and runnable with npx — no clone or build. Sign in once first (npx -y ms-calendar-mcp login, see Authentication), then:
// claude_desktop_config.json
{ "mcpServers": { "microsoft-calendar": { "command": "npx", "args": ["-y", "ms-calendar-mcp"], "env": { "MICROSOFT_CLIENT_ID": " " } } } }
Or point at a local build instead of npm:
{
"command": "node", "args": ["/abs/path/microsoft-mcp/apps/calendar/dist/index.js"], "env": { "MICROSOFT_CLIENT_ID": " " } }
During development you can skip the build and run the TypeScript directly:
MICROSOFT_ACCESS_TOKEN=<token> pnpm --filter ms-calendar-mcp dev
Streamable HTTP
# build first, then:
PORT=3000 node apps/calendar/dist/index.js --http
or, in dev:
pnpm --filter ms-calendar-mcp dev -- --http --port 3000
The server exposes POST /mcp (the MCP endpoint) and GET /healthz. Point any Streamable-HTTP MCP client at http://localhost:3000/mcp with an Authorization: Bearer header.
Transport selection
Resolved in this order: --stdio / --http flag → MCP_TRANSPORT=stdio|http → default stdio. HTTP port: --port → PORT → 3000.
Environment variables
| Variable | Used by | Description |
|---|---|---|
MICROSOFT_CLIENT_ID | stdio | Entra ID app (client) ID for sign-in. Required for the login flow. |
MICROSOFT_TENANT_ID | stdio | Tenant for sign-in: common (default), organizations, consumers, or a tenant ID. |
MICROSOFT_ACCESS_TOKEN | stdio | Pre-acquired Graph token; overrides the cached sign-in when set. |
MICROSOFT_MCP_CACHE_DIR | stdio | Override the token-cache directory (default ~/.config/microsoft-mcp). |
MCP_TRANSPORT | both | stdio (default) or http. |
PORT | http | Listen port (default 3000). |
MCP_HTTP_BODY_LIMIT | http | Max request body size (default 50mb) for base64 uploads. |
MCP_DEBUG | both | Any non-empty value enables debug logs (to stderr). |