MCP-Local-SharePoint-Server-Setup
Corporate SharePoint MCP — Finance Pilot M005L
This milestone keeps the MCP service local and read-only while using a OneDrive shortcut to expose an approved SharePoint folder under the signed-in Windows user's existing SharePoint access.
Added in M005L
sharepoint_list_folder(filters local OneDrive clutter such asdesktop.ini)sharepoint_inspect_excelsharepoint_read_excel_range.xlsxonly for this milestone100 MiB (configurable with
EXCEL_MAX_FILE_SIZE_MB) workbook caprange requests capped at 100 rows × 30 columns
Excel opened using
openpyxlread-only mode with cached formula values (data_only=True)all file paths must resolve beneath
SHAREPOINT_SYNC_ROOTno create/update/delete/move/rename tools
Related MCP server: ExcelReadMCP
Install/update dependencies
pip install -r .\requirements.txtRun tests
$env:PYTHONPATH = "$PWD\src"
pytest -qRun server
python -m sharepoint_mcp.serverTest the real synced workbook
In a second PowerShell window:
.\.venv\Scripts\Activate.ps1
$env:PYTHONPATH = "$PWD\src"
python .\scripts\test_excel_reader.pyThe script expects SalesDelivery Note.xlsx in the configured root. It inspects the workbook, reads A1:J10 from the first worksheet, and confirms ../ remains blocked.
M006L - Safe document discovery
This milestone adds sharepoint_search_files, a recursive metadata-only search
inside SHAREPOINT_SYNC_ROOT.
It searches:
file names
approved-root-relative paths
It deliberately does not open file contents during discovery. This avoids hydrating or parsing large OneDrive-backed workbooks simply to locate them.
Example:
sharepoint_search_files(
query="sales delivery",
extension="xlsx",
max_results=10
)The tool:
remains read-only
blocks
../traversalignores
desktop.ini,Thumbs.db, and temporary~$Office filescaps a request at 50 returned results
caps one scan at 10,000 files
returns relative paths rather than exposing the full local Windows path
Run:
pytest -q tests
python .\scripts\test_document_search.pyM007L - Content-aware Excel querying
Adds two read-only tools:
sharepoint_get_excel_columnssharepoint_find_excel_rows
The first discovers every named header in a worksheet. The second scans a bounded number of rows and returns matching records using one named business column.
Safety limits:
SharePoint sync root sandbox still enforced
.xlsxonlyworkbook opened read-only
at most 500,000 rows scanned per request
at most 100 matching rows returned
at most 20 returned columns
no edit, rename, move, delete, or upload capability
Example:
sharepoint_find_excel_rows(
relative_path="SalesDelivery Note.xlsx",
sheet_name="Data",
column_name="Packing Slip",
search_value="GRP0000124",
match_mode="equals",
return_columns_csv="Product Id,Packing Slip,Quantity"
)Live test:
pytest -q tests
python .\scripts\test_excel_content_query.pyM007.1 - Query completeness and continuation
This patch prevents a partial worksheet scan from being mistaken for a complete answer.
sharepoint_find_excel_rows now returns:
scan_completenext_start_rowworksheet_max_row
The default scan allowance is now 500,000 rows, enough to cover the current
443,759-row Finance workbook in one call. If a future worksheet exceeds the
bounded scan or the result cap is reached, Claude can continue with
start_row=next_start_row.
The reader also narrows the streamed Excel column window to only the filter column and requested output columns, reducing unnecessary work on wide sheets.
Run:
pytest -q tests
python .\scripts\test_excel_content_query.pyM008L - Multi-condition Finance queries and aggregations
Adds:
sharepoint_query_excelsharepoint_aggregate_excel
Multi-condition filters are passed as a bounded JSON array, for example:
[
{"column":"Business Unit","operator":"equals","value":"Dean"},
{"column":"Delivery Date","operator":"gte","value":"2026-01-01"},
{"column":"Delivery Date","operator":"lte","value":"2026-12-31"}
]Supported filter operators:
equals / not_equals
contains / starts_with / ends_with
gt / gte / lt / lte
is_blank / is_not_blank
Aggregations:
count
sum
avg
min
max
optional group_by_column
Guardrails:
maximum 8 filter conditions
maximum 500,000 scanned rows
maximum 100 returned query rows
maximum 20 returned columns
maximum 100 aggregation groups
aggregations refuse partial scans
strict SharePoint sync-root sandbox
.xlsxonlyread-only; no write/delete/move/upload tools
Run:
pytest -q tests
python .\scripts\test_finance_multiquery.pyM009L - Claude Desktop local connection
Adds a dedicated local stdio transport entry point:
python -m sharepoint_mcp.desktopThe HTTP development server remains available separately:
python -m sharepoint_mcp.serverClaude Desktop should launch the stdio process itself, so port 8000 is not required for the Desktop connection.
Generate a machine-specific config snippet:
$env:PYTHONPATH = "$PWD\\src"
python .\\scripts\\show_claude_desktop_config.pyThe generated JSON contains local executable/folder paths and read-only pilot settings only. It does not include Entra secrets.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceEnables AI models to search, read, and analyze Excel files from your local file system with support for multiple worksheets, text search, and JSON data conversion.4MIT
- Alicense-qualityDmaintenanceEnables reading and searching Excel files through MCP-compatible clients. Provides tools to retrieve workbook metadata, read sheet contents, and search across all sheets using absolute file paths.1MIT
- Flicense-quality-maintenanceProvides unified access to OneDrive and SharePoint through Microsoft Graph API, enabling file operations, SharePoint list management, Excel integration, and content search across personal and business Microsoft accounts.
- Flicense-qualityDmaintenanceEnables searching and retrieving files from SharePoint and OneDrive within Microsoft 365, with local caching for efficiency.11
Related MCP Connectors
Search, browse, and read your Dropbox files. Find documents by name or content, list folders, and…
Securely search and manage workspace context files for AI agents and teams.
Query your Google Sheets as structured JSON: list sheets and tabs, read schemas, filter rows.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mustawphar-Tusk/MCP-Local-SharePoint-Server-Setup'
If you have feedback or need assistance with the MCP directory API, please join our Discord server