SharePoint MCP Server — Claude Code MCP server: install
This MCP server lets an AI agent work with SharePoint files, folders, and metadata. Use it when project tasks depend on documents stored in a SharePoint library.
claude mcp add --env SHP_ID_APP=<SHP_ID_APP> --env SHP_ID_APP_SECRET=<SHP_ID_APP_SECRET> --env SHP_TENANT_ID=<SHP_TENANT_ID> --env SHP_SITE_URL=<SHP_SITE_URL> --env SHP_DOC_LIBRARY=<SHP_DOC_LIBRARY> --transport stdio sharepoint-mcp-server -- uvx sharepoint-mcpWhat SharePoint MCP Server does
SharePoint MCP Server connects an MCP-compatible agent to Microsoft SharePoint. It can browse folders, return a recursive tree, upload, download, update, and delete documents, run KQL searches, and read or change list-item fields.
The server parses PDF, Word, Excel, and common text formats. Images, ZIP archives, and other binary files are returned with their type and Base64 data. You can limit access to a subfolder with SHP_DOC_LIBRARY. It supports the Office365 REST API and Microsoft Graph API, with stdio and http transport options. Azure AD credentials and a SharePoint site URL are required; without SHP_ID_APP, SHP_ID_APP_SECRET, SHP_TENANT_ID, and SHP_SITE_URL, the server cannot connect.
What it helps with
- read a PDF, Word, or Excel file from SharePoint
- search a library with SharePoint KQL
- list or create a SharePoint folder
- send an edited document back to the library
- change list-item metadata fields
Example prompts for the agent
- Summarize
Q3_Report.pdffrom theFinancefolder. - List the files under
Legal/Contractsand search the library with a SharePoint KQL query. - Translate the proposal into French and save the revised document to SharePoint.
How to install SharePoint MCP Server
Platform CLI
claude mcp add --env SHP_ID_APP=<SHP_ID_APP> --env SHP_ID_APP_SECRET=<SHP_ID_APP_SECRET> --env SHP_TENANT_ID=<SHP_TENANT_ID> --env SHP_SITE_URL=<SHP_SITE_URL> --env SHP_DOC_LIBRARY=<SHP_DOC_LIBRARY> --transport stdio sharepoint-mcp-server -- uvx sharepoint-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sharepoint-mcp <command>
Platform CLI
codex mcp add sharepoint-mcp-server --env SHP_ID_APP=<SHP_ID_APP> --env SHP_ID_APP_SECRET=<SHP_ID_APP_SECRET> --env SHP_TENANT_ID=<SHP_TENANT_ID> --env SHP_SITE_URL=<SHP_SITE_URL> --env SHP_DOC_LIBRARY=<SHP_DOC_LIBRARY> -- uvx sharepoint-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sharepoint-mcp <command>
Config file
{
"mcpServers": {
"sharepoint-mcp-server": {
"command": "uvx",
"args": [
"sharepoint-mcp"
],
"env": {
"SHP_ID_APP": "<SHP_ID_APP>",
"SHP_ID_APP_SECRET": "<SHP_ID_APP_SECRET>",
"SHP_TENANT_ID": "<SHP_TENANT_ID>",
"SHP_SITE_URL": "<SHP_SITE_URL>",
"SHP_DOC_LIBRARY": "<SHP_DOC_LIBRARY>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sharepoint-mcp <command>
Config file
{
"servers": {
"sharepoint-mcp-server": {
"type": "stdio",
"command": "uvx",
"args": [
"sharepoint-mcp"
],
"env": {
"SHP_ID_APP": "<SHP_ID_APP>",
"SHP_ID_APP_SECRET": "<SHP_ID_APP_SECRET>",
"SHP_TENANT_ID": "<SHP_TENANT_ID>",
"SHP_SITE_URL": "<SHP_SITE_URL>",
"SHP_DOC_LIBRARY": "<SHP_DOC_LIBRARY>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sharepoint-mcp <command>
Platform CLI
gemini mcp add -e SHP_ID_APP=<SHP_ID_APP> -e SHP_ID_APP_SECRET=<SHP_ID_APP_SECRET> -e SHP_TENANT_ID=<SHP_TENANT_ID> -e SHP_SITE_URL=<SHP_SITE_URL> -e SHP_DOC_LIBRARY=<SHP_DOC_LIBRARY> sharepoint-mcp-server uvx sharepoint-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from sharepoint-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about SharePoint MCP Server
How do I install SharePoint MCP Server in Claude Code?
Run `claude mcp add sharepoint-mcp -e SHP_ID_APP=<SHP_ID_APP> -e SHP_ID_APP_SECRET=<SHP_ID_APP_SECRET> -e SHP_TENANT_ID=<SHP_TENANT_ID> -e SHP_SITE_URL=<SHP_SITE_URL> -- uvx sharepoint-mcp`.
What does SharePoint MCP Server do?
It gives an MCP-compatible agent access to Microsoft SharePoint. The agent can inspect folders, find and read files, change documents, and work with metadata.
Which file formats can it parse?
It extracts content from PDF, Word, Excel, text, JSON, Markdown, HTML, YAML, and Python files. Images, ZIP archives, and binary files are returned with file type information and Base64 data.