SharePoint Connector (data-connectors-ai)

Read-only MCP server for SharePoint: list, browse recursively, inspect file/folder metadata via Microsoft Graph API.

Documentation

SharePoint MCP Server

Read-only MCP server exposing SharePointClient to AI agents: list, browse, and inspect files/folders via the Microsoft Graph API.

Tools

ToolDescription
list_items(path: str | None = None) -> list[str]List item names in a folder (default: drive root)
list_with_metadata(path: str | None = None) -> list[dict]List items with name, type, size, modified date
list_recursive(path: str | None = None, max_depth: int = 10) -> dictHierarchical folder/file tree
get_item_metadata(path: str) -> dictMetadata for one item, including download_url for files
read_object_text(path: str, max_bytes: int = 1_000_000) -> strRead a file's content as UTF-8 text. Refuses (raises) files larger than max_bytes rather than truncating.

No write-guard needed — SharePointClient has no write/delete methods at all. download() (writes to a local filesystem path) isn't wrapped; agents don't have a filesystem to write to. Use read_object_text for small text content, or get_item_metadata()'s download_url if a real use case needs the raw bytes or a larger file.

Environment Variables

VariableRequiredDefaultNotes
SHAREPOINT_CLIENT_IDyesAzure AD app client ID
SHAREPOINT_CLIENT_SECRETyesAzure AD app client secret
SHAREPOINT_TENANT_IDyesAzure AD tenant ID
SHAREPOINT_SITE_IDyesSharePoint site ID
SHAREPOINT_HOSTnoyourcompany.sharepoint.com

Run locally

pip install "data-connectors-ai[sharepoint,mcp]"
data-connectors-sharepoint-mcp

Use with an MCP client

{
  "mcpServers": {
    "sharepoint": {
      "command": "uvx",
      "args": ["--from", "data-connectors-ai[sharepoint,mcp]", "data-connectors-sharepoint-mcp"],
      "env": {
        "SHAREPOINT_CLIENT_ID": "...",
        "SHAREPOINT_CLIENT_SECRET": "...",
        "SHAREPOINT_TENANT_ID": "...",
        "SHAREPOINT_SITE_ID": "..."
      }
    }
  }
}

Registry

Published at io.github.nagarjunr/data-connectors-sharepoint on the official MCP registry.