SharePoint Docs MCP Server
SharePoint Docs MCP Server
A Model Context Protocol (MCP) server that provides SharePoint document search functionality. Supports both stdio and HTTP transports.
Authentication Methods
Two authentication methods are supported:
Certificate Authentication (Application Permissions)
Uses Azure AD certificate-based authentication
Supports both stdio and HTTP transports
Recommended for server applications and automation
OAuth Authentication (User Permissions)
Uses OAuth 2.0 Authorization Code Flow with PKCE
HTTP transport only (browser-based authentication required)
Recommended for user-delegated access scenarios
Related MCP server: excel-o365
Features
SharePoint Features
sharepoint_docs_search
Document search by keywords
Support for both SharePoint sites and OneDrive
Multiple search targets (sites, OneDrive folders, or mixed)
File extension filtering (pdf, docx, xlsx, etc.)
Response format options (detailed/compact) for token efficiency
sharepoint_docs_download
File download from search results
Automatic method selection for SharePoint vs OneDrive files
sharepoint_excel
Read or search Excel files in SharePoint
Search mode: find cells containing specific text with
queryparameterRead mode: get data from specific sheets/ranges with
sheetandcell_rangeparametersAutomatic header inclusion: when
cell_rangeis specified, frozen rows (headers) are automatically included by defaultSet
include_frozen_rows=Falseto get only the specified rangeFor sheets with
frozen_rows=0, useexpand_axis_range=Trueto include row 1 (for columns) or column A (for rows)
Cell style information (optional): set
include_cell_styles=Trueto get background colors, column widths, and row heightsDefault is
Falseto minimize token usageUseful for identifying highlighted cells, colored headers, or visually emphasized content
Response includes cell data in
rows(value and coordinate) and structural information when availableStructural info: sheet name, dimensions, frozen_rows, frozen_cols, freeze_panes (when present), merged_ranges (when merged cells exist)
No Excel Services dependency - uses direct file download + openpyxl parsing
OneDrive Support
This server supports searching both SharePoint sites and OneDrive content with flexible configuration:
OneDrive Integration: Search specific users' OneDrive content
Folder-level targeting: Search specific folders within OneDrive
Mixed search: Combine SharePoint sites and OneDrive in a single search
Flexible configuration: Simple environment variable setup
Requirements
Python 3.12
uv (package manager)
Quick Start
1. Installation
# Run directly from GitHub without cloning
uvx --from git+https://github.com/ncdcdev/sharepoint-docs-mcp sharepoint-docs-mcp --transport stdio2. Configuration
Create a .env file with your SharePoint credentials:
# Basic configuration
SHAREPOINT_BASE_URL=https://yourcompany.sharepoint.com
SHAREPOINT_TENANT_ID=your-tenant-id-here
SHAREPOINT_CLIENT_ID=your-client-id-here
SHAREPOINT_SITE_NAME=yoursite
# For certificate authentication
SHAREPOINT_CERTIFICATE_PATH=path/to/certificate.pem
SHAREPOINT_PRIVATE_KEY_PATH=path/to/private_key.pem
# For OAuth authentication (HTTP transport only)
# SHAREPOINT_AUTH_MODE=oauth
# SHAREPOINT_OAUTH_CLIENT_SECRET=your-oauth-client-secret-here
# SHAREPOINT_OAUTH_SERVER_BASE_URL=https://your-server.com
# If not set: all URIs allowed (dev). If set: only specified patterns (production recommended)
# SHAREPOINT_OAUTH_ALLOWED_REDIRECT_URIS=https://claude.ai/*,https://*.anthropic.com/*See Setup Guide for detailed configuration instructions.
3. Run the Server
# stdio mode (for Claude Desktop)
uv run sharepoint-docs-mcp --transport stdio
# HTTP mode (for network services)
uv run sharepoint-docs-mcp --transport http --host 127.0.0.1 --port 8000Documentation
π Setup Guide - Detailed Azure AD and environment configuration
π Usage Guide - MCP client integration and search examples
π Development Guide - Project structure and development commands
π Troubleshooting Guide - Common issues and debugging
License
MIT License - See LICENSE file for details.
Available Tools
3 toolsTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 3 tools
The three tools target distinct operations: finding documents, downloading files, and reading Excel cells. However, sharepoint_excel bundles its own 'search mode' alongside sharepoint_docs_search, creating mild overlap in the word 'search' and a two-mode tool that requires careful reading to use correctly.
All names use the sharepoint_ prefix with snake_case, which is predictable. The one deviation is sharepoint_excel, which names a resource rather than following the verb_noun pattern used by sharepoint_docs_search and sharepoint_docs_download.
Three tools is borderline thin for a document platform server; search, download, and Excel reading are useful but leave little room for anything else. The Excel tool in particular carries a very large description, suggesting it is overstuffed relative to the small surface.
The server covers discovery, retrieval, and spreadsheet reading, but has notable gaps: no upload/write, no listing of sites, libraries, or folders, and no metadata retrieval beyond search results. Agents can perform read-only document workflows but will hit dead ends for common SharePoint operations.
Maintenance
Related MCP Connectors
Search and manage your team's knowledge from MCP clients.
Audio, music, video, image, PDF, speech, text and web-check tools callable from any MCP client.
Audio, music, video, image, PDF, speech, text and web-check tools callable from any MCP client.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Related MCP Servers
- FlicenseAqualityCmaintenanceMCP server for Microsoft Office file operations. Read, write, and create Excel, Word, and PowerPoint files directly from your local filesystem.12-
- AlicenseAqualityCmaintenanceEnables managing Excel files in Microsoft 365 (OneDrive/SharePoint) through Microsoft Graph API, including creating workbooks, adding worksheets, creating tables, and reading or adding table rows via MCP tools.6Apache 2.0
- FlicenseNot gradedqualityCmaintenanceEnables read-only keyword search across configured SharePoint Online sites via Microsoft Graph, plus document metadata retrieval and text extraction from common file formats. Supports STDIO and Streamable HTTP transports without write permissions.-
- AlicenseNot gradedqualityCmaintenanceEnables semantic search and retrieval over SharePoint documents such as PPTX, DOCX, and PDF files through MCP tools.1Apache 2.0