Get the FREE Ultimate OpenClaw Setup Guide →

sharepoint

SharePoint MCP (Model Context Protocol) - A SharePoint connector for LLM applications. Access SharePoint documents and lists through Microsoft Graph API.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio demodorigatsuo-sharepoint-mcp python server.py \
  --env ENVIRONMENT="Optional: e.g., development or production (default if not set)" \
  --env AZURE_CLIENT_ID="Your Azure AD application (client) ID" \
  --env AZURE_TENANT_ID="Your Azure AD tenant ID" \
  --env AZURE_CLIENT_SECRET="Your Azure AD application client secret" \
  --env SHAREPOINT_SITE_URL="URL of the SharePoint site to access"

How to use

This SharePoint MCP Server acts as a bridge that lets Claude-like LLMs query and interact with content stored in your SharePoint site. It exposes tools to retrieve site information, browse document libraries, read document contents (DOCX, PDF, XLSX, CSV, TXT), perform full-text searches, manage list items, and create/configure various SharePoint artifacts such as pages, news posts, and sites. You can call the server via HTTP endpoints exposed by the MCP server (for example, to fetch a document or list items) and pass authentication details through the configured environment or headers as described in the project docs. The server is designed to work with your Azure AD authentication flow, requiring a registered app with the necessary permissions to access SharePoint resources.

How to install

Prerequisites:

  • Python 3.10 or higher
  • Access to a SharePoint site and an Azure AD app with appropriate permissions

Installation steps:

  1. Clone the repository: git clone https://github.com/DEmodoriGatsuO/sharepoint-mcp.git cd sharepoint-mcp

  2. Create and activate a virtual environment: python -m venv venv

    macOS/Linux

    source venv/bin/activate

    Windows

    venv\Scripts\activate

  3. Install dependencies: pip install -r requirements.txt

  4. Configure environment variables: cp .env.example .env

    Edit the .env file with your authentication details (or rely on the provided env in MCP config)

  5. Run the server (as an MCP server): mcp dev sharepoint

    Or if running directly for testing:

    python server.py

Additional notes

Tips and common considerations:

  • Ensure your Azure AD app has permissions to access SharePoint resources (sites, lists, documents, etc.).
  • The server uses a .env file for local configuration; when running via MCP, you can supply environment variables as shown in the mcp_config section.
  • If you encounter authentication issues, run the provided diagnostic scripts (auth-diagnostic.py) and verify token claims with token-decoder.py.
  • Enable verbose logging by setting DEBUG=True in the .env file to help troubleshoot issues in development.
  • For production deployments, consider securing secrets with your environment's secret management and rotating credentials regularly.

Related MCP Servers

Sponsor this space

Reach thousands of developers