# SharePoint MCP Server

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 12
- Author: ravikant1918
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ravikant1918/sharepoint-mcp
- Updated: 2026-03-15
- HTML: https://affpapa.org/en/nevibecode/mcp/sharepoint-mcp-server

## What it 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.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `SHP_ID_APP`, `SHP_ID_APP_SECRET`, `SHP_TENANT_ID`, `SHP_SITE_URL`, `SHP_DOC_LIBRARY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.
- Works with: SharePoint

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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-mcp
```
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>

### Codex

**Platform CLI**
```bash
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-mcp
```
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>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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>

### Gemini CLI

**Platform CLI**
```bash
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-mcp
```
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>

## When to use it
- 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
- Summarize `Q3_Report.pdf` from the `Finance` folder.
- List the files under `Legal/Contracts` and search the library with a SharePoint KQL query.
- Translate the proposal into French and save the revised document to SharePoint.

## Similar
- [microsoft-sharepoint](https://affpapa.org/en/nevibecode/skills/microsoft-sharepoint.md) — skill · 1600 installs
- [Microsoft 365 SharePoint](https://affpapa.org/en/nevibecode/mcp/microsoft-365-sharepoint.md) — MCP server · ★ 13
- [sharepoint](https://affpapa.org/en/nevibecode/plugins/sharepoint.md) — plugin · ★ 7604
- [m365-admin](https://affpapa.org/en/nevibecode/agents/m365-admin.md) — subagent · 229 installs
- [msgraph-sdk](https://affpapa.org/en/nevibecode/skills/msgraph-sdk.md) — skill · 57 installs
- [sap-btp-build-work-zone-advanced](https://affpapa.org/en/nevibecode/skills/sap-btp-build-work-zone-advanced.md) — skill · 674 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
