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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。