# Microsoft 365 SharePoint

An MCP server that gives your agent SharePoint through Microsoft Graph: find sites, read libraries and lists, search content, and create sharing links.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 13
- Author: mindstone
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/mindstone/mcp-servers/tree/HEAD/connectors/microsoft-sharepoint
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/microsoft-365-sharepoint

## What it does

The server sits on top of the Microsoft Graph API and exposes 46 tools to the agent: authentication, sites, document libraries, pages, lists, metadata, search, and file and list mutations. A typical run finds a document on a given site and hands back a link to it.

OAuth is owned by the host application, not by this server. The host writes token files to `${MS_CONFIG_DIR}/credentials/${sanitised-email}.token.json` plus an `${MS_CONFIG_DIR}/accounts.json` index; the server only reads them. Incremental consent for `Sites.Read.All` goes through a dedicated `authenticate_sharepoint` tool, so the existing mail, calendar, files and teams session stays untouched.

You need Node.js 20+ and npm. Two environment variables are required: `MS_CLIENT_ID` (the Microsoft Entra application client ID) and `MS_CONFIG_DIR`. Without a host that runs the OAuth flow and writes the token files, the server will not start — it never initiates sign-in on its own.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `MS_CLIENT_ID`, `MS_CONFIG_DIR`, `MS_ACCOUNT_EMAIL`, `MS_MCP_PACKAGE_ID`, `MICROSOFT_REQUEST_TIMEOUT_MS` — 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 MS_CLIENT_ID=<MS_CLIENT_ID> --env MS_CONFIG_DIR=<MS_CONFIG_DIR> --env MS_ACCOUNT_EMAIL=<MS_ACCOUNT_EMAIL> --env MS_MCP_PACKAGE_ID=<MS_MCP_PACKAGE_ID> --env MICROSOFT_REQUEST_TIMEOUT_MS=<MICROSOFT_REQUEST_TIMEOUT_MS> --transport stdio microsoft-sharepoint -- npx -y @mindstone/mcp-server-microsoft-sharepoint
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add microsoft-sharepoint --env MS_CLIENT_ID=<MS_CLIENT_ID> --env MS_CONFIG_DIR=<MS_CONFIG_DIR> --env MS_ACCOUNT_EMAIL=<MS_ACCOUNT_EMAIL> --env MS_MCP_PACKAGE_ID=<MS_MCP_PACKAGE_ID> --env MICROSOFT_REQUEST_TIMEOUT_MS=<MICROSOFT_REQUEST_TIMEOUT_MS> -- npx -y @mindstone/mcp-server-microsoft-sharepoint
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "microsoft-sharepoint": {
            "command": "npx",
            "args": [
                "-y",
                "@mindstone/mcp-server-microsoft-sharepoint"
            ],
            "env": {
                "MS_CLIENT_ID": "<MS_CLIENT_ID>",
                "MS_CONFIG_DIR": "<MS_CONFIG_DIR>",
                "MS_ACCOUNT_EMAIL": "<MS_ACCOUNT_EMAIL>",
                "MS_MCP_PACKAGE_ID": "<MS_MCP_PACKAGE_ID>",
                "MICROSOFT_REQUEST_TIMEOUT_MS": "<MICROSOFT_REQUEST_TIMEOUT_MS>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "microsoft-sharepoint": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@mindstone/mcp-server-microsoft-sharepoint"
            ],
            "env": {
                "MS_CLIENT_ID": "<MS_CLIENT_ID>",
                "MS_CONFIG_DIR": "<MS_CONFIG_DIR>",
                "MS_ACCOUNT_EMAIL": "<MS_ACCOUNT_EMAIL>",
                "MS_MCP_PACKAGE_ID": "<MS_MCP_PACKAGE_ID>",
                "MICROSOFT_REQUEST_TIMEOUT_MS": "<MICROSOFT_REQUEST_TIMEOUT_MS>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e MS_CLIENT_ID=<MS_CLIENT_ID> -e MS_CONFIG_DIR=<MS_CONFIG_DIR> -e MS_ACCOUNT_EMAIL=<MS_ACCOUNT_EMAIL> -e MS_MCP_PACKAGE_ID=<MS_MCP_PACKAGE_ID> -e MICROSOFT_REQUEST_TIMEOUT_MS=<MICROSOFT_REQUEST_TIMEOUT_MS> microsoft-sharepoint npx -y @mindstone/mcp-server-microsoft-sharepoint
```
Replace <…> with your own values

## When to use it
- find a document on a SharePoint site by name
- list what a document library contains
- read items from a SharePoint list
- create a read-only sharing link for a team
- search SharePoint content from the agent

## Example prompts
- Find the Q3 OKR doc on the Strategy team's site
- Create a read-only link to that file for the whole organization
- Show me what's in this site's document library

## Similar
- [microsoft-sharepoint](https://affpapa.org/en/nevibecode/skills/microsoft-sharepoint.md) — skill · 1600 installs
- [sharepoint](https://affpapa.org/en/nevibecode/plugins/sharepoint.md) — plugin · ★ 7604
- [cli-microsoft365-mcp-server](https://affpapa.org/en/nevibecode/mcp/cli-microsoft365-mcp-server.md) — MCP server · ★ 135
- [msgraph-sdk](https://affpapa.org/en/nevibecode/skills/msgraph-sdk.md) — skill · 57 installs
- [MS 365-21V MCP Server](https://affpapa.org/en/nevibecode/mcp/ms-365-21v-mcp-server.md) — MCP server · ★ 89
- [SharePoint MCP Server](https://affpapa.org/en/nevibecode/mcp/sharepoint-mcp-server.md) — MCP server · ★ 12

From the same set: [mindstone/mcp-servers](https://affpapa.org/en/nevibecode/by/mindstone/mcp-servers.md) — 13 cards

---
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
