SharePoint MCP Server (Certificate Auth)
Enables secure interaction with Microsoft SharePoint using certificate-based authentication. Provides 14 tools for managing documents, folders, metadata, and extracting content from various file types including PDF, Word, and Excel.
README
SharePoint MCP Server (Certificate Auth)
A comprehensive MCP Server for seamless integration with Microsoft SharePoint using certificate-based authentication. Enables MCP clients to interact with documents, folders and other SharePoint resources securely without client secrets.
Quick Start
1. Install
Using uvx (recommended):
uvx mcp-sharepoint-cert
Or install with uv:
uv pip install mcp-sharepoint-cert
2. Run Interactive Setup
uvx mcp-sharepoint-cert-setup
The setup wizard will:
- Generate a certificate for authentication
- Guide you through Azure configuration
- Collect your Azure app details
- Ask which AI assistant you use (Claude Desktop, Claude Code, Cursor, Windsurf)
- Output an AI-ready prompt that you paste into your assistant to finish configuration
The wizard generates INSTALL_WITH_AI.md - just paste it into your AI assistant and let it configure everything for you!
3. Configure Azure (One-time setup)
- Go to Azure Portal → App registrations → New registration
- Name it (e.g.,
mcp-sharepoint), click Register - Save the Application (client) ID and Directory (tenant) ID
- Go to Certificates & secrets → Certificates → Upload certificate
- Upload the
certs/sharepoint.crtfile generated by the setup command
- Upload the
- Go to API permissions → Add permission → SharePoint → Application permissions
- Add
Sites.FullControl.All(orSites.ReadWrite.Allfor read/write only) - Click Grant admin consent
- Add
4. Configure Your AI Assistant
The setup wizard outputs INSTALL_WITH_AI.md - paste this into your AI assistant (Claude, Cursor, etc.) and it will configure the MCP server for you automatically.
Or configure manually - create a .env file:
SHP_ID_APP=your-application-client-id
SHP_TENANT_ID=your-directory-tenant-id
SHP_SITE_URL=https://your-tenant.sharepoint.com/sites/your-site
SHP_DOC_LIBRARY=Shared Documents
SHP_CERT_PATH=certs/sharepoint.pem
SHP_CERT_THUMBPRINT=your-certificate-thumbprint
5. Run (Standalone)
mcp-sharepoint-cert
You should see:
Connected to SharePoint: YourSiteName
MCP server ready - waiting for connections...
Claude Desktop Integration
Add to your Claude Desktop config:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"sharepoint": {
"command": "uvx",
"args": ["mcp-sharepoint-cert"],
"env": {
"SHP_ID_APP": "your-app-id",
"SHP_TENANT_ID": "your-tenant-id",
"SHP_SITE_URL": "https://your-tenant.sharepoint.com/sites/your-site",
"SHP_DOC_LIBRARY": "Shared Documents",
"SHP_CERT_PATH": "/path/to/certs/sharepoint.pem",
"SHP_CERT_THUMBPRINT": "your-thumbprint"
}
}
}
}
Available Tools
The server provides 14 tools for complete SharePoint management:
Folder Management
List_SharePoint_Folders- List folders in a directoryCreate_Folder- Create new foldersDelete_Folder- Delete empty foldersGet_SharePoint_Tree- Get recursive folder structure
Document Management
List_SharePoint_Documents- List documents with metadataGet_Document_Content- Read document content (supports PDF, Word, Excel)Upload_Document- Upload new documents (text or binary)Upload_Document_From_Path- Upload from local filesystemUpdate_Document- Update existing documentsDelete_Document- Remove documentsDownload_Document- Download to local filesystem
Metadata Operations
Get_File_Metadata- Get file metadata fieldsUpdate_File_Metadata- Update file metadata
Content Processing
Intelligent content extraction for common file types:
- PDF - Full text extraction via PyMuPDF
- Word (.docx) - Paragraphs and tables
- Excel (.xlsx) - All sheets, first 50 rows each
- Text files - JSON, XML, HTML, MD, code files
- Binary - Base64 encoding for other types
Environment Variables
Required
| Variable | Description |
|---|---|
SHP_ID_APP |
Azure AD application client ID |
SHP_TENANT_ID |
Microsoft tenant ID |
SHP_SITE_URL |
SharePoint site URL |
SHP_DOC_LIBRARY |
Document library path (default: Shared Documents) |
SHP_CERT_PATH |
Path to certificate PEM file |
SHP_CERT_THUMBPRINT |
Certificate thumbprint (SHA1) |
Optional
| Variable | Default | Description |
|---|---|---|
SHP_MAX_DEPTH |
15 | Max folder depth for tree operations |
SHP_MAX_FOLDERS_PER_LEVEL |
100 | Max folders per level |
SHP_LEVEL_DELAY |
0.5 | Delay between levels (seconds) |
SHP_BATCH_DELAY |
0.1 | Delay between batches (seconds) |
Development
Requirements
- Python 3.12+
- uv
Setup
git clone https://github.com/peacockery-studio/mcp-sharepoint-cert.git
cd mcp-sharepoint-cert
uv sync --group dev
Run Locally
uv run mcp-sharepoint-cert
Code Quality
uv run ruff check src/ # Lint
uv run ruff format src/ # Format
uv run ty check src/ # Type check
uv run pytest # Tests
Debugging with MCP Inspector
npx @modelcontextprotocol/inspector -- uv run mcp-sharepoint-cert
Troubleshooting
"Authentication failed" (401)
- Verify certificate is uploaded to Azure AD
- Check thumbprint matches
- Ensure certificate hasn't expired
"Access denied" (403)
- Grant admin consent for API permissions
- Verify
Sites.FullControl.AllorSites.ReadWrite.Allis granted
"Site not found" (404)
- Check
SHP_SITE_URLis correct - Verify site exists and is accessible
License
MIT License - see LICENSE for details.
Copyright (c) 2025 Chieji Mofor
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.