Use a development tenant, Node.js 22 or later and Azure CLI. Register the preview SharePoint Embedded MCP server with a pinned version and --read-only, inspect its exposed tools and start with a status or documentation query. Read-only tool filtering does not remove the underlying identity's permissions or guarantee that authentication and bootstrap have no side effects. Use a separately authorised, pre-provisioned app if avoiding on-demand app creation is important.
What you need before connecting an agent
Microsoft announced the SharePoint Embedded MCP server on 1 December 2026. It is an open-source developer tool, still in preview, that runs on your own machine and lets a coding agent call SharePoint Embedded and Azure operations on your behalf: creating container types, scaffolding a sample app, searching documentation and so on. MCP (Model Context Protocol) is simply the standard way an agent discovers and calls tools like these.
The server uses your authorised identity. Bootstrap mode can provision an owning application on demand. Use an isolated development tenant from the beginning, inspect the consent request and prefer the least privileged supported identity. The read-only flag limits tool calls; it is not a tenant-level security boundary.
- Node.js 22 or later. The server's repository README lists 22, 24 and 26.
- The Azure CLI, signed in with az login --allow-no-subscriptions. The flag matters if your tenant is Microsoft 365 only and has no Azure subscription.
- An isolated Microsoft 365 development tenant and an authorised account. Microsoft lists Global Administrator or Application Administrator among setup prerequisites; do not give an agent permanent production administrative privileges.
- An MCP-compatible client. Microsoft's page gives setup instructions for GitHub Copilot in Visual Studio Code, Visual Studio, Claude Desktop, Cursor, Claude Code and Codex CLI. The steps below use Claude Code, with the VS Code equivalent after them.
- A development tenant from the first connection, not just the later building stage. Provisioning, consent and billing can affect real resources.
Sign in and register the server in read-only mode
These commands sign in, look up a package version and register a local MCP configuration. The server may launch to check connectivity, and consent or bootstrap operations can have tenant effects. Review the package and identity before connecting it; do not automatically approve consent or state-changing actions.
- Check your Node.js version. The output should be v22 or higher.
node --version - Sign in to the isolated development tenant with an authorised account. A browser window opens. Verify the tenant before any further operation.
az login --allow-no-subscriptions - Confirm which tenant and account the CLI is now using. If the tenant ID is not the one you expect, sign out and sign in again before going any further.
az account show - Look up the current published version of the package. The registration command uses npx with its -y option, which downloads and runs the latest package without asking. Pinning the version you have just looked up means the code running with your credentials only changes when you decide it should. Pinning matters more than usual here because the project is an early preview and its README notes that tool names and behaviour may change without notice.
npm view @microsoft/spe-mcp version - Register the server with Claude Code, replacing YOUR_VERSION with the version number from the previous step. The double dash separates Claude Code's own options from the command that starts the server, and the read-only option goes on the server's command line. With no scope specified, Claude Code stores the entry privately for you in the current project.
claude mcp add spe-readonly -- npx -y @microsoft/spe-mcp@YOUR_VERSION start --read-only - Inspect the connection using Claude Code's MCP controls. A connected entry proves transport only; it does not prove safe authorisation or that every operation will succeed.
claude mcp list
The same setup in VS Code or Claude Desktop
For GitHub Copilot in Visual Studio Code, add an entry to .vscode/mcp.json in your workspace, then use Copilot Chat in agent mode. Note that this file lives in the workspace, so think before committing it to a shared repository. Claude Desktop uses the same arguments inside an mcpServers entry in its claude_desktop_config.json file, which is under %APPDATA%\Claude on Windows and ~/Library/Application Support/Claude on macOS.
Replace YOUR_VERSION with the version you looked up earlier.
{
"servers": {
"spe-readonly": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@microsoft/spe-mcp@YOUR_VERSION", "start", "--read-only"]
}
}
}Check what the agent can and cannot do
Read-only mode is meant to advertise only read, list, get and search tools and to reject any change request. Rather than trusting the flag, spend two minutes proving it.
- Start a new Claude Code session and inspect the advertised tools using the client's MCP controls. Begin with a status or documentation query. If an operation asks to create an app or grant consent, stop and review the request. Do not treat a successful connection as proof that a fresh tenant can list container types without provisioning; use a separately authorised existing app if necessary.
- Use the MCP client's own tool inspection (or the documented MCP Inspector) to verify that read-only tools are exposed and that create, delete or deployment tools are absent. An agent's verbal description of tools is not proof. If unsafe tools appear, disconnect the server.
- Ask a documentation question, such as how container type permissions work. Check the returned Microsoft Learn references independently; a sourced answer does not prove working access to your tenant.
Moving from looking to building
Once the read-only entry behaves, add a second entry for building rather than editing the first. That keeps a safe configuration on hand and makes it obvious which one the agent is using. Two server instances must not share a data directory, because sharing it can overwrite cached sign-in and provisioning state. So give the building entry its own absolute path. The provisioning profile is a sensible starting point, but Microsoft's pages do not itemise what each profile contains, so ask the agent to list its tools afterwards and widen the profile only if something it genuinely needs is missing. Replace YOUR_VERSION and YOUR_ABSOLUTE_DATA_DIR before running the command.
State-changing tools have a confirmation gate, but that is not a substitute for human authorisation or least-privilege access. Review proposed actions and disable automatic approval. Only configure wider tools after a separate risk and permission review.
- Bootstrap mode creates the owning Microsoft Entra application in your tenant on demand. That is a real change to the tenant, which is the main reason to use a development tenant. If app creation is not authorised, stop and use pre-provisioned-app mode instead. It needs a public-client app you have created yourself, with admin-consented delegated permissions for FileStorageContainer.Selected, FileStorageContainerType.Manage.All and FileStorageContainerTypeReg.Manage.All.
- Provisioning can incur Azure charges. SharePoint Embedded is a metered service, and connecting a container type to standard billing ties it to an Azure subscription and resource group. Microsoft describes a free trial container type for evaluation but the pages we reviewed do not state its limits, so check its expiry before relying on it.
- The deploy tool runs azd up with prompts disabled, which can execute hooks defined in the project's azure.yaml. Read that file before you let the agent deploy, and note that the README warns that no-prompt mode is not owner approval.
- File and content tools, such as upload, search and sharing, sit behind a separate consent step. Leave it ungranted until you actually need the agent to touch container content, and never point it at containers holding real business documents while you are still experimenting.
- In the sample app the agent builds for you, container creation needs a confidential client, one that can hold a credential securely. If the front end is a single-page, mobile or desktop app, route container creation through a secure backend. Prefer delegated access for user-driven actions, where effective access is the overlap of the app's permissions and the user's container membership. An app-only token can reach every container its container type permissions allow, so keep those permissions to what the workload needs.
claude mcp add spe-build -- npx -y @microsoft/spe-mcp@YOUR_VERSION start --tools provisioning --data-dir YOUR_ABSOLUTE_DATA_DIRIf it will not connect or sign in
Most problems come from the runtime, the sign-in path or a leftover entry rather than from the agent.
- The server shows as failed in the list. Check node --version first, then run the server's help text directly. If that prints options, the package itself runs and the fault lies in the client configuration; if it errors, read the message, which will usually name the Node.js version or a network problem reaching the npm registry.
npx -y @microsoft/spe-mcp@YOUR_VERSION start --help - The browser sign-in never appears. On Linux without a display, and in CI, interactive sign-in is switched off by default. The README describes forcing it on or pre-authenticating from a terminal before restarting the server, so follow its authentication section for your setup.
- Sign-in succeeds but a billing step is blocked by Conditional Access. The README says to re-authenticate interactively for the Azure management scope, and that the server does not automate this step. Replace YOUR_TENANT_ID with your tenant ID.
az login --scope https://management.core.windows.net//.default --tenant YOUR_TENANT_ID - Redirect URI errors in a pre-provisioned app. The owning app registration needs http://localhost added under Mobile and desktop applications for interactive sign-in. URLs of a generated single-page app go under Single-page application, in App registrations then Authentication in the Microsoft Entra admin center.
- A saved prompt or allowlist returns UNKNOWN_TOOL. The README records a breaking rename of the app grant tools to the container_type_registration_app_grant family. Update the prompt or allowlist rather than the server.
- To remove the read-only entry from Claude Code, remove it by name. For other clients, delete the entry from the MCP configuration.
claude mcp remove spe-readonly
Technical terms explained
- app-only
- Access where an app calls an API as itself with its own credential and no signed-in user, so it holds whatever its permissions grant.
- bootstrap mode
- The server's default running mode. It uses your Azure CLI sign-in and can create the owning Microsoft Entra application on demand, so you need no app registration beforehand.
- confidential client
- An application that can keep a credential secret, typically server-side code. Browser, mobile and desktop apps are public clients because they cannot.
- container type
- A SharePoint Embedded definition that links an owning application to the containers it stores content in, and sets how they are billed and what permissions apply.
- delegated access
- Access where an app acts on behalf of a signed-in user, so effective rights are limited by what that user is allowed to do.
- MCP
- Model Context Protocol, an open standard that lets an AI client discover and call tools offered by a separate server, such as one that talks to SharePoint Embedded.
Sources and further reading
- Accelerate SharePoint Embedded development with coding agents - Microsoft 365 Developer Blog
- Use the MCP server to build apps with a coding agent - Microsoft Learn
- SharePoint Embedded MCP Server repository and README - GitHub
- SharePoint Embedded MCP Server security controls - GitHub
- Configure authentication and authorization for SharePoint Embedded - Microsoft Learn
- Connect Claude Code to tools via MCP - Claude Code documentation