sharepoint
A Model Context Protocol server for browsing and interacting with Microsoft SharePoint sites and documents
claude mcp add --transport stdio sekops-ch-sharepoint-mcp-server node /path/to/sharepoint-mcp-server/build/index.js \ --env CLIENT_ID="your-azure-app-client-id" \ --env TENANT_ID="your-azure-tenant-id" \ --env CLIENT_SECRET="your-azure-app-client-secret" \ --env SHAREPOINT_URL="https://yourtenant.sharepoint.com"
How to use
This MCP server provides programmatic access to SharePoint sites and documents via a set of MCP tools and resources. It exposes resources for listing SharePoint sites and their metadata, and tools to search files, browse document libraries, and retrieve file contents (text files). Authentication is handled via OAuth2 client credentials with automatic token management, so the server can operate in headless scenarios where a service principal is used. You can interact with the server using the MCP Inspector during development or integrate it into Claude Desktop by configuring the MCP server in your environment to point to the built server binary or entry point.
The available tools include: search_files to query across SharePoint documents using Microsoft Graph, list_sites to enumerate accessible SharePoint sites, get_site_info for detailed site metadata, list_site_drives to enumerate document libraries, list_drive_items to browse items within a library, and get_file_content to fetch the contents of text files. Each tool accepts parameters such as siteUrl, driveId, folderPath, and query strings as described in the README, enabling you to compose rich MCP requests for browsing and retrieving SharePoint data.
How to install
Prerequisites:
- Node.js and npm installed (Node 14+ recommended)
- Access to Microsoft Graph with the required permissions and a registered Azure AD application (Sites.Read.All and Files.Read.All as application permissions)
- Network access to Microsoft Graph API endpoints
Installation steps:
- Clone the repository or download the package for the SharePoint MCP server
- Install dependencies:
npm install
- Build the TypeScript project:
npm run build
- (Optional for development) Run in watch mode to auto-rebuild on changes:
npm run watch
- Prepare environment variables for authentication (example):
export SHAREPOINT_URL=https://yourtenant.sharepoint.com
export TENANT_ID=your-azure-tenant-id
export CLIENT_ID=your-azure-app-client-id
export CLIENT_SECRET=your-azure-app-client-secret
- Run the server (pointing to the built entry):
node build/index.js
- (Optional) Run the MCP Inspector to test tools:
npm run inspector
For Claude Desktop integration, configure your client with the appropriate command and arguments to start the server, as shown in the Installation section of the README.
Additional notes
Tips and notes:
- Ensure the Azure AD application has Sites.Read.All and Files.Read.All application permissions and admin consent has been granted.
- Store client secrets securely; avoid committing them to version control.
- If you rotate client secrets, update the environment variables and restart the server.
- The server uses OAuth2 client credentials flow, so it is best suited for service or automation scenarios rather than user-interactive logins.
- When debugging, you can enable verbose logs by setting DEBUG=sharepoint-mcp-server to aid in troubleshooting authentication or Graph API calls.
- In production, consider deploying behind a reverse proxy with TLS termination and rotating credentials periodically.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.