SharePoint MCP Server

SharePoint MCP Server

A lightweight MCP server that enables integration with Microsoft SharePoint, allowing clients to interact with documents and folders through the Model Context Protocol.

Category
Visit Server

README

SharePoint MCP Server

License: MIT

A lightweight MCP Server for seamless integration with Microsoft SharePoint, enabling MCP clients to interact with documents, folders and other SharePoint resources. Developed by sofias tech.

Features

This server provides a clean interface to SharePoint resources through the Model Context Protocol (MCP), with optimized operations for document management.

Tools

The server implements the following tools:

  • List_SharePoint_Folders: Lists all folders in a specified directory or root
  • List_SharePoint_Documents: Fetches all documents within a specified folder
  • Get_Document_Content: Retrieves the content of a document (as text or base64-encoded binary)
  • Create_Folder: Creates a new folder in the specified directory or root
  • Upload_Document: Uploads a new document to a specified folder
  • Update_Document: Updates the content of an existing document
  • Delete_Document: Removes a document from a specified folder
  • Delete_Folder: Deletes an empty folder from SharePoint

Architecture

The server is built with resource efficiency in mind:

  • Efficient SharePoint API usage with selective property loading
  • Error handling through decorators for cleaner code
  • Clear separation between resource management and tool implementation
  • Optimized content handling for both text and binary files

Setup

  1. Register an app in Azure AD with appropriate SharePoint permissions
  2. Obtain the client ID and client secret for the registered app
  3. Identify your SharePoint site URL and the document library path you want to work with

Environment Variables

The server requires these environment variables:

  • SHP_ID_APP: Your Azure AD application client ID
  • SHP_ID_APP_SECRET: Your Azure AD application client secret
  • SHP_SITE_URL: The URL of your SharePoint site
  • SHP_DOC_LIBRARY: Path to the document library (default: "Shared Documents/mcp_server")
  • SHP_TENANT_ID: Your Microsoft tenant ID

Quickstart

Installation

pip install -e .

Or install from PyPI once published:

pip install mcp-sharepoint-server

Using uv:

uv pip install mcp-sharepoint-server

Claude Desktop Integration

To integrate with Claude Desktop, update the configuration file:

On Windows: %APPDATA%/Claude/claude_desktop_config.json On macOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json

Standard Integration

"mcpServers": {
  "sharepoint": {
    "command": "mcp-sharepoint",
    "env": {
      "SHP_ID_APP": "your-app-id",
      "SHP_ID_APP_SECRET": "your-app-secret",
      "SHP_SITE_URL": "https://your-tenant.sharepoint.com/sites/your-site",
      "SHP_DOC_LIBRARY": "Shared Documents/your-folder",
      "SHP_TENANT_ID": "your-tenant-id"
    }
  }
}

Using uvx

"mcpServers": {
  "sharepoint": {
    "command": "uvx",
    "args": [
      "mcp-sharepoint"
    ],
    "env": {
      "SHP_ID_APP": "your-app-id",
      "SHP_ID_APP_SECRET": "your-app-secret",
      "SHP_SITE_URL": "https://your-tenant.sharepoint.com/sites/your-site",
      "SHP_DOC_LIBRARY": "Shared Documents/your-folder",
      "SHP_TENANT_ID": "your-tenant-id"
    }
  }
}

Development

Requirements

  • Python 3.10+
  • Dependencies listed in requirements.txt and pyproject.toml

Local Development

  1. Clone the repository
  2. Create a virtual environment:
    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    
  3. Install development dependencies:
    pip install -e .
    
  4. Create a .env file with your SharePoint credentials:
    SHP_ID_APP=your-app-id
    SHP_ID_APP_SECRET=your-app-secret
    SHP_SITE_URL=https://your-tenant.sharepoint.com/sites/your-site
    SHP_DOC_LIBRARY=Shared Documents/your-folder
    SHP_TENANT_ID=your-tenant-id
    
  5. Run the server:
    python -m mcp_sharepoint
    

Debugging

For debugging the MCP server, you can use the MCP Inspector:

npx @modelcontextprotocol/inspector -- python -m mcp_sharepoint

License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright (c) 2025 sofias tech

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured