Skip to main content
Glama
mcp-server-sharepoint

mcp-server-sharepoint

mcp-server-sharepoint

PyPI version Python versions Downloads Licence CI Coverage Contributions welcome

In one sentence: an MCP server that lets AI coding agents like Claude Code edit files in your SharePoint document libraries the same way a careful human would — with proper checkout, comments, version history, and lock conflicts — instead of overwriting things and breaking your audit trail.

What is this for?

You have important documents in SharePoint — ISO 27001 controls, contract templates, ISMS records, runbooks, a quality manual. They have version history, audit trails, retention policies, and someone above you cares that they stay compliant.

You'd love to let AI agents help you draft and update these documents — they're great at it. But every other "AI + SharePoint" tool you've tried makes the audit log say "a robot named rclone updated this file at 03:42 with no comment" — which means your auditor has questions.

mcp-server-sharepoint makes the audit log say what actually happened: "David Koller updated this file at 14:32. Comment: ‘Tightened control wording for A.5.1 per CISO review.’ Version: 3.5 → 3.6 (minor)." Because the AI agent uses the same Microsoft-blessed checkout/checkin model a human Office user would.

Concretely, the agent gets these tools:

Tool

What the agent does

What ends up in SharePoint

sp_search_query, sp_drive_folder_list, sp_drive_file_read

finds and reads files

nothing changes

sp_drive_file_checkout

acquires a checkout lock + downloads

"checked out by you" appears for everyone else

sp_drive_file_checkin

uploads + checks in with a comment

a real new version with a real comment in the audit log

sp_drive_file_checkout_discard

discards a checkout

lock released, no version created

sp_drive_checkout_list

shows what's currently checked out by this agent

nothing changes

Every action is attributed to the human who signed in once via Microsoft's standard Device Code login. No service-account "robot" identity. No silent overwrites. No broken locks. Lock conflicts are reported as conflicts. ETag checks catch concurrent edits before they clobber.

Related MCP server: m365-mcp-server

Installation

pip install mcp-server-sharepoint
# or, with uv (recommended):
uv tool install mcp-server-sharepoint
# or, on the fly without installing globally:
uvx mcp-server-sharepoint --help

Requires Python 3.11+. Works on Linux, macOS, Windows.

Quickstart

1. Sign in once (out of band)

uvx mcp-server-sharepoint login

Output looks like:

Sign in to mcp-server-sharepoint via the Device Code flow:
Open the URL in a browser and type the code.

     URL:   https://login.microsoft.com/device
     Code:  D2LKUY4AV

Waiting for sign-in...

Open the URL in any browser, type the code, sign in with your M365 account. Your refresh token is cached locally — see Token storage. The MCP server itself never blocks for human interaction afterwards.

2. Wire it into Claude Code

In your project's .mcp.json:

{
  "mcpServers": {
    "sharepoint": {
      "command": "uvx",
      "args": ["mcp-server-sharepoint"]
    }
  }
}

Restart Claude Code. The agent now has sp_search_query, sp_drive_folder_list, sp_drive_file_read, sp_drive_checkout_list available — read-only by default.

3. Enable writes (when you're ready)

{
  "mcpServers": {
    "sharepoint": {
      "command": "uvx",
      "args": ["mcp-server-sharepoint"],
      "env": { "SP_ALLOW_WRITES": "true" }
    }
  }
}

Now sp_drive_file_checkout, sp_drive_file_checkin, sp_drive_file_checkout_discard are also available.

3a. Restrict the tool surface (optional)

If your project only needs a subset of SharePoint — say, document files but not SharePoint Lists — set SP_TOOL_GROUPS to register only the relevant tool groups. Reduces LLM tool-selection error by hiding tools the agent never needs.

{
  "mcpServers": {
    "sharepoint": {
      "command": "uvx",
      "args": ["mcp-server-sharepoint"],
      "env": {
        "SP_TOOL_GROUPS": "drive,search,site",
        "SP_ALLOW_WRITES": "true"
      }
    }
  }
}

Six groups available: auth, site, drive, list, share, search. Default (unset) registers all of them. auth is always included regardless — every other call needs it. Unknown group names cause a loud non-zero startup exit so typos surface immediately.

SP_TOOL_GROUPS is orthogonal to SP_ALLOW_WRITES — group selection picks which categories register; the writes flag decides whether the mutating tools within each category register.

4. Try it

You:    Find our latest ISO 27001 control A.5.1 policy in SharePoint.
Agent:  [calls sp_search_query → finds it]
        Found "iso27001-A.5.1.md" at https://contoso.sharepoint.com/...

You:    Read it, suggest two improvements based on the new revision of the standard.
Agent:  [calls sp_drive_file_read → reads file → suggests in chat]

You:    Apply them and save with a comment summarising the changes.
Agent:  [calls sp_drive_file_checkout → modifies → sp_drive_file_checkin with comment]
        Saved version 1.4. Comment recorded: "Tightened wording per ISO 27001:2022 to match new control objective; added cross-reference to A.5.2."

Each tool call gets a permission prompt in Claude Code (you can mark trusted ones as "always allow" per session). Read tools are flagged read-only; write tools are flagged destructive — you see the difference.

What it can do, in detail

Read tools (always available)

Tool

Purpose

sp_search_query(query, site?, folder?, file_type?, modified_after?)

KQL-style search across SharePoint sites the user has access to. Returns hits with name, path, web URL, last-modified date, author.

sp_drive_folder_list(url)

List a SharePoint folder's children (files + sub-folders) with size, type, last-modified. URL is the human-readable web URL.

sp_drive_file_read(url)

Download a file's content to a local temp file with the original extension preserved. Read-only — does NOT acquire a checkout.

sp_drive_checkout_list(verify=False)

Show what files this agent currently has checked out, when, and where the local working copies are. With verify=True, additionally queries SharePoint to confirm the server-side lock state — adds server_locked (true/false/null) and lock_holder (display name) to each entry. Costs one Graph call per registry entry.

sp_site_list(query?)

Discover SharePoint sites the user can see. query is a free-text site-name search; omit to list all. Useful as the agent's starting point when no site URL is known yet.

sp_site_followed_list()

List sites the user has Followed in SharePoint — a curated "my SharePoint" entry point. Not available in service-principal mode (no signed-in user).

sp_site_drive_list(site_url)

List the document libraries (drives) on a site — default Shared Documents plus Site Assets, Style Library, and any custom libraries. Most read/write tools accept URLs into any library transparently; sp_site_drive_list is the discovery step when the agent doesn't yet know which libraries exist.

sp_site_trash_list(site_url)

List items in the SharePoint site's recycle bin (id, name, size, deleted_date_time, deleted_from_location, deleted_by). Read-only. Uses Graph beta endpoint — see note below.

sp_list_list(site_url)

List all SharePoint Lists on a site (id, name, display_name, web_url, description, template).

sp_list_column_list(list_url)

Schema of a SharePoint List — column definitions (name, type, required, hidden, etc.). list_url shape: https://<host>/sites/<name>/Lists/<list-name>.

sp_list_item_list(list_url, filter?, top?)

List items in a SharePoint List with full fields expansion. filter is an optional OData expression like "fields/Status eq 'Open'".

sp_list_item_get(list_url, item_id)

Fetch a single SharePoint List item with all expanded fields.

sp_share_permission_list(url)

List who has access to a SharePoint file, folder, or site. Pass a site URL for site-level permissions or any item URL for that item's permissions. Returns each permission with id, roles (read/write/owner), grantee ({type, display_name, email, link_type, link_scope, link_web_url}), and inherited flag. Read-only.

sp_share_link_list(url)

List existing sharing links on a SharePoint file or folder — id, web_url (the share URL), type, scope, roles. Read-only. Use sp_share_link_create / sp_share_link_revoke for the write side.

sp_site_page_list(site_url)

List all modern SharePoint Pages (Site Pages) on a site — id, name, title, web_url, description, page_layout, last_modified.

sp_site_page_read(page_url)

Fetch a single SharePoint Page including its canvasLayout (sections, columns, web parts) as raw JSON. page_url shape: https://<host>/sites/<name>/SitePages/<page>.aspx.

sp_drive_change_track(scope_url, since?)

Microsoft Graph delta query — returns items in the site's default drive that changed since the optional cursor. First call (no cursor) returns the full item set + an initial cursor. Subsequent calls with the cursor return only created/modified/deleted items since. Cursor is opaque — store it (typically in the agent's conversation memory) and pass it back. Stale cursor surfaces as 410 Gone; drop it and re-sync from scratch.

Non-default libraries

URLs into non-default document libraries (Site Assets, Style Library, custom libraries) work transparently across sp_drive_folder_list, sp_drive_file_read, sp_drive_file_checkout, sp_drive_file_checkin, sp_drive_file_upload, etc. The resolver tries the default Shared Documents drive first; on a 404, it lists the site's drives, matches the URL's first path segment to a library name, and retries against that library. One extra Graph round-trip per first-look-up at a non-default library — acceptable cost for the convenience.

Write tools (opt-in via SP_ALLOW_WRITES=true)

Tool

Purpose

sp_drive_file_checkout(url)

Acquire a server-side checkout lock + download the current content to a working-directory path. Other users see "checked out by you" until you save or release. Fails with a clear error if someone else already holds the lock.

sp_drive_file_checkin(url, comment, version="minor"|"major")

Upload your changes + check the file back in with an audit comment + new version. comment is required and must be non-empty — describes what changed for the audit log. ETag round-trip catches "someone else changed the file underneath us" and refuses to clobber.

sp_drive_file_checkout_discard(url)

Discard a pending checkout: drop the lock server-side and delete the local working copy. Use when you decide not to keep your edits.

sp_drive_file_checkout_bulk(urls)

Bulk variant of sp_drive_file_checkout — acquires checkouts on multiple files in parallel (up to 4 concurrent Graph calls per Microsoft throttling guidance). Returns one result per URL: {path, status: "ok"|"error", local_path?, error?}. Per-file failures don't abort the batch. Honors Retry-After on 429/503.

sp_drive_file_checkin_bulk(operations)

Bulk variant of sp_drive_file_checkin — each op {url, comment, version?}. Same parallel/error-isolation semantics as sp_drive_file_checkout_bulk. ETag round-trip applies per file.

sp_list_item_create(list_url, fields)

Create a new item in a SharePoint List. fields is a dict of column-name -> value pairs (use sp_list_column_list to inspect schema).

sp_list_item_update(list_url, item_id, fields)

Patch fields on an existing List item. Only keys present in fields are changed.

sp_list_item_delete(list_url, item_id)

Delete a List item — sends to recycle bin (recoverable for ~93 days).

sp_share_link_create(url, type="view", scope="organization", expires?, password?)

Create a sharing link. Conservative defaults: type="view", scope="organization". The agent must explicitly pass scope="anonymous" to make a public link — that's the most common ISMS-audit finding, so we don't make it the default. type="edit" grants WRITE to anyone with the URL within scope.

sp_share_link_revoke(url, link_id)

Revoke (delete) a sharing-link permission. After this call the share URL stops working. link_id comes from sp_share_link_create or sp_share_link_list.

Recycle bin: list-only, beta endpoint

sp_site_trash_list calls Microsoft Graph's /beta endpoint. The site-level recycle-bin listing has not yet been promoted to v1.0; the beta endpoint is stable enough that SharePoint's own web UI / admin center rely on it, but the schema can change. We pin to the documented shape and will migrate to v1.0 when it lands.

Restore is not implemented. Microsoft Graph doesn't currently expose a /restore action for site-recycle-bin items (only on SharePoint Embedded fileStorageContainer recycle bins). Use the SharePoint web UI to restore individual items; we'll add a restore tool once Microsoft surfaces the action or we add a SharePoint REST API fallback.

Large files

sp_drive_file_checkin uses Microsoft Graph's resumable upload session for files larger than 100 MB (configurable via SP_CHUNKED_UPLOAD_THRESHOLD_MB). Files at-or-below the threshold use a single-shot PUT /content for a faster path. Microsoft caps single-shot at 250 MB; the resumable path supports up to 250 GB. Chunks are 5 MiB and retry on transient 5xx / connection errors with exponential backoff.

Authentication

  • OAuth 2.0 Device Code flow against Microsoft Identity (default). You sign in once; the refresh token is cached locally and silently renewed (~60–90 days until full re-login).

  • Bring-your-own-app or use ours. XMV publishes a multi-tenant Entra app registration that's baked in as the default — same pattern as Azure CLI / GitHub CLI. Tenants with strict app-allowlisting can override via SP_CLIENT_ID and SP_TENANT_ID env vars.

  • Token storage is auto-detected at first use: OS keyring (macOS Keychain / Windows Credential Locker / Linux Secret Service) when available, mode-0600 plain JSON file as fallback (same convention as gh auth, aws configure). Optional encryption with SP_TOKEN_PASSPHRASE for paranoid setups or CI.

  • Multi-customer / multi-tenant: separate SP_PROFILE per tenant, each with its own token cache.

Work or school accounts only. This server requires a Microsoft 365 work or school account (Azure AD identity). Personal Microsoft accounts (outlook.com / hotmail.com / live.com / msn.com) cannot use it — SharePoint is a business-only product, Microsoft does not expose it to consumer identities at all. Even if a personal account were allowed past the consent screen, every /sites/... call would return 404. The XMV-hosted app registration's signInAudience is therefore deliberately scoped to AzureADMultipleOrgs, which makes Microsoft block the consumer-account login attempt up-front with a clear error message rather than letting users discover the limitation post-sign-in. The sister projects mcp-server-outlook and mcp-server-microsoft-tasks DO support personal accounts because Outlook.com mail / calendar and Microsoft To Do exist on the consumer side.

The agent can drive sign-in directly via two MCP tools — no terminal shell-out required:

  1. Agent calls sp_auth_status first. If status == "signed_in", just proceed; the user is already authenticated.

  2. Otherwise calls sp_auth_begin, which returns immediately with a user_code and verification_url. The agent surfaces these to the user and polls sp_auth_status until status flips to signed_in (or to a terminal expired / failed).

The user-facing chat output should look like:

CCQ8U66HZ

https://login.microsoft.com/devicelogin

Code first in its own code block (so long-press copy yields just the code, no labels), URL second on its own line as a plain auto-link (so it's tappable on mobile). The user copies the code, taps the link, pastes into the page that opens — minimum app-switching. The MCP tool's description tells the agent this; agents that follow it produce a clean mobile UX.

Limitation: pending sessions live in the MCP server process. If the server restarts mid-flow (Claude Code session ends, container redeployed) before the user enters the code, the session is lost — the agent must call sp_auth_begin again. Persisting the asyncio polling task across restarts is non-trivial and deferred; if you hit this, file an issue.

Manual fallback: CLI

For terminal use or scripting, the original CLI subcommands still work:

uvx mcp-server-sharepoint login --profile <name>
uvx mcp-server-sharepoint logout --profile <name>

Both write to the same token cache sp_auth_begin does — you can sign in via CLI once, then the MCP server uses the cached token without ever hitting sp_auth_begin.

Service-principal mode (unattended automation)

For CI / scheduled jobs where no human is in the loop, run with SP_AUTH_MODE=service-principal (or just set SP_CLIENT_SECRET — auto-detected). Required env vars: SP_CLIENT_ID, SP_CLIENT_SECRET, SP_TENANT_ID. The app registration must have Application Microsoft Graph permissions (Files.ReadWrite.All, Sites.ReadWrite.All) with admin consent recorded.

Tradeoff: every action is attributed to the application principal in SharePoint's audit log, NOT a real user. The compliance-friendly default stays delegated user auth — only switch when no human is in the loop.

Security model

Three layers of "don't accidentally damage anything":

  1. Your MCP client (Claude Code) prompts before each tool call by default. Read tools are flagged read-only; write tools are flagged destructive — you see the difference at the prompt.

  2. Read-only by default at our server. Without SP_ALLOW_WRITES=true, the write tools aren't even registered. The agent literally can't see them.

  3. sp_drive_file_checkin requires a non-empty audit comment. The agent has to articulate intent, and that lands in the SharePoint audit log.

The threat model is "your local OS account is trusted" — same as ~/.ssh/id_rsa, gh tokens, aws config. The tool isn't designed to defend against host compromise; it's designed to keep audit trails honest under normal use.

Roadmap

Version

Status

Theme

Highlights

v0.1

✅ released 2026-05-07

Audit-preserving doc edits

The seven sp_* tools above, three-layer test harness, Trusted-Publisher PyPI release pipeline, branch-protected main.

v0.2

✅ released 2026-05-07

Write-side polish

sp_drive_file_upload (upload new file), sp_drive_file_history + sp_drive_file_version_get (version-history access), sp_drive_file_checkout_bulk + sp_drive_file_checkin_bulk (bulk operations with concurrency cap), sp_drive_checkout_list(verify=True) server-side reconciliation, resumable uploads for files >100 MB (auto-switch), service-principal auth for unattended automation.

v0.3

✅ released 2026-05-07

Broader SharePoint surface

Site discovery (sp_site_list / sp_subsites / sp_site_followed_list), multi-library support + sp_site_drive_list, SharePoint Lists CRUD, recycle-bin listing (sp_site_trash_list), permissions inspection (sp_share_permission_list), sharing-link create/list/revoke (sp_file_share_*), modern Pages read/update (sp_site_page_list / sp_site_page_read / sp_page_update), Graph delta-query change tracking (sp_drive_change_track).

v0.4

🤔 maybe

Admin functions

Site / library / permission administration, IF customer demand emerges.

v1.0

🎯 stability lock-in

"API stable, production-tested"

After v0.x has been used in real customer environments for ~3–6 months without breaking changes. Not "more features" — a commitment that what you depend on today still works tomorrow.

The full ticket-by-ticket plan lives at the issues page.

Multi-profile pattern

For consultancy workflows with multiple SharePoint tenants, give each its own profile so the token caches don't collide:

{
  "mcpServers": {
    "sharepoint-acme": {
      "command": "uvx",
      "args": ["mcp-server-sharepoint"],
      "env": { "SP_PROFILE": "acme" }
    },
    "sharepoint-globex": {
      "command": "uvx",
      "args": ["mcp-server-sharepoint"],
      "env": { "SP_PROFILE": "globex" }
    }
  }
}

Sign each one in separately:

uvx mcp-server-sharepoint login --profile acme
uvx mcp-server-sharepoint login --profile globex

Tools appear in Claude as mcp__sharepoint-acme__sp_search_query etc. Cross-tenant accidents don't happen because the tokens are namespaced.

BYO Entra app registration

Tenants with strict app-allowlisting can override the bundled multi-tenant default:

{
  "mcpServers": {
    "sharepoint": {
      "command": "uvx",
      "args": ["mcp-server-sharepoint"],
      "env": {
        "SP_TENANT_ID": "<your-tenant-guid>",
        "SP_CLIENT_ID": "<your-app-registration-guid>"
      }
    }
  }
}

The app registration must be: multi-tenant or single-tenant, public client (no secret), Device Code flow allowed, with delegated permissions Files.ReadWrite.All, Sites.ReadWrite.All, User.Read, offline_access.

Token storage

Three backends, auto-detected at first use:

Tier

Backend

When

Setup

1

OS keyring

macOS Keychain / Windows Credential Locker / Linux with Secret Service

none

2

Plain file ~/.cache/sharepoint-mcp/<profile>/token.json mode 0600

Headless Linux default

none

3

Encrypted file (Fernet, Scrypt KDF)

When SP_TOKEN_PASSPHRASE is set

env var

Force a specific backend with SP_TOKEN_STORE=keyring|file|encrypted-file. See the spike doc for the rationale — short version: same security model as gh auth, aws configure, npm login.

Troubleshooting

"No usable credentials"

The cached token expired (refresh tokens last ~60–90 days) or never existed. Run:

uvx mcp-server-sharepoint login --profile <name>

"Cannot checkout: file is already checked out by another user"

Someone else (or a previous instance of your own agent) has the file locked. Wait, or in the SharePoint web UI go to the library → file → "Discard check-out".

"File changed under us between sp_drive_file_checkout and sp_drive_file_checkin"

Your agent had the file open, but someone else edited it before your save. Recover with:

sp_drive_file_checkout_discard(url)        # drop your stale working copy + lock
sp_drive_file_checkout(url)           # acquire fresh lock + content
# re-apply edits to the new content
sp_drive_file_checkin(url, comment="…", version="minor")

Linux: keyring fails / "Secret Service unavailable"

The plain-file backend kicks in automatically — no action needed. If you'd rather have encryption at rest:

export SP_TOKEN_PASSPHRASE='<some-strong-passphrase>'
uvx mcp-server-sharepoint login --profile <name>

Recovery after a crash

uvx mcp-server-sharepoint     # restart the server

In the agent, ask sp_drive_checkout_list — you'll see anything that was checked out before the crash. For each, either resume work (working file is still on disk; sp_drive_file_checkin works as normal) or drop it (sp_drive_file_checkout_discard).

The registry survives crashes; nothing is lost.

Development

git clone https://github.com/XMV-Solutions-GmbH/sharepoint-mcp.git
cd sharepoint-mcp
uv sync --extra dev

# Unit + integration (no real SharePoint), with coverage reporting
./tests/run_tests.sh

# Harness (real SharePoint sandbox; requires harness-profile login)
./tests/run_tests.sh harness

Renewing the harness token

The CI harness job authenticates via a refresh token stored as the GitHub repo secret SHAREPOINT_HARNESS_TOKEN_JSON. Microsoft Identity rotates refresh tokens roughly every 60-90 days, so this is a recurring monthly maintenance chore for the maintainer.

A one-command script handles the whole flow — Device Code login, /me smoke test, base64-encoding the cached token, gh secret set against the repo:

./scripts/renew-harness-token.sh

Walks through the Microsoft Device Code prompt, then uploads the new token to GitHub. After it finishes, CI's next harness run picks up the fresh token automatically. No other manual steps.

Document

What's in it

docs/app-concept.md

Vision, MVP scope, MCP tool surface, auth, conflict model

docs/testconcept.md

Three-layer test strategy (unit / integration / harness)

docs/RELEASING.md

How releases happen

ENGINEERING_PRINCIPLES.md

Project-agnostic engineering baseline

CLAUDE.md

Project-specific overrides

docs/spikes/

Design-decision history (httpx vs SDK, token storage, etc.)

Contributing

Contributions are welcome. Please read CONTRIBUTING.md and the Code of Conduct first.

Bug reports and feature requests go to GitHub Issues.

Licence

Dual-licensed under either of:

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Contact

Available Tools

21 tools
sp_auth_beginA

Initiate Microsoft Identity Device Code login for profile (default 'default'). Non-blocking: returns within ~1s with user_code + verification_url. A background task continues to poll Microsoft Identity and writes the token on success — the agent should poll sp_auth_status until status is 'signed_in', or until the user completes / cancels the flow.

Idempotency: if a pending session already exists for this profile, the existing session is returned unchanged unless force=True (which cancels and restarts).

AGENT_INSTRUCTIONS: Present the verification code to the user inside a fenced code block (so it can be copied with one click) and present the verification URL as a plain markdown link on its own line. Do not paraphrase, do not embed the code inside prose, do not wrap the URL in bold. Example:

Code:
```
ABCD-1234
```

Sign-in URL: https://login.microsoftonline.com/...

Rationale: in a chat UI, a code inside a fenced block gets a one-click copy button; a bare URL becomes clickable; bold-wrapped links and inline codes do not.

Inputs: force, profile. Returns: object

sp_auth_statusA
Read-onlyIdempotent

Return the current sign-in state for profile (default 'default'). Three states the agent can act on directly:

  • 'signed_in' — valid token on disk (regardless of how it got there: CLI login, prior tool-flow, or just refreshed silently). signed_in_user_upn populated. The agent can proceed.

  • 'pending' — Device Code flow in progress. user_code, verification_url, time_remaining_s populated.

  • 'none' — no token, no flow. Agent should call sp_auth_begin.

Recently-terminal sessions (expired / failed / cancelled) surface their error via the error field instead of falling back to 'none' — so the agent can render a specific failure message.

AGENT_INSTRUCTIONS: When status='pending', present the verification code to the user inside a fenced code block (so it can be copied with one click) and present the verification URL as a plain markdown link on its own line. Do not paraphrase, do not embed the code inside prose, do not wrap the URL in bold. Same format as sp_auth_begin.

Inputs: profile. Returns: object

sp_drive_change_trackA
Read-only

Return items in a SharePoint site's default drive that changed since the optional since cursor — Microsoft Graph delta query. First call (since=None) returns the full item set + an initial cursor. Subsequent calls with the cursor return only created/modified/deleted items since that cursor. Result: {items: [...], cursor: str}. The cursor is opaque — store it (the agent typically puts it in conversation memory or a scratchpad) and pass it back as since. A stale cursor surfaces as a 410 Gone error; drop it and call again with since=None for a full re-sync. Read-only.

Inputs: scope_url (required), since. Returns: object

sp_drive_checkout_listA
Read-onlyIdempotent

List the files this MCP profile currently has checked out (acquired via sp_drive_file_checkout). Returns each entry's original path, when checkout happened, and the local working-copy path. Read-only. With verify=True, additionally queries SharePoint to confirm the server-side lock state (server_locked + lock_holder fields); costs one Graph call per registry entry. Default verify=False is sub-second, registry-only — sp_drive_file_checkin's ETag round-trip catches divergence at write time.

Inputs: verify. Returns: result

sp_drive_file_historyA
Read-onlyIdempotent

List a SharePoint file's version history. Returns up to limit versions newest-first, each with id (use with sp_drive_file_version_get), last_modified, last_modified_by (display name or email), and size. Read-only. NOTE: per-version comments aren't currently exposed via Microsoft Graph v1.0 — they land in SharePoint's web UI version history but not in this response shape.

Inputs: url (required), limit. Returns: result

sp_drive_file_readA
Read-onlyIdempotent

Download a SharePoint file's content to a local temp file. Returns the absolute path of the temp file with the original extension preserved. Read-only — does NOT acquire a checkout/lock; use sp_drive_file_checkout for that. url is the file's human-readable web URL (e.g. from sp_search_query hits). The LLM consumes the file via filesystem tools (Read, Bash) — no base64 round-trip.

Inputs: url (required). Returns: result

sp_drive_file_version_getA
Read-onlyIdempotent

Download a specific historical version of a SharePoint file to a local temp file. Returns the absolute path. Use sp_drive_file_history first to find the version_id you want. Read-only — does NOT acquire a checkout, does NOT modify SharePoint state.

Inputs: url (required), version_id (required). Returns: result

sp_drive_folder_listA
Read-onlyIdempotent

List the immediate children of a SharePoint or OneDrive folder. url is the folder's human-readable web URL (e.g. from a previous sp_search_query hit's web_url, or the SharePoint web UI). Returns each child with name, type ('folder' or 'file'), size, last-modified date, and webUrl. Read-only — does not modify SharePoint state.

Inputs: url (required), limit. Returns: result

sp_list_column_listA
Read-onlyIdempotent

Return the column definitions (schema) of a SharePoint List. Each column: id, display_name, name (internal), description, required, hidden, read_only, indexed, type (text/choice/number/boolean/datetime/person/lookup/calculated/hyperlink/currency). list_url shape: https:///sites//Lists/. Read-only.

Inputs: list_url (required). Returns: result

sp_list_item_getA
Read-onlyIdempotent

Fetch a single SharePoint List item by id with all expanded fields. Returns id, created_date_time, last_modified_date_time, created_by, last_modified_by, web_url, fields (dict). list_url shape: https:///sites//Lists/. Read-only.

Inputs: item_id (required), list_url (required). Returns: object

sp_list_item_listA
Read-onlyIdempotent

List items in a SharePoint List with their full fields expanded. filter is an optional OData $filter expression (e.g. "fields/Status eq 'Open'"). top caps results (default 100, max 5000 per Graph). list_url shape: https:///sites//Lists/. Read-only.

Inputs: list_url (required), top, filter. Returns: result

sp_list_listA
Read-onlyIdempotent

List all SharePoint Lists on a site (Issue Trackers, Tasks, Custom Lists, etc.). Returns each list's id, name, display_name, web_url, description, created_date_time, last_modified_date_time, and template (e.g. 'genericList', 'documentLibrary', 'tasks'). Read-only.

Inputs: site_url (required). Returns: result

sp_search_queryA
Read-onlyIdempotent

Search SharePoint document libraries the signed-in user has access to. Returns matching files with name, path, webUrl, last-modified date, and author. Read-only. Filter args: site (URL), folder (path), file_type (extension like 'docx'), modified_after (ISO date). SCOPE: currently driveItem-only (files in document libraries). Searching List items or sites by content is not yet supported — use sp_list_item_list with an OData filter for List-item lookup, sp_site_list for site discovery.

Inputs: query (required), site, limit, folder, +2 more. Returns: result

sp_share_permission_listA
Read-onlyIdempotent

List who has access to a SharePoint file, folder, or site. Pass a site URL for site-level permissions or any item URL (file or folder) for that item's permissions. Returns each permission entry with id, roles (read/write/owner), grantee ({type, display_name, email, link_type, link_scope}), and inherited flag. Read-only — does not modify any permission state. Use this to answer 'who can see/edit this?' before suggesting changes or sharing links. SCOPE: all permission grants — direct user/group assignments, inherited site permissions, AND sharing links. To list only sharing links (and get their id for sp_share_link_revoke), use sp_share_link_list instead.

Inputs: url (required). Returns: result

sp_site_drive_listA
Read-onlyIdempotent

List all document libraries (drives) on a SharePoint site — default Shared Documents plus Site Assets, Style Library, and any custom libraries. site_url is the site's web URL. Returns each drive's id, name, web_url, description, drive_type, and quota. Most sp_drive_* tools accept URLs into any library transparently — sp_site_drive_list is the discovery step when the agent doesn't know which libraries exist yet.

Inputs: site_url (required). Returns: result

sp_site_followed_listA
Read-onlyIdempotent

List sites the signed-in user has marked as Followed in SharePoint. Useful 'my SharePoint' entry point for an agent starting from the user's curated list rather than guessing site URLs. Not available in service-principal auth mode (no signed-in user) — falls back to a clear error there. Read-only.

Inputs: no named parameters. Returns: result

sp_site_listA
Read-onlyIdempotent

Discover SharePoint sites the signed-in user has access to. query is a free-text site-name search (e.g. 'finance'); omit / leave empty to list all visible sites. Returns each site's id, name, web_url, description, last_modified. Read-only. Use as the entry point when the agent doesn't yet know which site URL to drill into.

Inputs: query. Returns: result

sp_site_page_listA
Read-onlyIdempotent

List all modern SharePoint Pages (Site Pages) on a site. Returns each page's id, name (filename), title, web_url, description, page_layout, thumbnail_web_url, last_modified, last_modified_by. Read-only.

Inputs: site_url (required). Returns: result

sp_site_page_readA
Read-onlyIdempotent

Fetch a single SharePoint Page including its canvasLayout (sections, columns, web parts) as JSON. page_url shape: https:///sites//SitePages/.aspx. Read-only.

Inputs: page_url (required). Returns: object

sp_site_trash_listA
Read-onlyIdempotent

List items in the SharePoint site's recycle bin. Returns each item's id, name, size, deleted_date_time, deleted_from_location (original folder), and deleted_by (display name). Read-only. NOTE: Microsoft Graph does not expose a restore action at site scope; items currently have to be restored via the SharePoint web UI. This tool uses Graph's /beta endpoint — the site-level recycle-bin API has not yet been promoted to v1.0. Schema may shift; we'll migrate when v1.0 lands.

Inputs: site_url (required), limit. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 21 tools

    Disambiguation5/5

    All 21 tools have clearly distinct purposes, covering authentication, drives, lists, sites, search, sharing, permissions, pages, and trash. Even related tools like sp_drive_file_read, sp_drive_file_checkout, sp_drive_file_history, and sp_drive_file_version_get are differentiated by their specific actions.

    Naming Consistency5/5

    All tools follow a consistent sp_{resource}_{action} pattern in snake_case (e.g., sp_auth_begin, sp_drive_folder_list, sp_site_trash_list). The naming is predictable and easily understood.

    Tool Count5/5

    With 21 tools, the set is well-scoped for the SharePoint domain. It covers authentication, multiple resource types (files, lists, sites, pages), and additional utilities like search, sharing, and permissions without being overwhelming or too sparse.

    Completeness2/5

    The tool surface is heavily read-only. Missing write operations include creating/updating/deleting files (e.g., sp_drive_file_checkin), list items, sites, sharing links, and pages. While the descriptions hint at some missing tools (e.g., sp_share_link_create), they are not implemented, leaving significant gaps for agent workflows.

    Maintenance

    ActivityMaintained
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      A production-ready MCP server that provides secure, delegated access to Microsoft 365 services including Email, SharePoint, OneDrive, and Calendar. It enables AI models to search messages, browse files, manage calendar events, and parse document contents using OAuth 2.1 authentication.
      MIT