splitwise-mcp 3.2.0 → 3.2.1

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.
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "metadata": {
9
9
  "description": "MCP server for Splitwise — natural-language expense and group management via the Splitwise API",
10
- "version": "3.2.0"
10
+ "version": "3.2.1"
11
11
  },
12
12
  "plugins": [
13
13
  {
@@ -15,7 +15,7 @@
15
15
  "displayName": "Splitwise",
16
16
  "source": "./",
17
17
  "description": "MCP server for Splitwise — manage expenses, groups, and friends via natural language",
18
- "version": "3.2.0",
18
+ "version": "3.2.1",
19
19
  "author": {
20
20
  "name": "Chris Hall"
21
21
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "splitwise-mcp",
3
3
  "displayName": "Splitwise",
4
- "version": "3.2.0",
4
+ "version": "3.2.1",
5
5
  "description": "MCP server for Splitwise — natural-language expense and group management via the Splitwise API",
6
6
  "author": {
7
7
  "name": "Chris Hall",
package/README.md CHANGED
@@ -113,7 +113,7 @@ Add to Claude Desktop config:
113
113
  | Env var | Required | Notes |
114
114
  |---------|----------|-------|
115
115
  | `SPLITWISE_API_KEY` | Yes | API key from [splitwise.com/apps/register](https://secure.splitwise.com/apps/register) |
116
- | `SPLITWISE_OUTPUT_DIR` | No | Where `sw_get_receipt` writes downloaded receipts. Defaults to the current working directory. |
116
+ | `SPLITWISE_OUTPUT_DIR` | No | Where `sw_get_receipt` writes downloaded receipts. Defaults to the current working directory. When set, a per-call `output_dir` must be inside it. |
117
117
 
118
118
  ## Confirmations
119
119
 
package/dist/bundle.js CHANGED
@@ -99758,7 +99758,7 @@ function registerReceiptTools(server, client2) {
99758
99758
  "Also return the PDF's text layer as `text`. Ideal for looking up line items or totals without transferring the file. PDFs only; a scanned receipt has no text layer to extract."
99759
99759
  ).optional(),
99760
99760
  output_dir: external_exports.string().describe(
99761
- "Directory to write the receipt into. Defaults to $SPLITWISE_OUTPUT_DIR, else the current working directory."
99761
+ "Directory to write the receipt into. Defaults to $SPLITWISE_OUTPUT_DIR, else the current working directory. When SPLITWISE_OUTPUT_DIR is set, this must be inside it."
99762
99762
  ).optional(),
99763
99763
  write: external_exports.boolean().describe(
99764
99764
  "Write the receipt to disk. Defaults to true. Pass false when the caller cannot reach this server's filesystem, or when the server runs read-only."
@@ -99785,8 +99785,11 @@ function registerReceiptTools(server, client2) {
99785
99785
  let writeError;
99786
99786
  if (write !== false) {
99787
99787
  try {
99788
+ const configuredDir = readEnvVar("SPLITWISE_OUTPUT_DIR");
99788
99789
  path = writeBinaryOutput({
99789
- dir: resolveOutputDir(output_dir, "SPLITWISE_OUTPUT_DIR"),
99790
+ dir: resolveOutputDir(output_dir, "SPLITWISE_OUTPUT_DIR", {
99791
+ ...configuredDir ? { allowedRoots: [configuredDir] } : {}
99792
+ }),
99790
99793
  baseName: `splitwise-receipt-${id}`,
99791
99794
  base64: base643,
99792
99795
  extension: extensionFor(mimeType, url4)
@@ -99989,7 +99992,7 @@ function registerUtilityTools(server, client2) {
99989
99992
  // src/index.ts
99990
99993
  await runMcp({
99991
99994
  name: "splitwise-mcp",
99992
- version: "3.2.0",
99995
+ version: "3.2.1",
99993
99996
  // x-release-please-version
99994
99997
  deps: client,
99995
99998
  banner: "[splitwise-mcp] This project was developed and is maintained by AI (Claude Sonnet 4.6). Use at your own discretion.",
package/dist/index.js CHANGED
@@ -19,7 +19,7 @@ import { registerUtilityTools } from './tools/utilities.js';
19
19
  // client into the same registrars instead of this singleton.
20
20
  await runMcp({
21
21
  name: 'splitwise-mcp',
22
- version: '3.2.0', // x-release-please-version
22
+ version: '3.2.1', // x-release-please-version
23
23
  deps: client,
24
24
  banner: '[splitwise-mcp] This project was developed and is maintained by AI (Claude Sonnet 4.6). Use at your own discretion.',
25
25
  tools: [
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { minifiedResult, imageResult, resolveOutputDir, writeBinaryOutput, sniffMimeBytes, } from '@chrischall/mcp-utils';
2
+ import { minifiedResult, imageResult, readEnvVar, resolveOutputDir, writeBinaryOutput, sniffMimeBytes, } from '@chrischall/mcp-utils';
3
3
  /** Cap on bytes returned as base64 in the tool result. */
4
4
  const MAX_INLINE_BYTES = 4 * 1024 * 1024;
5
5
  /** Cap on extracted characters, so a long PDF can't flood the result. */
@@ -97,7 +97,7 @@ export function registerReceiptTools(server, client) {
97
97
  .optional(),
98
98
  output_dir: z
99
99
  .string()
100
- .describe('Directory to write the receipt into. Defaults to $SPLITWISE_OUTPUT_DIR, else the current working directory.')
100
+ .describe('Directory to write the receipt into. Defaults to $SPLITWISE_OUTPUT_DIR, else the current working directory. When SPLITWISE_OUTPUT_DIR is set, this must be inside it.')
101
101
  .optional(),
102
102
  write: z
103
103
  .boolean()
@@ -128,8 +128,15 @@ export function registerReceiptTools(server, client) {
128
128
  let writeError;
129
129
  if (write !== false) {
130
130
  try {
131
+ // output_dir is model-chosen: once the operator configures
132
+ // SPLITWISE_OUTPUT_DIR, a per-call directory must stay inside it
133
+ // (an escape throws, landing in writeError below). Unset keeps the
134
+ // old, unconfined behaviour.
135
+ const configuredDir = readEnvVar('SPLITWISE_OUTPUT_DIR');
131
136
  path = writeBinaryOutput({
132
- dir: resolveOutputDir(output_dir, 'SPLITWISE_OUTPUT_DIR'),
137
+ dir: resolveOutputDir(output_dir, 'SPLITWISE_OUTPUT_DIR', {
138
+ ...(configuredDir ? { allowedRoots: [configuredDir] } : {}),
139
+ }),
133
140
  baseName: `splitwise-receipt-${id}`,
134
141
  base64,
135
142
  extension: extensionFor(mimeType, url),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "splitwise-mcp",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "mcpName": "io.github.chrischall/splitwise-mcp",
5
5
  "description": "Splitwise MCP server for Claude — developed and maintained by AI (Claude Code)",
6
6
  "author": "Claude Code (AI) <https://www.anthropic.com/claude>",
@@ -47,7 +47,7 @@
47
47
  "dependencies": {
48
48
  "@chrischall/mcp-utils": "^2.6.0",
49
49
  "@modelcontextprotocol/server": "^2.0.0",
50
- "dotenv": "^17.4.0",
50
+ "dotenv": "^18.0.2",
51
51
  "unpdf": "^1.8.1",
52
52
  "zod": "^4.6.5"
53
53
  },
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/chrischall/splitwise-mcp",
7
7
  "source": "github"
8
8
  },
9
- "version": "3.2.0",
9
+ "version": "3.2.1",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "splitwise-mcp",
14
- "version": "3.2.0",
14
+ "version": "3.2.1",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  },