SharePoint MCP Server

v1.1.1
io.github.ravikant1918/sharepoint-mcp Checked 1 day ago Published 8 months ago

MCP server for Microsoft SharePoint — manage folders, documents, and metadata.

Starts only with mcp<2 (written for an older SDK); the install commands pin it.

Values you need

VariableWhat it is
SHP_ID_APPrequired Azure AD application (client) ID
SHP_ID_APP_SECRETrequired secret Azure AD client secret
SHP_TENANT_IDrequired Microsoft Entra (Azure AD) tenant ID
SHP_SITE_URLrequired SharePoint site URL (e.g. https://tenant.sharepoint.com/sites/MySite)
SHP_DOC_LIBRARYoptional SharePoint document library path Default: Shared Documents/mcp_server

PyPI (uvx) discovery passed

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add sharepoint-mcp -e 'SHP_ID_APP=<SHP_ID_APP>' -e 'SHP_ID_APP_SECRET=<SHP_ID_APP_SECRET>' -e 'SHP_SITE_URL=<SHP_SITE_URL>' -e 'SHP_TENANT_ID=<SHP_TENANT_ID>' -- uvx --with 'mcp<2' sharepoint-mcp==1.1.1
Add to claude_desktop_config.json
{
  "mcpServers": {
    "sharepoint-mcp": {
      "args": [
        "--with",
        "mcp<2",
        "sharepoint-mcp==1.1.1"
      ],
      "command": "uvx",
      "env": {
        "SHP_ID_APP": "<SHP_ID_APP>",
        "SHP_ID_APP_SECRET": "<SHP_ID_APP_SECRET>",
        "SHP_SITE_URL": "<SHP_SITE_URL>",
        "SHP_TENANT_ID": "<SHP_TENANT_ID>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "sharepoint-mcp": {
      "args": [
        "--with",
        "mcp<2",
        "sharepoint-mcp==1.1.1"
      ],
      "command": "uvx",
      "env": {
        "SHP_ID_APP": "<SHP_ID_APP>",
        "SHP_ID_APP_SECRET": "<SHP_ID_APP_SECRET>",
        "SHP_SITE_URL": "<SHP_SITE_URL>",
        "SHP_TENANT_ID": "<SHP_TENANT_ID>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "SHP_ID_APP",
      "id": "shp-id-app",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "SHP_ID_APP_SECRET",
      "id": "shp-id-app-secret",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "SHP_SITE_URL",
      "id": "shp-site-url",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "SHP_TENANT_ID",
      "id": "shp-tenant-id",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "sharepoint-mcp": {
      "args": [
        "--with",
        "mcp<2",
        "sharepoint-mcp==1.1.1"
      ],
      "command": "uvx",
      "env": {
        "SHP_ID_APP": "${input:shp-id-app}",
        "SHP_ID_APP_SECRET": "${input:shp-id-app-secret}",
        "SHP_SITE_URL": "${input:shp-site-url}",
        "SHP_TENANT_ID": "${input:shp-tenant-id}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.sharepoint-mcp]
command = "uvx"
args = ["--with", "mcp<2", "sharepoint-mcp==1.1.1"]
env = { "SHP_ID_APP" = "<SHP_ID_APP>", "SHP_ID_APP_SECRET" = "<SHP_ID_APP_SECRET>", "SHP_SITE_URL" = "<SHP_SITE_URL>", "SHP_TENANT_ID" = "<SHP_TENANT_ID>" }

For AI agents

  1. Ask the user for: SHP_ID_APP, SHP_ID_APP_SECRET, SHP_TENANT_ID, SHP_SITE_URL. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: List_SharePoint_Documents, Search_SharePoint, Get_Document_Content, Upload_Document, Upload_Document_From_Path, Update_Document, Delete_Document, Download_Document, ….
  5. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json