Add MCP server (stdio + HTTP) reusing the skill's Graph client

New mcp-server/ exposes SharePoint Lists as MCP tools (test, list_lists, get_columns, list_items, get_item, create/update/delete_item) via the same graph.mjs core. Supports stdio (Claude Desktop/Code/Cowork) and Streamable HTTP (--http). SP_READONLY gates write tools. Adds project .mcp.json and ignores build artifacts. Verified end-to-end live over stdio and HTTP initialize.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
ang3l12
2026-06-16 14:02:11 -06:00
parent fd957177b9
commit 89835d9498
7 changed files with 1993 additions and 0 deletions

13
mcp-server/.env.example Normal file
View File

@@ -0,0 +1,13 @@
# Copy to ".env" in this folder and fill in. Git-ignored — never commit real values.
SP_TENANT_ID=00000000-0000-0000-0000-000000000000
SP_CLIENT_ID=00000000-0000-0000-0000-000000000000
SP_CLIENT_SECRET=your-client-secret-value-here
# Optional: default site so tools can omit the `site` argument.
# SP_SITE_URL=https://contoso.sharepoint.com/sites/Marketing
# Optional safety: set to true to expose ONLY read tools (no create/update/delete).
# SP_READONLY=false
# Optional: HTTP port when running with --http (default 3838).
# PORT=3838