SharePoint MCP Server
SharePoint MCP 服务器
轻量级 MCP 服务器,可与 Microsoft SharePoint 无缝集成,使 MCP 客户端能够与文档、文件夹和其他 SharePoint 资源进行交互。由sofias tech开发。
特征
该服务器通过模型上下文协议 (MCP) 为 SharePoint 资源提供干净的接口,并针对文档管理进行优化操作。
工具
该服务器实现了以下工具:
List_SharePoint_Folders:列出指定目录或根目录中的所有文件夹List_SharePoint_Documents:获取指定文件夹中的所有文档Get_Document_Content:检索文档内容(文本或 base64 编码的二进制文件)Create_Folder:在指定目录或根目录中创建新文件夹Upload_Document:将新文档上传到指定文件夹Upload_Document:从路径上传大型文档。Update_Document:更新现有文档的内容Delete_Document:从指定文件夹中删除文档Delete_Folder:从 SharePoint 中删除一个空文件夹
Related MCP server: MCP Server
建筑学
该服务器的构建充分考虑了资源效率:
通过选择性属性加载实现高效的 SharePoint API 使用
通过装饰器进行错误处理以获得更清晰的代码
资源管理和工具实施之间的明确分离
优化文本和二进制文件的内容处理
设置
使用适当的 SharePoint 权限在 Azure AD 中注册应用程序
获取已注册应用的客户端 ID 和客户端密钥
确定您的 SharePoint 网站 URL 和要使用的文档库路径
环境变量
服务器需要以下环境变量:
SHP_ID_APP:您的 Azure AD 应用程序客户端 IDSHP_ID_APP_SECRET:您的 Azure AD 应用程序客户端机密SHP_SITE_URL:您的 SharePoint 站点的 URLSHP_DOC_LIBRARY:文档库的路径(默认值:“Shared Documents/mcp_server”)SHP_TENANT_ID:您的 Microsoft 租户 ID
快速入门
安装
pip install -e .或者发布后从 PyPI 安装:
pip install mcp-sharepoint-server使用紫外线:
uv pip install mcp-sharepoint-serverClaude 桌面集成
要与 Claude Desktop 集成,请更新配置文件:
在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json在 macOS 上: ~/Library/Application\ Support/Claude/claude_desktop_config.json
标准集成
"mcpServers": {
"sharepoint": {
"command": "mcp-sharepoint",
"env": {
"SHP_ID_APP": "your-app-id",
"SHP_ID_APP_SECRET": "your-app-secret",
"SHP_SITE_URL": "https://your-tenant.sharepoint.com/sites/your-site",
"SHP_DOC_LIBRARY": "Shared Documents/your-folder",
"SHP_TENANT_ID": "your-tenant-id"
}
}
}使用 uvx
"mcpServers": {
"sharepoint": {
"command": "uvx",
"args": [
"mcp-sharepoint"
],
"env": {
"SHP_ID_APP": "your-app-id",
"SHP_ID_APP_SECRET": "your-app-secret",
"SHP_SITE_URL": "https://your-tenant.sharepoint.com/sites/your-site",
"SHP_DOC_LIBRARY": "Shared Documents/your-folder",
"SHP_TENANT_ID": "your-tenant-id"
}
}
}发展
要求
Python 3.10+
requirements.txt和pyproject.toml中列出的依赖项
本地开发
克隆存储库
创建虚拟环境:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate安装开发依赖项:
pip install -e .使用您的 SharePoint 凭据创建一个
.env文件:SHP_ID_APP=your-app-id SHP_ID_APP_SECRET=your-app-secret SHP_SITE_URL=https://your-tenant.sharepoint.com/sites/your-site SHP_DOC_LIBRARY=Shared Documents/your-folder SHP_TENANT_ID=your-tenant-id运行服务器:
python -m mcp_sharepoint
调试
要调试 MCP 服务器,您可以使用MCP 检查器:
npx @modelcontextprotocol/inspector -- python -m mcp_sharepoint执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
版权所有 (c) 2025 索菲亚斯科技
Available Tools
9 toolsCreate_FolderC
Create a new folder in the specified directory or root if not specified
Inputs: folder_name (required), parent_folder.
Delete_DocumentC
Delete a document from a SharePoint directory
Inputs: file_name (required), folder_name (required).
Delete_FolderC
Delete an empty folder from SharePoint
Inputs: folder_path (required).
Get_Document_ContentC
Get content of a document in SharePoint
Inputs: file_name (required), folder_name (required).
Update_DocumentC
Update an existing document in a SharePoint directory
Inputs: content (required), file_name (required), folder_name (required), is_base64.
Upload_DocumentC
Upload a new file to a SharePoint directory
Inputs: content (required), file_name (required), folder_name (required), is_base64.
Upload_Document_From_PathC
Upload a file directly from a file path to SharePoint
Inputs: file_path (required), folder_name (required), new_file_name.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Most tools have distinct purposes, but 'Upload_Document' and 'Upload_Document_From_Path' could cause confusion as they both handle document uploads with only a slight difference in source specification. The other tools clearly target different operations like creation, deletion, listing, and updating.
All tool names follow a consistent verb_noun pattern with underscores, such as 'Create_Folder', 'Delete_Document', and 'List_SharePoint_Documents'. This uniformity makes the set predictable and easy to navigate for an agent.
With 9 tools, the server is well-scoped for managing SharePoint documents and folders. It covers essential operations without being overly complex, making it appropriate for typical file management tasks in this domain.
The toolset provides strong coverage for document and folder management, including CRUD operations like create, read, update, and delete. A minor gap is the lack of a tool for moving or renaming items, which might require workarounds, but core workflows are well-supported.
Related MCP Connectors
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
MCP server for the PDFGate API. Generate PDFs, manage documents and handle e-signatures.
MCP server for innovationlab documentation, generated by doc2mcp.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP Server simplifies the implementation of the Model Context Protocol by providing a user-friendly API to create custom tools and manage server workflows efficiently.39 npm4MIT
- AlicenseNot gradedqualityCmaintenanceMCP Server provides a simpler API to interact with the Model Context Protocol by allowing users to define custom tools and services to streamline workflows and processes.26 npm3MIT

Folderrofficial
AlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server that provides tools to interact with Folderr's API, specifically for managing and communicating with Folderr Assistants.717 npm3MIT- FlicenseBqualityDmaintenanceA specialized server that helps users create new Model Context Protocol (MCP) servers by providing tools and templates for scaffolding projects with various capabilities.84-