How I Automated My Entire SharePoint Tenant with 150 MCP Tools and Claude Desktop
What This Actually Is
I built a 150-tool MCP server that turns Claude Desktop into a full-stack SharePoint administrator, Power Apps developer, and Dataverse operator. It is two Python files — server.py registers 150 MCP tools, and sharepoint_client.py provides 147 methods that call Microsoft Graph, SharePoint REST, Dataverse Web API, and the Power Platform CLI.
Claude picks the right tool based on your natural language. You never see the API calls, you never open the SharePoint admin center, you never type a PowerShell command. You just describe what you want.
Example workflow: You say "Create a BurgerKing list on UberHub with 36 menu items, build a Code App with SharePoint data source, deploy to Power Apps." Claude chains five tools: create_list → add_list_column → bulk_import_to_list → scaffold_and_deploy_code_app → deploy_to_powerapps_atomic. A live app appears in under two minutes.
| Component | Technology | Purpose |
|---|---|---|
server.py | Python + FastMCP | 150 MCP tool registrations — the JSON-RPC gateway |
sharepoint_client.py | Python + MSAL + requests | 147 methods that call Microsoft APIs |
| Authentication | Azure AD App Registration | Client credentials flow and device code flow |
| APIs consumed | Graph, SP REST, Dataverse, pac CLI | Full CRUD across the Power Platform |
Step 1 — Prerequisites
Gather these before installing the MCP server. Node.js and pac CLI are only required if you plan to deploy Code Apps to Power Apps.
Python 3.10+
Runs both server files.
python --versionClaude Desktop
The AI interface for all commands.
claude.ai/downloadAzure App Registration
API authentication identity.
portal.azure.comMicrosoft 365 Tenant
SharePoint Online with admin access.
tenant.sharepoint.comNode.js (optional)
Required only for Code App deploys to Power Apps.
winget install OpenJS.NodeJS.LTSpac CLI (optional)
Power Platform CLI for Code App push.
dotnet tool install -g Microsoft.PowerApps.CLI.ToolStep 2 — Azure App Registration
This gives the MCP server an identity to call Microsoft APIs on your tenant.
Register a new app
Go to portal.azure.com → Azure Active Directory → App registrations → New registration. Name it SharePoint MCP Server. Select single tenant. No redirect URI.
Create a client secret
Go to Certificates & secrets → New client secret. Copy the Value immediately — it is shown only once.
Add API permissions
Add the permissions below, then click Grant admin consent so all show green checkmarks.
| API | Permission | Type | Purpose |
|---|---|---|---|
| Microsoft Graph | Sites.ReadWrite.All | Application | Read and write all SharePoint sites |
| Microsoft Graph | User.Read.All | Application | User lookup for sharing and permissions |
| Microsoft Graph | Group.ReadWrite.All | Application | Create and manage security groups |
| SharePoint | Sites.FullControl.All | Application | Admin operations like custom scripts |
| Dynamics CRM | user_impersonation | Application | Dataverse operations (optional) |
Enable public client flows
Authentication → Advanced settings → Allow public client flows → Yes. This enables delegated authentication for SharePoint write operations.
Save these three values — you will need them in the next step: your Tenant ID, Client ID (also called Application ID), and Client Secret (the Value you copied).
Step 3 — Install the MCP Server
Download the package
Get the latest version with all 150 tools:
Download sharepoint-mcp-v5-ultimate.zipExtract the ZIP
Unzip to a permanent location such as C:\Projects\sharepoint-mcp-v5\
Install Python dependencies
Verify installation
Run this to confirm both files compile without errors:
Step 4 — Configure Claude Desktop
Connect the MCP server to Claude Desktop so it can call all 150 tools.
Open Claude Desktop settings
Claude Desktop → Settings (gear icon) → Developer → Edit Config. This opens the claude_desktop_config.json file.
Add the MCP server configuration
Replace the placeholders with your actual Azure credentials:
About DATAVERSE_URL: This environment variable is optional. Only include it if you plan to use Dataverse tools (create tables, sync data, CRUD operations). Find your URL at admin.powerplatform.microsoft.com → Environments → your environment → Environment URL.
Restart Claude Desktop
Close and reopen. Look for the hammer icon (๐จ) in the chat — it should show 150 tools from the SharePoint MCP server.
Test it
Type "List all my SharePoint sites" in Claude. It should call list_all_sites and return your tenant's sites.
You are done. Claude Desktop now has full access to your SharePoint tenant, Power Apps, and Dataverse through 150 natural-language tools. Everything below is a reference for what each tool does.
All 150 Tools by Category
Every tool is callable by natural language. Claude picks the right one based on your request.
Sites & Structure
list_all_sitesDiscover tenant sitescreate_modern_siteTeam or communication siteclone_site_advancedFull clone with contentbuild_branded_siteBrand-aware site builderbuild_full_intranet_siteCorporate intranetcustomize_site_from_imageAI brand from imageget_site_infoDetails and analyticsaudit_site_permissionsPermission auditadd_user_to_siteGrant access by roleapply_site_themeColor themingcreate_smart_site_templateExport as template
Lists & Items
create_listCreate new list with columnsadd_list_columnText, choice, number, booleanget_list_itemsRead all itemsbulk_import_to_listBulk data importexport_list_dataExport to CSV or JSONcopy_list_between_sitesCross-site copycompare_listsDiff two listscreate_list_dashboardAuto dashboard from listget_item_version_historyVersion trackingembed_list_viewEmbed on a page
Pages & Content
create_pageModern SharePoint pageadd_web_part_to_pageAny web part typedeploy_html_to_homepageBranded homepageconfigure_page_headerHeader design optionsembed_file_viewerOffice document viewerembed_powerbi_dashboardPower BI embed
Navigation & Branding
build_navigation_structureFull nav from JSONsetup_custom_navigationMega menu supportapply_advanced_themeFull color paletteapply_custom_css_themeCSS injectioninject_custom_cssRaw CSS overrideclear_navigationReset all nav links
Code Apps & Deploy
deploy_to_powerapps_atomicFull atomic deployscaffold_and_deploy_code_appScaffold and scriptdeploy_code_app_to_sharepointInstant SP deployadd_sharepoint_datasource_to_code_appWire SP connectorextract_connection_idParse connection URLsrun_pac_commandAny pac CLI commandrun_npm_commandAny npm commandfix_code_app_pathResolve PATH issuesbuild_code_app_from_listGenerate from list schema
Dataverse Operations
list_dataverse_tablesList all tablesget_dataverse_table_columnsTable schemaget_dataverse_recordsRead with OData filterscreate_dataverse_recordCreate single recordupdate_dataverse_recordUpdate by IDdelete_dataverse_recordDelete by IDquery_dataverseOData and FetchXMLcreate_dataverse_table_from_listSP to DV schemasync_sharepoint_to_dataverseUpsert syncmigrate_sharepoint_list_to_dataverseFull pipeline
Security & Diagnostics
test_network_connectivityEndpoint healthtroubleshoot_mcpMCP health checkcheck_throttling_statusRate limit checkdetect_and_configure_proxyProxy detectionscan_governance_issuesGovernance scanaudit_external_sharingSharing audit report
Utilities & Forms
create_powershell_scriptPowerShell generationcreate_sharepoint_hosted_formSP-hosted formscreate_sharepoint_agentCopilot agentcreate_document_libraryDocument librariesgenerate_sample_dataTest data generationsearch_sharepointCross-site searchlist_power_apps_connectionsConnection listconvert_form_keep_styleForm conversion
Troubleshooting
Common issues and their solutions:
| Problem | Cause | Solution |
|---|---|---|
| MCP not showing in Claude Desktop | Configuration path is incorrect | Use double backslashes \\ in Windows file paths |
Auth failed error | Incorrect credentials | Verify Tenant ID, Client ID, and Client Secret in env block |
403 Access Denied | Missing API permissions | Grant admin consent for all permissions in Azure Portal |
power.config.json not found | pac CLI writes to wrong directory | Use scaffold_and_deploy_code_app which writes the config directly |
Failed to fetch in Code App | CORS blocks cross-origin requests | Run pac code add-data-source locally to generate SDK service files |
| MCP timeout error (-32001) | Tool execution exceeds default timeout | Set "timeout": 300000 in your Claude Desktop config |
DATAVERSE_URL not set | Environment variable missing | Add DATAVERSE_URL to the env block in your config file |
| npm or vite not found | PATH does not include Node.js | Install Node.js: winget install OpenJS.NodeJS.LTS |

Comments
Post a Comment