SharePoint MCP Server
sharepoint-mcp
MCP server pre SharePoint Online — správa listov, knižníc, stĺpcov, pohľadov, položiek a súborov priamo z AI agenta.
Štruktúra projektu
sharepoint-mcp/
├── .env.example # Šablóna konfigurácie (skopíruj do .env)
├── package.json
├── tsconfig.json
└── src/
├── index.ts # MCP server + registrácia všetkých nástrojov
├── auth.ts # MSAL browser login + file token cache
├── sharepoint.ts # SharePoint REST klient (GET / POST / PATCH / DELETE / upload)
├── types.ts # Zdieľané TypeScript typy (ColumnSpec, ViewSpec)
├── column-types.ts # Mapovanie typov stĺpcov + buildFieldBody
└── tools/
├── lists.ts # Nástroje pre listy a knižnice
├── columns.ts # Nástroje pre stĺpce
├── items.ts # Nástroje pre položky
├── views.ts # Nástroje pre pohľady
└── files.ts # Nástroje pre súboryRelated MCP server: SharePoint MCP Server
Dostupné nástroje (22)
Nástroj | Popis |
| Nastaví SharePoint site URL pre aktuálnu reláciu |
| Zoznam všetkých listov a knižníc na site |
| Stĺpce, pohľady a metadáta listu / knižnice |
| Export kompletného SchemaXml (backup, klonovanie) |
| Vytvorí list alebo knižnicu so stĺpcami a pohľadmi |
| Vytvorí list zo SchemaXml reťazca |
| Vymaže list alebo knižnicu |
| Načíta položky (OData filter, select, orderby, paging) |
| Vytvorí novú položku |
| Aktualizuje položku podľa ID |
| Vymaže položku podľa ID |
| Pridá stĺpec do existujúceho listu |
| Zmení nastavenia stĺpca (názov, required, default, choices…) |
| Vymaže stĺpec |
| Zoznam pohľadov listu |
| Vytvorí nový pohľad so stĺpcami a filtrom |
| Aktualizuje pohľad (stĺpce, filter, row limit) |
| Zoznam súborov a priečinkov v knižnici |
| Nahrá súbor (base64 obsah) |
| Stiahne súbor (vráti base64 obsah) |
| Vymaže súbor |
Autentifikácia
Nevyžaduje app registration ani admin súhlas. Používa PnP Management Shell — well-known public client (31359c7f-bd7e-475c-86db-fdb8c937548e).
Pri prvom spustení sa otvorí prehliadač → prihlásenie pod vlastným účtom → jednorazový consent
Token je uložený v
~/.sharepoint-mcp/token-cache.json— ďalšie spustenia nevyžadujú loginJeden token pokrýva všetky site collections na tom istom tenante
Prepínanie medzi site collections: zavolaj
set_sites novou URL
Inštalácia a spustenie
# 1. Nainštaluj závislosti
npm install
# 2. Vytvor .env zo šablóny
cp .env.example .env
# Uprav SITE_URL v .env
# 3. Spusti vývojový server (voliteľné — Claude Code štartuje server sám)
npm run dev.env
SITE_URL=https://contoso.sharepoint.com/sites/mysiteKonfigurácia MCP v Claude Desktop
Pridaj do claude_desktop_config.json (zvyčajne %APPDATA%\Claude\claude_desktop_config.json alebo na Windows %LOCALAPPDATA%\Packages\Claude_...\LocalCache\Roaming\Claude\claude_desktop_config.json):
Možnosť 1 — skompilovaný build (odporúčané)
Najprv sprav build projektu:
npm run buildPotom pridaj do konfigurácie (uprav cestu podľa svojho umiestnenia projektu):
{
"mcpServers": {
"sharepoint": {
"command": "node",
"args": ["C:/Users/Lukas/Documents/AI Projects/sharepoint-mcp/dist/index.js"]
}
}
}Po každej zmene kódu treba znovu spustiť npm run build.
Možnosť 2 — priamo TypeScript cez tsx (len pre vývoj)
{
"mcpServers": {
"sharepoint": {
"command": "npx",
"args": ["tsx", "C:/Users/Lukas/Documents/AI Projects/sharepoint-mcp/src/index.ts"]
}
}
}Pozor:
cwdv konfigurácii Claude Desktop nefunguje spoľahlivo — vždy používaj absolútnu cestu vargs.
Po uložení reštartuj Claude Desktop — server sa spustí automaticky pri prvom volaní nástroja.
Tip: Ak pracuješ na viacerých site collections, stačí na začiatku konverzácie zavolať
set_sites príslušnou URL. Token sa znovu použije, prehliadač sa neotvorí.
Typy stĺpcov
Typ | Popis | Voliteľné parametre |
| Jednoriadkový text | — |
| Viacriadkový text |
|
| Číslo |
|
| Mena |
|
| Dátum a čas |
|
| Áno / Nie |
|
| Výber jednej hodnoty |
|
| Výber viacerých hodnôt |
|
| People picker |
|
| Odkaz | — |
| Vypočítaný stĺpec |
|
Available Tools
21 toolsadd_columnB
Add a new column to an existing list or library. The column is automatically added to the default view unless addToDefaultView is false.
Inputs: listName (required), column (required), addToDefaultView.
create_itemB
Create a new item in a list. Pass field values as key-value pairs using internal column names. For person fields use the format {FieldNameId: userId}. For date fields use ISO 8601 strings.
Inputs: listName (required), fields (required).
create_listA
Create a new SharePoint list or document library with optional columns and views. Columns are described using structured specs (type, choices, required, indexed, etc.). New columns are automatically added to the default view.
Inputs: name (required), type, description, columns, +1 more.
create_list_from_xmlA
Create a list from a full SharePoint SchemaXml string (e.g. obtained from get_list_schema_xml). Useful for cloning or restoring a list.
Inputs: name (required), schemaXml (required), description.
create_viewC
Create a new view for a list or library with specified columns, row limit, and optional CAML filter.
Inputs: listName (required), name (required), columns (required), isDefault, +2 more.
delete_columnA
Delete a column from a list (by internal name). Cannot delete read-only or sealed columns.
Inputs: listName (required), internalName (required).
delete_fileB
Permanently delete a file from a document library.
Inputs: serverRelativeUrl (required).
delete_itemC
Delete a list item by its numeric ID.
Inputs: listName (required), id (required).
delete_listC
Permanently delete a list or document library.
Inputs: listName (required).
download_fileC
Download a file from SharePoint. Returns base64-encoded content.
Inputs: serverRelativeUrl (required).
get_itemsC
Query items in a list. Supports OData $filter, $select, $orderby, $top, $skip, $expand.
Inputs: listName (required), filter, select, orderBy, +3 more.
get_list_schemaA
Get the full schema of a list or library: all columns (type, required, default, indexed), all views, and list metadata. Works on both lists (baseTemplate 100) and document libraries (101).
Inputs: listName (required).
get_list_schema_xmlA
Export the full SharePoint SchemaXml of a list or library. The XML contains every field, view, content type, and JSON formatting definition. Useful for backup or cloning.
Inputs: listName (required).
get_viewsC
List all views of a list or library with their columns, filters, and row limits.
Inputs: listName (required).
list_filesC
List files and sub-folders inside a document library or a specific folder within it.
Inputs: libraryName (required), folderPath.
list_listsA
List all lists and document libraries in the SharePoint site. Returns name, id, type (list / documentLibrary), item count, etc.
Inputs: includeHidden.
set_siteA
Set the SharePoint site URL to work with. Must be called before any other tool if SITE_URL is not set in .env.
Inputs: siteUrl (required).
update_columnC
Update settings of an existing column (display name, description, required, default value, indexed, choices).
Inputs: listName (required), internalName (required), updates (required).
update_itemC
Update fields of an existing list item by its numeric ID.
Inputs: listName (required), id (required), fields (required).
update_viewC
Update an existing view: change columns, CAML query, row limit, or make it the default.
Inputs: listName (required), viewName (required), columns, query, +2 more.
upload_fileC
Upload a file to a document library. Content must be base64-encoded.
Inputs: libraryName (required), fileName (required), content (required), folderPath, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Each tool has a clearly distinct purpose targeting specific SharePoint operations like list management, item handling, file operations, or schema manipulation. There is no significant overlap; for example, create_list and create_list_from_xml serve different creation methods, and get_list_schema vs. get_list_schema_xml provide different output formats.
All tool names follow a consistent verb_noun pattern using snake_case, such as create_item, delete_file, and update_view. This uniformity makes the tool set predictable and easy to navigate, with no deviations in naming conventions.
With 21 tools, the count is slightly high but reasonable for a comprehensive SharePoint server covering lists, items, files, columns, and views. It includes all essential CRUD operations and advanced features like schema handling, which justifies the breadth without feeling excessively bloated.
The tool set provides complete coverage for SharePoint operations, including full CRUD for lists, items, files, columns, and views, along with utilities for schema management, querying, and site configuration. There are no obvious gaps; agents can perform all typical workflows without dead ends.
Maintenance
Related MCP Connectors
One place to build, share, and govern the skills and tools your AI agents use at work.
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Connect AI agents to 1000+ apps with managed authentication and tool-calling.
Connect any AI agent to 1,000+ apps and 27,000+ actions through one remote MCP server (OAuth).
Related MCP Servers
- AlicenseDqualityDmaintenanceProvides access to organizational Sharepoint documents through the Microsoft Graph API, enabling search and retrieval of Sharepoint content for AI assistants.115 npm21ISC
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Microsoft SharePoint sites, document libraries, and files through the Microsoft Graph API. Supports browsing, searching, uploading/downloading files, managing lists, and creating sharing links with secure OAuth authentication.3MIT
- AlicenseNot gradedqualityDmaintenanceEnables browsing and interacting with Microsoft SharePoint sites and documents through Microsoft Graph API, supporting file search, site listing, document library browsing, and file content retrieval with OAuth2 authentication.56 npm11MIT
- AlicenseAqualityDmaintenanceProvides Claude with access to Microsoft SharePoint via the Microsoft Graph API, enabling folder management, document operations (upload, download, read, update, delete), and metadata management with secure OAuth 2.0 authentication.161MIT