SharePoint MCP Server
The SharePoint MCP Server enables seamless interaction with Microsoft SharePoint resources for efficient document and folder management.
Key capabilities:
List folders in a specified directory or root
List documents within a specified folder
Get document content as text or base64-encoded binary
Create folders in specified directories
Upload documents either by providing content directly or from a local file path
Update content of existing documents
Delete documents from specified folders
Delete empty folders from SharePoint
SharePoint MCP Server
A comprehensive MCP Server for seamless integration with Microsoft SharePoint, enabling MCP clients to interact with documents, folders and other SharePoint resources. Built with efficiency and ease of use in mind, supporting both text and binary file operations. Developed by sofias tech.
✨ Key Features
This server provides a clean, efficient interface to SharePoint resources through the Model Context Protocol (MCP), with optimized operations for document management and content processing.
🛠️ Available Tools
The server implements 10 comprehensive tools for complete SharePoint management:
📁 Folder Management
List_SharePoint_Folders: Lists all folders in a specified directory or rootCreate_Folder: Creates new folders in specified directoriesDelete_Folder: Safely deletes empty folders from SharePointGet_SharePoint_Tree: Gets a recursive tree view of SharePoint folder structure
📄 Document Management
List_SharePoint_Documents: Fetches all documents within a specified folder with metadataGet_Document_Content: Retrieves and processes document content (supports text extraction from PDF, Word, Excel)Upload_Document: Uploads new documents to specified folders (supports both text and binary content)Upload_Document_From_Path: Direct file upload from local filesystem for large filesUpdate_Document: Updates content of existing documentsDelete_Document: Removes documents from specified folders
🎯 Advanced Content Processing
The server includes intelligent content extraction capabilities:
📊 Excel Files: Extracts data from all sheets, converts to readable text format (first 50 rows per sheet)
📝 Word Documents: Processes paragraphs and tables, maintaining structure
📄 PDF Files: Full text extraction using PyMuPDF for accurate content parsing
📃 Text Files: Direct processing of various text formats (JSON, XML, HTML, MD, code files)
🔧 Binary Support: Base64 encoding/decoding for seamless binary file handling
Related MCP server: MCP Server
🏗️ Architecture
The server is built with resource efficiency and maintainability in mind:
Efficient SharePoint API usage with selective property loading to minimize bandwidth
Smart error handling through decorators for cleaner, more reliable code
Clear separation of concerns between resource management and tool implementation
Optimized content handling for both text and binary files with automatic type detection
Configurable tree operations with depth limits and batch processing for large directories
Async/await support throughout for non-blocking operations
Setup
Register an app in Azure AD with appropriate SharePoint permissions
Obtain the client ID and client secret for the registered app
Identify your SharePoint site URL and the document library path you want to work with
Environment Variables
The server requires these environment variables:
Required Variables
SHP_ID_APP: Your Azure AD application client IDSHP_ID_APP_SECRET: Your Azure AD application client secretSHP_SITE_URL: The URL of your SharePoint siteSHP_DOC_LIBRARY: Path to the document library (default: "Shared Documents/mcp_server")SHP_TENANT_ID: Your Microsoft tenant ID
Optional Configuration Variables
SHP_MAX_DEPTH: Maximum folder depth for tree operations (default: 15)SHP_MAX_FOLDERS_PER_LEVEL: Maximum folders to process per level (default: 100)SHP_LEVEL_DELAY: Delay in seconds between processing levels (default: 0.5)
Quickstart
Installation
pip install -e .Or install from PyPI once published:
pip install mcp-sharepoint-serverUsing uv:
uv pip install mcp-sharepoint-serverClaude 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",
"SHP_MAX_DEPTH": "15",
"SHP_MAX_FOLDERS_PER_LEVEL": "100",
"SHP_LEVEL_DELAY": "0.5"
}
}
}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",
"SHP_MAX_DEPTH": "15",
"SHP_MAX_FOLDERS_PER_LEVEL": "100",
"SHP_LEVEL_DELAY": "0.5"
}
}
}Development
Requirements
Python 3.10+
Dependencies listed in
requirements.txtandpyproject.toml
Local Development
Clone the repository
Create a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activateInstall development dependencies:
pip install -e .Create a
.envfile 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-idRun the server:
python -m mcp_sharepoint
Debugging
For debugging the MCP server, you can use the MCP Inspector:
npx @modelcontextprotocol/inspector -- python -m mcp_sharepointLicense
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 sofias tech
Available Tools
9 toolsCreate_FolderC
Create a new folder in the specified directory or root if not specified
Inputs: folder_name (required), parent_folder.
Delete_DocumentC
Delete a document from a SharePoint directory
Inputs: file_name (required), folder_name (required).
Delete_FolderC
Delete an empty folder from SharePoint
Inputs: folder_path (required).
Get_Document_ContentC
Get content of a document in SharePoint
Inputs: file_name (required), folder_name (required).
Update_DocumentC
Update an existing document in a SharePoint directory
Inputs: content (required), file_name (required), folder_name (required), is_base64.
Upload_DocumentC
Upload a new file to a SharePoint directory
Inputs: content (required), file_name (required), folder_name (required), is_base64.
Upload_Document_From_PathC
Upload a file directly from a file path to SharePoint
Inputs: file_path (required), folder_name (required), new_file_name.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Most tools have distinct purposes, but 'Upload_Document' and 'Upload_Document_From_Path' could cause confusion as they both handle document uploads with only a slight difference in source specification. The other tools clearly target different operations like creation, deletion, listing, and updating.
All tool names follow a consistent verb_noun pattern with underscores, such as 'Create_Folder', 'Delete_Document', and 'List_SharePoint_Documents'. This uniformity makes the set predictable and easy to navigate for an agent.
With 9 tools, the server is well-scoped for managing SharePoint documents and folders. It covers essential operations without being overly complex, making it appropriate for typical file management tasks in this domain.
The toolset provides strong coverage for document and folder management, including CRUD operations like create, read, update, and delete. A minor gap is the lack of a tool for moving or renaming items, which might require workarounds, but core workflows are well-supported.
Related MCP Connectors
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
MCP server for the PDFGate API. Generate PDFs, manage documents and handle e-signatures.
MCP server for innovationlab documentation, generated by doc2mcp.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP Server simplifies the implementation of the Model Context Protocol by providing a user-friendly API to create custom tools and manage server workflows efficiently.39 npm4MIT
- AlicenseNot gradedqualityCmaintenanceMCP Server provides a simpler API to interact with the Model Context Protocol by allowing users to define custom tools and services to streamline workflows and processes.18 npm3MIT

Folderrofficial
AlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server that provides tools to interact with Folderr's API, specifically for managing and communicating with Folderr Assistants.717 npm3MIT- FlicenseBqualityDmaintenanceA specialized server that helps users create new Model Context Protocol (MCP) servers by providing tools and templates for scaffolding projects with various capabilities.84-