@softeria/ms-365-mcp-server 0.181.1 → 0.181.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.dockerignore CHANGED
@@ -13,3 +13,4 @@ coverage
13
13
  .token-cache.json
14
14
  .selected-account.json
15
15
  .mcp.json
16
+ .remember
package/Dockerfile CHANGED
@@ -20,4 +20,10 @@ RUN npm ci --ignore-scripts --omit=dev
20
20
 
21
21
  COPY --from=builder /app/dist /app/dist
22
22
 
23
+ # The process holds tenant-scoped Graph credentials, so it runs as the unprivileged
24
+ # `node` user. /app is handed to it because the server may write runtime state
25
+ # (the token cache, the selected account) to the working directory.
26
+ RUN chown -R node:node /app
27
+ USER node
28
+
23
29
  ENTRYPOINT ["node", "dist/index.js"]
package/README.md CHANGED
@@ -1058,8 +1058,8 @@ per-request.
1058
1058
 
1059
1059
  The signing key is optional. Without one, minted URLs are just `/attachment?t=<ticket>` and
1060
1060
  any HTTP client can fetch them; the ticket alone authorises redemption. Set a key only if
1061
- the fetcher verifies the `dgk`/`dgx`/`dgs` signature (see below), such as a docglean-mcp
1062
- sidecar, which will refuse an unsigned URL. Setting `_KEY_ID` without a key, or a `_KEY_FILE` that is
1061
+ the fetcher verifies the `dgk`/`dgx`/`dgs` signature (see below) and will refuse an
1062
+ unsigned URL. Setting `_KEY_ID` without a key, or a `_KEY_FILE` that is
1063
1063
  empty or unreadable, fails at startup.
1064
1064
 
1065
1065
  ### Splitting the attachment listener
@@ -1130,7 +1130,7 @@ services:
1130
1130
  --http 10.89.0.2:3000 --trust-proxy-auth
1131
1131
  --enable-attachment-urls
1132
1132
  --attachment-port 3001 --attachment-host 10.89.1.2
1133
- docglean:
1133
+ converter:
1134
1134
  networks: [convert-net]
1135
1135
  ```
1136
1136
 
@@ -1165,15 +1165,13 @@ What authorises redemption _here_ is the ticket. Verifying the signature on the
1165
1165
  would prove only that we minted the URL — which the ticket already proves — while coupling
1166
1166
  redemption to the sidecar's clock and to the key surviving a restart.
1167
1167
 
1168
- The wire format is [docglean-mcp](https://github.com/msoukhomlinov/docglean-mcp)'s
1169
- `signing.py` (`canonical_string`), and `src/lib/url-signing.ts` is a port of it. The
1170
- canonical string is `\n`-joined: `v1`, lowercased scheme, lowercased host, the port always
1171
- explicit, the path, the remaining query with `dgk`/`dgx`/`dgs` removed and the rest sorted
1172
- and re-encoded, and the expiry. The test vectors in
1173
- `test/attachment-url-signing.test.ts` were verified against the Python implementation byte
1174
- for byte — three places where the obvious JavaScript disagrees with Python (`!*'()`
1175
- escaping, `+` decoding as a space, and code-point vs UTF-16 sort order) are why that check
1176
- exists rather than being assumed.
1168
+ The wire format is a `v1` canonical-string HMAC over the minted URL, implemented in
1169
+ `src/lib/url-signing.ts`. The canonical string is `\n`-joined: `v1`, lowercased scheme,
1170
+ lowercased host, the port always explicit, the path, the remaining query with `dgk`/`dgx`/`dgs`
1171
+ removed and the rest sorted and re-encoded, and the expiry. The test vectors in
1172
+ `test/attachment-url-signing.test.ts` pin the format byte for byte — including the three
1173
+ places where the obvious JavaScript encoding is wrong (`!*'()` escaping, `+` decoding as a
1174
+ space, and code-point vs UTF-16 sort order) — so the check exists rather than being assumed.
1177
1175
 
1178
1176
  The ticket travels in the **query, not the path**, because the verifying sidecar keeps a
1179
1177
  fetched URL's path in its error messages and strips the query.
@@ -67,27 +67,34 @@ repeated conversion, particularly OCR, can produce different text; fresh URLs al
67
67
  not guarantee a stable snapshot. Restart or report that uncertainty instead of claiming
68
68
  gap-free coverage.
69
69
 
70
- ## Optional worked example: Docglean 0.1.3
71
-
72
- [Docglean](https://github.com/msoukhomlinov/docglean-mcp/tree/v0.1.3) is one possible
73
- processor, not a dependency. Its `probe_document(uri, auth_profile?)` can help choose a
74
- selection; `convert_to_markdown(uri, max_chars, offset=0, pages?, auth_profile?)` converts
75
- directly. Authentication-profile arguments are advertised only when configured. Every
76
- call downloads the source anew; a `pages` selection narrows conversion, not download size.
77
- Supported selection units depend on format, and some formats reject `pages`.
78
-
79
- For a PDF selection, call `convert_to_markdown` with a freshly minted URL as `uri`,
80
- `pages: "2"`, and `max_chars: 2000`. Preserve its native `markdown`, `next_offset`,
81
- `returned_chars`, `total_chars`, `content_status`, `format`, `pages_total`,
82
- `pages_returned`, `source_truncated`, and any `ocr` / `pdf_classification` evidence.
83
- If needed, mint a fresh URL and call again with the exact `next_offset` as `offset`,
84
- keeping `pages: "2"` and extraction settings unchanged. `max_chars` is a per-call output
85
- budget and may change without recomputing the returned offset.
86
-
87
- `next_offset: null` exhausts only the Markdown produced. `source_truncated` reports
88
- known CSV/workbook row-cap omissions; `false` does not guarantee source coverage.
89
- Inspect `content_status` and OCR evidence such as skipped pages/reasons or unread frames.
90
- Document-level classification is not proof that a selected range was fully read.
70
+ ## Optional worked example: a bring-your-own converter
71
+
72
+ Any converter MCP server that accepts a source URL is a possible processor, not a
73
+ dependency. The tool names and result fields below are illustrative of a URL-fetching
74
+ text converter: use the names, arguments and fields your converter actually advertises
75
+ (see the discovery guidance above), and preserve whatever it returns.
76
+
77
+ Suppose the converter advertises a probe tool (`probe(uri, …)`) that reports the
78
+ source's format and extent, and a convert tool
79
+ (`convert(uri, max_chars, offset=0, pages?)`) that fetches the source and returns
80
+ produced text plus a continuation offset. If it also advertises authentication-profile
81
+ arguments for sources that need their own credentials, pass them as the converter
82
+ documents. Every call downloads the source anew; a `pages` selection narrows
83
+ conversion, not download size. Supported selection units depend on format, and some
84
+ formats reject `pages`.
85
+
86
+ For a PDF selection, call the convert tool with a freshly minted URL as `uri`,
87
+ `pages: "2"`, and `max_chars: 2000`. Preserve its native result fields: the produced
88
+ text, the continuation offset, produced and total character counts, content status,
89
+ format, page counts, source truncation, and any OCR or classification evidence. If
90
+ needed, mint a fresh URL and call again with the exact offset the converter returned,
91
+ keeping `pages: "2"` and the extraction settings unchanged. `max_chars` is a per-call
92
+ output budget and may change without recomputing the returned offset.
93
+
94
+ A null (or absent) continuation offset exhausts only the text produced. A source-truncation
95
+ flag reports known row-cap omissions; its absence does not guarantee source coverage.
96
+ Inspect the content status and OCR evidence such as skipped pages/reasons or unread
97
+ frames. Document-level classification is not proof that a selected range was fully read.
91
98
 
92
99
  ## Verification and limits
93
100
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@softeria/ms-365-mcp-server",
3
3
  "mcpName": "io.github.Softeria/ms-365-mcp-server",
4
- "version": "0.181.1",
4
+ "version": "0.181.2",
5
5
  "description": " A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Office services through the Graph API",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",