- Home
- MCP servers
- SharePoint
SharePoint
- python
66
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"sofias-ai-mcp-sharepoint": {
"command": "python",
"args": [
"-m",
"mcp_sharepoint"
],
"env": {
"SHP_ID_APP": "YOUR_APP_ID",
"SHP_SITE_URL": "https://your-tenant.sharepoint.com/sites/your-site",
"SHP_MAX_DEPTH": "15",
"SHP_TENANT_ID": "YOUR_TENANT_ID",
"SHP_DOC_LIBRARY": "Shared Documents/your-folder",
"SHP_LEVEL_DELAY": "0.5",
"SHP_ID_APP_SECRET": "YOUR_APP_SECRET",
"SHP_MAX_FOLDERS_PER_LEVEL": "100"
}
}
}
}You can connect your MCP clients to SharePoint resources through a dedicated MCP Server that handles folders, documents, and content processing. It supports text and binary files, with intelligent extraction for common document formats, making it easy to manage SharePoint content from the MCP ecosystem.
How to use
You expose SharePoint resources to MCP clients via a local or remote MCP server instance. Start the server using the recommended runtime, then connect your MCP client to the server to browse folders, list documents, upload or update files, and retrieve content. The server automatically detects content type and provides text extraction for PDFs, Word, Excel, and other text formats.
How to install
Prerequisites: Python 3.10 or newer is required to run the server locally. You should also have access to a SharePoint site and the appropriate Azure AD app credentials.
Install the MCP SharePoint server package in editable mode during development or from a published package.
Install from source (editable):
pip install -e .
Install from PyPI when published:
pip install mcp-sharepoint-server
Run the server locally using Python. This starts the MCP server in stdio mode and reads environment variables for configuration.
python -m mcp_sharepoint
Additional sections
Configuration notes and runtime details help you tailor the server to your SharePoint environment and security requirements.
Configuration and runtime notes
Environment variables shown here are used to connect to your Azure AD app and specific SharePoint site and document library. Provide secure values in your runtime environment.
Available tools
List_SharePoint_Folders
Lists all folders in a specified directory or root to help you navigate the structure.
Create_Folder
Creates new folders in a specified directory on SharePoint.
Delete_Folder
Safely deletes an empty folder from SharePoint.
Get_SharePoint_Tree
Provides a recursive tree view of the SharePoint folder structure with configurable depth.
List_SharePoint_Documents
Fetches all documents within a specified folder along with metadata.
Get_Document_Content
Retrieves and processes document content, including text extraction from PDFs, Word, and Excel files.
Upload_Document
Uploads new documents to a specified folder and handles both text and binary content.
Upload_Document_From_Path
Uploads a local file directly from the filesystem for large documents.
Update_Document
Updates the content of existing documents in SharePoint.
Delete_Document
Removes documents from specified folders.
Excel_Content_Processing
Extracts data from all sheets in Excel files and converts to readable text (first 50 rows per sheet).
Word_Content_Processing
Processes Word documents to preserve paragraphs and tables with structure.
PDF_Content_Processing
Performs full text extraction from PDFs using PyMuPDF for accurate results.
Text_Content_Processing
Processes text-based formats (JSON, XML, HTML, MD, code) for easy consumption.
Binary_Support
Base64 encoding/decoding for seamless handling of binary files.