SharePoint文件管理服务

一个通过Microsoft Graph API提供SharePoint文件管理功能的MCP服务器,支持文件夹和文档的创建、读取、更新、删除等操作,适用于LLM代理。

  • by memori-ai
  • JavaScript
  • 本地部署
  • 5 星标
  • 更新于
在 GitHub 查看 memori-ai/mcp-sharepoint

使用说明

mcp共享点

A. 模型上下文协议(MCP)服务器 暴露核心 Microsoft SharePoint/Microsoft Graph API LLM代理(例如Claude Desktop)可用的工具功能。

此服务器设计有 代理优先法:

  • 无法直接访问本地文件系统
  • 确定性输入和输出

✨ 特性

服务器允许代理执行以下操作:

📁 文件夹管理

路径可以/必须作为参数传递
对于Windows用户,请始终使用正斜杠 /

  • 列出文件夹
  • 创建新文件夹
  • 删除文件夹(仅当为空时)
  • 检索文件夹树结构

📄 文档管理

路径可以/必须作为参数传递
对于Windows用户,请始终使用正斜杠 /

  • 列出文件
  • 阅读文档内容(PDF、Word、Excel、PowerPoint)
  • 上传新文档(文本或二进制)
  • 更新现有文档(替换全部内容)
  • 删除文档

🔐 先决条件

  • Node.js
  • Microsoft 365租户
  • 在中注册的应用程序 微软Entra ID 具有图形权限和/或具有配置权限的活动用户

应用程序的推荐图形权限

Sites.Read.All
Sites.ReadWrite.All
Files.Read.All
Files.ReadWrite.All

⚠️ 两者 应用程序权限 和 委托权限 支持


  • 代理人必须发送 身份验证模式 变量,用于告诉mcp服务器使用Applicazion权限或委派权限
  • 所有操作均通过以下方式执行 微软图形

🧭 注册应用程序的分步指南

如果您已经注册了应用程序,则可以跳过此部分

  1. 转到您的Microsoft Entra网站 https://entra.microsoft.com/...
  2. 点击左侧菜单上的“应用程序注册”
  3. 点击“新注册”
  4. 插入您喜欢的名称,然后单击“注册”

🧭 授权分步指南

如果您已经设置了授权,则可以跳过此部分

  1. 转到您的Microsoft Entra网站 https://entra.microsoft.com/...
  2. 在左侧菜单上单击“应用程序注册”
  3. 在表格中点击您注册的应用程序
  4. 在左侧第二个菜单上单击“API授权”
  5. 点击“添加授权”
  6. 点击“Microsoft Graph”
  7. 点击“申请授权”或“委托授权”
  8. 如果这是您第一次,或者您不熟悉授权,请在搜索栏中键入“网站”
  9. 选择“Sites.FullControl.All”,然后选择“添加授权”

⚠️此授权赋予应用程序完全控制权,建议使用所需的最小权限授权

  1. 点击“同意管理员访问 名字“,然后单击“是”

🧭 获取sharepoint参数的分步指南

如果您已经知道client_id、client_secret、tenant_id、site_id、drive_id、list_id,则可以跳过此部分

client_id、client_secret、tenant_id仅适用于应用程序权限

  1. 在微软Entra网站上 https://entra.microsoft.com/,在左侧菜单上单击“应用程序注册”
  2. 在表格中点击您注册的应用程序
  3. 在顶部信息中,您可以看到 客户端ID 和 租户ID 作为ID应用程序(客户端)和ID目录(租户)
  4. 点击“客户端凭据:0个证书,0个机密”
  5. 点击“新客户机密”
  6. 插入所需的描述和过期时间,然后单击“添加”
  7. 在表中将有新的客户端机密,复制“值”字段。

⚠️您只能复制一次,之后将无法再次看到“值”

  1. 复制的“值”是 客户端密钥
  2. 发出此请求以获取连续请求所需的access_token:
curl --request POST \
  --url "https://login.microsoftonline.com/<TENANT_ID>/oauth2/v2.0/token" \
  --header "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "client_id=<CLIENT_ID>" \
  --data-urlencode "client_secret=<CLIENT_SECRET>" \
  --data-urlencode "scope=https://graph.microsoft.com/.default" \
  --data-urlencode "grant_type=client_credentials"

响应是一个json,你只需要属性“access_token”
10.提出此请求以获取 站点ID,域名和网站名称可以在Sharepoint网站的URL上看到: https://<DOMAIN_NAME>.sharepoint.com/sites/<SITE_NAME>/...

curl -X GET "https://graph.microsoft.com/v1.0/sites/<DOMAIN_NAME>.sharepoint.com:/sites/<SITE_NAME>?select=id" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Accept: application/json"

响应是json,你只需要属性“id”
11.提出此请求以获取 驱动器 ID

curl -X GET "https://graph.microsoft.com/v1.0/sites/<SITE_ID>/drives?select=id,name" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Accept: application/json"

响应是一个json,属性“value”是json的数组,每个json是一个不同的驱动器,你只需要属性“id”
12.提出此请求以获取 列表id

curl -s -X GET "https://graph.microsoft.com/v1.0/sites/<SITE_ID>/lists?select=id,displayName" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Accept: application/json"

响应是一个json,属性“value”是json的数组,每个json都是一个不同的列表,你只需要属性“id”

🧭 向Sharepoint添加自定义属性/列的分步指南

这是可选的,您可以在默认属性/列中搜索

  1. 转到您的Sharepoint网站 https://<DOMAIN_NAME>.sharepoint.com/sites/<SITE_NAME>/...
  2. 在左侧菜单上,单击“文档”
  3. 在右侧的列之后,单击“+添加列”
  4. 为新列选择所需的类型,安全的选择是“多行文本”
  5. 输入新列的名称,其他字段是可选的,不是必需的
  6. 点击“保存”

⚙️ 配置

授权是通过以下方式获得的 应用程序变量 申请许可,或 访问令牌 对于委托权限。
应用程序权限 参照Microsoft Entra ID上设置的权限,以相同的方式处理每个请求。
委托权限 指与请求代理发出请求的用户相关的权限,用登录标识。
这些变量必须在每个请求中提供。

身份验证模式变量(可选,向后兼容)

变量 描述
authMode “申请”或“委托”。 可选:默认为“应用程序” 如果省略,则现有安装将保持不变。

如果authMode=应用程序,则需要应用程序变量

变量 描述
tenantId Microsoft Entra目录租户ID
clientId Microsoft Entra应用程序客户端ID
clientSecret Microsoft Entra客户端机密

如果authMode=委派,则需要委派变量

变量 描述
accessToken 登录后的用户令牌

需要其他常见变量。 这取决于您使用的Sharepoint。

变量 描述
siteId Sharepoint完整站点ID
driveId Sharepoint驱动器ID
listId Sharepoint列表ID

🧰 可用的MCP工具

📁 文件夹

getFolders

列出给定路径中的文件夹。

输入:

{
  "name": "authMode",
  "type": "string",
  "required": "true",
  "description": "auth mode to use",
  "example": "application" || "delegated"
},
{
  "name": "accessToken",
  "type": "string",
  "required": "false (true if authMode=delegated)",
  "description": "access token of user login",
  "example": "eyJ0eXAiOiJKV1Q..."
},
{
  "name": "clientId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The application (client) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "clientSecret",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The client secret",
  "example": "1~A1B~aB12Cd34E5f6aB12cd34E5f6ab~d37cD37"
},
{
  "name": "tenantId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The directory (tenant) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "siteId",
  "type": "string",
  "required": "true",
  "description": "The ID of the SharePoint site",
  "example": "namexyz.sharepoint.com,ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6,fb12cd34-e5f6-g7h8-i9j9-ab12cd34e5f9"
},
{
  "name": "driveId",
  "type": "string",
  "required": "true",
  "description":" The ID of the drive within the SharePoint site",
  "example": "f!aB12Cd34E5f6aB12cd34E5f6abd37cD37aB12Cd34E5f6aB12cd34E5f6abd3712"
},
{
  "name": "path",
  "type": "string",
  "required": "true",
  "description": "The path in SharePoint to retrieve folders from",
  "example": "cartella_1/cartella_2"
}

createFolder

创建一个新文件夹。

输入:

{
  "name": "authMode",
  "type": "string",
  "required": "true",
  "description": "auth mode to use",
  "example": "application" || "delegated"
},
{
  "name": "accessToken",
  "type": "string",
  "required": "false (true if authMode=delegated)",
  "description": "access token of user login",
  "example": "eyJ0eXAiOiJKV1Q..."
},
{
  "name": "clientId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The application (client) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "clientSecret",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The client secret",
  "example": "1~A1B~aB12Cd34E5f6aB12cd34E5f6ab~d37cD37"
},
{
  "name": "tenantId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The directory (tenant) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "siteId",
  "type": "string",
  "required": "true",
  "description": "The ID of the SharePoint site",
  "example": "namexyz.sharepoint.com,ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6,fb12cd34-e5f6-g7h8-i9j9-ab12cd34e5f9"
},
{
  "name": "driveId",
  "type": "string",
  "required": "true",
  "description":" The ID of the drive within the SharePoint site",
  "example": "f!aB12Cd34E5f6aB12cd34E5f6abd37cD37aB12Cd34E5f6aB12cd34E5f6abd3712"
},
{
  "name": "path",
  "type": "string",
  "required": "true",
  "description": "The parent path where the folder will be created",
  "example": "cartella_1/cartella_2"
},
{
  "name": "folderName",
  "type": "string",
  "required": "true",
  "description": "The name of the new folder to create",
  "example": "cartella_3"
}

deleteFolder

删除文件夹 只有当它是空的.

输入:

{
  "name": "authMode",
  "type": "string",
  "required": "true",
  "description": "auth mode to use",
  "example": "application" || "delegated"
},
{
  "name": "accessToken",
  "type": "string",
  "required": "false (true if authMode=delegated)",
  "description": "access token of user login",
  "example": "eyJ0eXAiOiJKV1Q..."
},
{
  "name": "clientId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The application (client) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "clientSecret",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The client secret",
  "example": "1~A1B~aB12Cd34E5f6aB12cd34E5f6ab~d37cD37"
},
{
  "name": "tenantId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The directory (tenant) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "siteId",
  "type": "string",
  "required": "true",
  "description": "The ID of the SharePoint site",
  "example": "namexyz.sharepoint.com,ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6,fb12cd34-e5f6-g7h8-i9j9-ab12cd34e5f9"
},
{
  "name": "driveId",
  "type": "string",
  "required": "true",
  "description":" The ID of the drive within the SharePoint site",
  "example": "f!aB12Cd34E5f6aB12cd34E5f6abd37cD37aB12Cd34E5f6aB12cd34E5f6abd3712"
},
{
  "name": "path",
  "type": "string",
  "required": "true",
  "description": "The path to the folder to delete",
  "example": "cartella_1/cartella_2/cartella_3"
}

getFolderTree

检索文件夹树结构。

输入:

{
  "name": "authMode",
  "type": "string",
  "required": "true",
  "description": "auth mode to use",
  "example": "application" || "delegated"
},
{
  "name": "accessToken",
  "type": "string",
  "required": "false (true if authMode=delegated)",
  "description": "access token of user login",
  "example": "eyJ0eXAiOiJKV1Q..."
},
{
  "name": "clientId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The application (client) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "clientSecret",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The client secret",
  "example": "1~A1B~aB12Cd34E5f6aB12cd34E5f6ab~d37cD37"
},
{
  "name": "tenantId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The directory (tenant) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "siteId",
  "type": "string",
  "required": "true",
  "description": "The ID of the SharePoint site",
  "example": "namexyz.sharepoint.com,ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6,fb12cd34-e5f6-g7h8-i9j9-ab12cd34e5f9"
},
{
  "name": "driveId",
  "type": "string",
  "required": "true",
  "description":" The ID of the drive within the SharePoint site",
  "example": "f!aB12Cd34E5f6aB12cd34E5f6abd37cD37aB12Cd34E5f6aB12cd34E5f6abd3712"
},
{
  "name": "path",
  "type": "string",
  "required": "false",
  "description": "The starting path (default: 'root')",
  "example": "cartella_1/cartella_2"
},
{
  "name": "maxDepth",
  "type": "number",
  "required": "false",
  "description": "Maximum depth to traverse (default: 3)",
  "example": 5
}

📄 文件

getDocuments

列出文件夹中的文档。

输入:

{
  "name": "authMode",
  "type": "string",
  "required": "true",
  "description": "auth mode to use",
  "example": "application" || "delegated"
},
{
  "name": "accessToken",
  "type": "string",
  "required": "false (true if authMode=delegated)",
  "description": "access token of user login",
  "example": "eyJ0eXAiOiJKV1Q..."
},
{
  "name": "clientId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The application (client) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "clientSecret",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The client secret",
  "example": "1~A1B~aB12Cd34E5f6aB12cd34E5f6ab~d37cD37"
},
{
  "name": "tenantId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The directory (tenant) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "siteId",
  "type": "string",
  "required": "true",
  "description": "The ID of the SharePoint site",
  "example": "namexyz.sharepoint.com,ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6,fb12cd34-e5f6-g7h8-i9j9-ab12cd34e5f9"
},
{
  "name": "driveId",
  "type": "string",
  "required": "true",
  "description":" The ID of the drive within the SharePoint site",
  "example": "f!aB12Cd34E5f6aB12cd34E5f6abd37cD37aB12Cd34E5f6aB12cd34E5f6abd3712"
},
{
  "name": "path",
  "type": "string",
  "required": "true",
  "description": "The path in SharePoint to retrieve documents from",
  "example": "cartella_1/cartella_2"
}

getDocumentContent

检索和提取文档的文本内容。

支持的格式:

  • 原生PDF
  • Word/Excel/PowerPoint(通过图形转换为PDF)

输入:

{
  "name": "authMode",
  "type": "string",
  "required": "true",
  "description": "auth mode to use",
  "example": "application" || "delegated"
},
{
  "name": "accessToken",
  "type": "string",
  "required": "false (true if authMode=delegated)",
  "description": "access token of user login",
  "example": "eyJ0eXAiOiJKV1Q..."
},
{
  "name": "clientId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The application (client) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "clientSecret",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The client secret",
  "example": "1~A1B~aB12Cd34E5f6aB12cd34E5f6ab~d37cD37"
},
{
  "name": "tenantId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The directory (tenant) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "siteId",
  "type": "string",
  "required": "true",
  "description": "The ID of the SharePoint site",
  "example": "namexyz.sharepoint.com,ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6,fb12cd34-e5f6-g7h8-i9j9-ab12cd34e5f9"
},
{
  "name": "driveId",
  "type": "string",
  "required": "true",
  "description":" The ID of the drive within the SharePoint site",
  "example": "f!aB12Cd34E5f6aB12cd34E5f6abd37cD37aB12Cd34E5f6aB12cd34E5f6abd3712"
},
{
  "name": "filePath",
  "type": "string",
  "required": "true",
  "description": "The path to the file",
  "example": "cartella_1/cartella_2/file.txt"
}

uploadDocument

上传新文档。

输入:

{
  "name": "authMode",
  "type": "string",
  "required": "true",
  "description": "auth mode to use",
  "example": "application" || "delegated"
},
{
  "name": "accessToken",
  "type": "string",
  "required": "false (true if authMode=delegated)",
  "description": "access token of user login",
  "example": "eyJ0eXAiOiJKV1Q..."
},
{
  "name": "clientId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The application (client) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "clientSecret",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The client secret",
  "example": "1~A1B~aB12Cd34E5f6aB12cd34E5f6ab~d37cD37"
},
{
  "name": "tenantId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The directory (tenant) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "siteId",
  "type": "string",
  "required": "true",
  "description": "The ID of the SharePoint site",
  "example": "namexyz.sharepoint.com,ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6,fb12cd34-e5f6-g7h8-i9j9-ab12cd34e5f9"
},
{
  "name": "driveId",
  "type": "string",
  "required": "true",
  "description":" The ID of the drive within the SharePoint site",
  "example": "f!aB12Cd34E5f6aB12cd34E5f6abd37cD37aB12Cd34E5f6aB12cd34E5f6abd3712"
},
{
  "name": "filePath",
  "type": "string",
  "required": "true",
  "description": "The path where the file will be uploaded",
  "example": "cartella_1/cartella_2"
},
{
  "name": "content",
  "type": "string",
  "required": "true",
  "description": "The string or base64-encoded content of the file to upload",
  "example": "Questo è il testo del doc .txt"
},
{
  "name": "contentType",
  "type": "string",
  "required": "false",
  "description": "The MIME type of the content (default: 'application/octet-stream')",
  "example": "application/octet-stream"
},
{
  "name": "overwrite",
  "type": "boolean",
  "required": "false",
  "description": "Whether to overwrite existing files (default: false)",
  "example": true
}

updateDocumentContent

完全更新现有文档。

⚠️ 该操作将替换文件的全部内容。
⚠️ 如果文件不存在,则操作失败。

输入:

{
  "name": "authMode",
  "type": "string",
  "required": "true",
  "description": "auth mode to use",
  "example": "application" || "delegated"
},
{
  "name": "accessToken",
  "type": "string",
  "required": "false (true if authMode=delegated)",
  "description": "access token of user login",
  "example": "eyJ0eXAiOiJKV1Q..."
},
{
  "name": "clientId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The application (client) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "clientSecret",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The client secret",
  "example": "1~A1B~aB12Cd34E5f6aB12cd34E5f6ab~d37cD37"
},
{
  "name": "tenantId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The directory (tenant) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "siteId",
  "type": "string",
  "required": "true",
  "description": "The ID of the SharePoint site",
  "example": "namexyz.sharepoint.com,ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6,fb12cd34-e5f6-g7h8-i9j9-ab12cd34e5f9"
},
{
  "name": "driveId",
  "type": "string",
  "required": "true",
  "description":" The ID of the drive within the SharePoint site",
  "example": "f!aB12Cd34E5f6aB12cd34E5f6abd37cD37aB12Cd34E5f6aB12cd34E5f6abd3712"
},
{
  "name": "filePath",
  "type": "string",
  "required": "true",
  "description": "The path to the existing file to update",
  "example": "cartella_1/cartella_2"
},
{
  "name": "content",
  "type": "string",
  "required": "true",
  "description": "The new string or base64-encoded content of the file",
  "example": "Questo è il nuovo testo del doc .txt"
},
{
  "name": "contentType",
  "type": "string",
  "required": "false",
  "description": "The MIME type of the content (default: 'application/octet-stream')",
  "example": "application/pdf"
}

deleteDocument

删除文档(移动到SharePoint回收站)。

输入:

{
  "name": "authMode",
  "type": "string",
  "required": "true",
  "description": "auth mode to use",
  "example": "application" || "delegated"
},
{
  "name": "accessToken",
  "type": "string",
  "required": "false (true if authMode=delegated)",
  "description": "access token of user login",
  "example": "eyJ0eXAiOiJKV1Q..."
},
{
  "name": "clientId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The application (client) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "clientSecret",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The client secret",
  "example": "1~A1B~aB12Cd34E5f6aB12cd34E5f6ab~d37cD37"
},
{
  "name": "tenantId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The directory (tenant) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "siteId",
  "type": "string",
  "required": "true",
  "description": "The ID of the SharePoint site",
  "example": "namexyz.sharepoint.com,ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6,fb12cd34-e5f6-g7h8-i9j9-ab12cd34e5f9"
},
{
  "name": "driveId",
  "type": "string",
  "required": "true",
  "description":" The ID of the drive within the SharePoint site",
  "example": "f!aB12Cd34E5f6aB12cd34E5f6abd37cD37aB12Cd34E5f6aB12cd34E5f6abd3712"
},
{
  "name": "filePath",
  "type": "string",
  "required": "true",
  "description": "The path to the file to delete",
  "example": "cartella_1/cartella_2/file.docx"
},

searchDocumentsByKeywords

搜索包含给定属性中至少一个关键字的文档。

输入:

{
  "name": "authMode",
  "type": "string",
  "required": "true",
  "description": "auth mode to use",
  "example": "application" || "delegated"
},
{
  "name": "accessToken",
  "type": "string",
  "required": "false (true if authMode=delegated)",
  "description": "access token of user login",
  "example": "eyJ0eXAiOiJKV1Q..."
},
{
  "name": "clientId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The application (client) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "clientSecret",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The client secret",
  "example": "1~A1B~aB12Cd34E5f6aB12cd34E5f6ab~d37cD37"
},
{
  "name": "tenantId",
  "type": "string",
  "required": "false (true if authMode=application)",
  "description": "The directory (tenant) ID",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "siteId",
  "type": "string",
  "required": "true",
  "description": "The ID of the SharePoint site",
  "example": "namexyz.sharepoint.com,ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6,fb12cd34-e5f6-g7h8-i9j9-ab12cd34e5f9"
},
{
  "name": "listId",
  "type": "string",
  "required": "true",
  "description": "The ID of the SharePoint list to search in",
  "example": "ab12cd34-e5f6-g7h8-i9j9-ab12cd34e5f6"
},
{
  "name": "keywords",
  "type": "Array<string>",
  "required": "true",
  "description": "Array of keywords to search for",
  "example": ["word_1", "word_2", "word_3"]
},
{
  "name": "attributeName",
  "type": "string",
  "required": "true",
  "description": "The document attribute/column to search in",
  "example": "name"
},

🚀 试试Aisuru!

此MCP服务器很容易集成到 艾苏鲁,我们的AI代理平台,您可以在其中创建、测试和部署智能代理,并访问像mcp sharepoint服务器这样的强大工具。

访问 Aisuru.com 今天就开始与您的代理商合作!


⚠️ 已知限制

  • 不支持部分文档更新
  • 大文件(>4MB)需要上传会话(尚未实现)
  • 从复杂的PDF/Excel文件中提取文本可能会失去结构

🔒 安全

  • 永远不要暴露 client secret, access token,以及其他公开的敏感变量
  • 定期轮换机密
  • 授予所需的最低图形权限