Simplify MCP server to stdio-only (local desktop use)

Drop the Streamable HTTP transport and direct express dependency so the server has no network listener and cannot be reached from web chat — matches the desktop-only use case. Update README/.env.example accordingly. (express remains only as a transitive dep of the MCP SDK; unused.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
ang3l12
2026-06-16 14:09:12 -06:00
parent 89835d9498
commit f65cad865d
5 changed files with 236 additions and 685 deletions

View File

@@ -6,6 +6,10 @@ reuses the same core client as the skill
(`../.claude/skills/sharepoint-lists/scripts/lib/graph.mjs`) — one source of
truth for the Graph logic.
**Transport: stdio only.** This server is meant to run locally and be launched
by a local Claude app (Claude Desktop / Claude Code / Cowork). It has no network
listener by design, so it cannot be reached remotely or from web chat.
## Tools
| Tool | Access | Purpose |
@@ -30,52 +34,38 @@ cp .env.example .env # then fill in SP_TENANT_ID / SP_CLIENT_ID / SP_CLIENT
```
Credentials and the optional `SP_SITE_URL` default are documented in
`../.claude/skills/sharepoint-lists/references/setup.md`.
## Run
**stdio** (Claude Desktop / Claude Code / Cowork — local):
```bash
npm start # node index.mjs
```
**Streamable HTTP** (for a hosted/remote connector):
```bash
npm run start:http # node index.mjs --http → http://localhost:3838/mcp
```
`../.claude/skills/sharepoint-lists/references/setup.md`. The server loads
`mcp-server/.env` automatically (by its own path), so the client app does not
need to pass credentials.
## Connect it
### Claude Code
A project `.mcp.json` at the repo root already registers this server. From the
repo root, Claude Code will offer to start it (approve the prompt). Ensure
`mcp-server/.env` is filled in first.
### Claude Desktop (stdio)
Add to `claude_desktop_config.json`:
### Claude Desktop (primary)
Add an entry to `claude_desktop_config.json`
(`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS),
then fully quit and reopen Claude Desktop:
```json
{
"mcpServers": {
"sharepoint-lists": {
"command": "node",
"command": "/opt/homebrew/bin/node",
"args": ["/absolute/path/to/Claude-SharepointLists/mcp-server/index.mjs"]
}
}
}
```
### Claude.ai web (remote connector)
Run with `--http` and expose it over **HTTPS** with authentication (a reverse
proxy / tunnel, plus typically OAuth). claude.ai cannot reach `localhost`, and
custom connectors expect an authenticated HTTPS MCP endpoint — see the repo
README's "Remote hosting" notes before exposing this publicly.
Use the absolute path to `node` (Claude Desktop doesn't inherit your shell PATH).
### Claude Code
The project `.mcp.json` at the repo root already registers this server; from the
repo root, Claude Code will offer to start it. Ensure `mcp-server/.env` is filled in.
## Notes
- App-only auth means there is no per-user permission check — every caller of
this server acts as the app. Don't expose it unauthenticated.
- App-only auth means there is no per-user permission check — every caller acts
as the app. Keeping this stdio-only (no network listener) is the intended
containment.
- Field formats for writes (person/lookup/choice/date) are documented in
`../.claude/skills/sharepoint-lists/references/graph-api.md`.