splitwise-mcp 2.0.2 → 2.0.3
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/dist/bundle.js +1415 -652
- package/dist/client.js +20 -4
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/server.json +2 -2
package/dist/client.js
CHANGED
|
@@ -30,18 +30,34 @@ function readVar(key) {
|
|
|
30
30
|
const BASE_URL = 'https://secure.splitwise.com/api/v3.0';
|
|
31
31
|
export class SplitwiseClient {
|
|
32
32
|
apiKey;
|
|
33
|
+
configError;
|
|
34
|
+
/**
|
|
35
|
+
* Defer the config error so the server can still start (and respond to the
|
|
36
|
+
* host's install-time smoke test) when SPLITWISE_API_KEY isn't set yet.
|
|
37
|
+
* Tool calls re-raise the error at request time.
|
|
38
|
+
*/
|
|
33
39
|
constructor() {
|
|
34
40
|
const key = readVar('SPLITWISE_API_KEY');
|
|
35
|
-
if (!key)
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
if (!key) {
|
|
42
|
+
this.apiKey = null;
|
|
43
|
+
this.configError = new Error('SPLITWISE_API_KEY environment variable is required');
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
this.apiKey = key;
|
|
47
|
+
this.configError = null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
requireKey() {
|
|
51
|
+
if (this.configError)
|
|
52
|
+
throw this.configError;
|
|
53
|
+
return this.apiKey;
|
|
38
54
|
}
|
|
39
55
|
async request(method, path, body) {
|
|
40
56
|
return this.doRequest(method, path, body, false);
|
|
41
57
|
}
|
|
42
58
|
async doRequest(method, path, body, isRetry) {
|
|
43
59
|
const headers = {
|
|
44
|
-
Authorization: `Bearer ${this.
|
|
60
|
+
Authorization: `Bearer ${this.requireKey()}`,
|
|
45
61
|
'Content-Type': 'application/json',
|
|
46
62
|
Accept: 'application/json',
|
|
47
63
|
};
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { registerFriendTools } from './tools/friends.js';
|
|
|
8
8
|
import { registerExpenseTools } from './tools/expenses.js';
|
|
9
9
|
import { registerUtilityTools } from './tools/utilities.js';
|
|
10
10
|
const client = new SplitwiseClient();
|
|
11
|
-
const server = new McpServer({ name: 'splitwise-mcp', version: '2.0.
|
|
11
|
+
const server = new McpServer({ name: 'splitwise-mcp', version: '2.0.3' });
|
|
12
12
|
registerUserTools(server, client);
|
|
13
13
|
registerGroupTools(server, client);
|
|
14
14
|
registerFriendTools(server, client);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "splitwise-mcp",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
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>",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
47
47
|
"dotenv": "^17.4.0",
|
|
48
|
-
"zod": "^4.
|
|
48
|
+
"zod": "^4.4.2"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "^25.5.2",
|
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": "2.0.
|
|
9
|
+
"version": "2.0.3",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "splitwise-mcp",
|
|
14
|
-
"version": "2.0.
|
|
14
|
+
"version": "2.0.3",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|