@warmio/mcp 4.2.0 → 4.2.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/README.md +5 -23
- package/dist/index.js +9 -72
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/types.d.ts +4 -1
- package/package.json +1 -6
package/README.md
CHANGED
|
@@ -2,12 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Read-only MCP server for Warm financial data.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- Local `stdio` via the npm package `@warmio/mcp`
|
|
8
|
-
- Self-hosted Streamable HTTP via `warm-mcp http`
|
|
9
|
-
|
|
10
|
-
Warm does not currently publish a Warm-hosted Streamable HTTP MCP endpoint from this repo.
|
|
5
|
+
This package supports local `stdio` transport only.
|
|
11
6
|
|
|
12
7
|
## Install
|
|
13
8
|
|
|
@@ -19,6 +14,10 @@ The installer detects supported MCP clients, prompts for your Warm API key, and
|
|
|
19
14
|
`stdio` server config automatically. The key is stored once in your local Warm profile instead of
|
|
20
15
|
being duplicated into every MCP client config.
|
|
21
16
|
|
|
17
|
+
When launched without arguments in a non-interactive context, the binary automatically starts the
|
|
18
|
+
`stdio` server instead of the installer. This keeps MCP clients that invoke the package directly
|
|
19
|
+
from falling into the interactive setup flow.
|
|
20
|
+
|
|
22
21
|
## Requirements
|
|
23
22
|
|
|
24
23
|
- Warm Pro
|
|
@@ -46,22 +45,6 @@ Optional auth overrides:
|
|
|
46
45
|
- `WARM_API_KEY`
|
|
47
46
|
- `WARM_API_KEY_FILE`
|
|
48
47
|
|
|
49
|
-
## Self-hosted Streamable HTTP
|
|
50
|
-
|
|
51
|
-
Run the HTTP server locally or behind your own reverse proxy:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
npx @warmio/mcp http --host 127.0.0.1 --port 3000 --path /mcp
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Environment overrides:
|
|
58
|
-
|
|
59
|
-
- `WARM_MCP_HTTP_HOST`
|
|
60
|
-
- `WARM_MCP_HTTP_PORT`
|
|
61
|
-
- `WARM_MCP_HTTP_PATH`
|
|
62
|
-
- `WARM_MCP_ALLOWED_HOSTS`
|
|
63
|
-
- `WARM_API_KEY_FILE`
|
|
64
|
-
|
|
65
48
|
On Windows, prefer:
|
|
66
49
|
|
|
67
50
|
```json
|
|
@@ -292,7 +275,6 @@ Returns:
|
|
|
292
275
|
## Development
|
|
293
276
|
|
|
294
277
|
```bash
|
|
295
|
-
cd mcp
|
|
296
278
|
npm install
|
|
297
279
|
npm run build
|
|
298
280
|
```
|
package/dist/index.js
CHANGED
|
@@ -1,55 +1,28 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { startHttpServer } from './http.js';
|
|
3
2
|
import { install } from './install.js';
|
|
4
3
|
import { startStdioServer } from './server.js';
|
|
4
|
+
function isInteractiveSession() {
|
|
5
|
+
return process.stdin.isTTY === true && process.stdout.isTTY === true;
|
|
6
|
+
}
|
|
5
7
|
function printUsage() {
|
|
6
8
|
console.log('');
|
|
7
9
|
console.log(' Warm MCP');
|
|
8
10
|
console.log(' --------');
|
|
9
11
|
console.log('');
|
|
10
|
-
console.log(' warm-mcp
|
|
12
|
+
console.log(' warm-mcp');
|
|
13
|
+
console.log(' Interactive terminal: runs installer');
|
|
14
|
+
console.log(' Non-interactive launch: starts stdio server');
|
|
15
|
+
console.log('');
|
|
16
|
+
console.log(' warm-mcp install [--force] [--no-validate]');
|
|
11
17
|
console.log(' warm-mcp stdio');
|
|
12
|
-
console.log(' warm-mcp http [--host 127.0.0.1] [--port 3000] [--path /mcp]');
|
|
13
|
-
console.log(' [--allowed-hosts host1,host2]');
|
|
14
18
|
console.log('');
|
|
15
19
|
console.log(' Aliases:');
|
|
16
20
|
console.log(' --server, --stdio Start stdio mode');
|
|
17
|
-
console.log(' --http Start HTTP mode');
|
|
18
21
|
console.log('');
|
|
19
22
|
}
|
|
20
|
-
function parsePort(value) {
|
|
21
|
-
const parsed = Number(value);
|
|
22
|
-
if (!Number.isInteger(parsed) || parsed <= 0) {
|
|
23
|
-
throw new Error(`Invalid port: ${value}`);
|
|
24
|
-
}
|
|
25
|
-
return parsed;
|
|
26
|
-
}
|
|
27
|
-
function parseList(value) {
|
|
28
|
-
return value
|
|
29
|
-
.split(',')
|
|
30
|
-
.map((item) => item.trim())
|
|
31
|
-
.filter(Boolean);
|
|
32
|
-
}
|
|
33
|
-
function readOption(args, index, flag) {
|
|
34
|
-
const arg = args[index];
|
|
35
|
-
if (arg.startsWith(`${flag}=`)) {
|
|
36
|
-
return {
|
|
37
|
-
nextIndex: index,
|
|
38
|
-
value: arg.slice(flag.length + 1),
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
const value = args[index + 1];
|
|
42
|
-
if (!value) {
|
|
43
|
-
throw new Error(`Missing value for ${flag}`);
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
nextIndex: index + 1,
|
|
47
|
-
value,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
23
|
function parseCliArgs(args) {
|
|
51
24
|
const options = {
|
|
52
|
-
command: 'install',
|
|
25
|
+
command: isInteractiveSession() ? 'install' : 'stdio',
|
|
53
26
|
force: false,
|
|
54
27
|
validateApiKey: true,
|
|
55
28
|
};
|
|
@@ -67,10 +40,6 @@ function parseCliArgs(args) {
|
|
|
67
40
|
options.command = 'stdio';
|
|
68
41
|
continue;
|
|
69
42
|
}
|
|
70
|
-
if (arg === 'http' || arg === '--http') {
|
|
71
|
-
options.command = 'http';
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
43
|
if (arg === '--force') {
|
|
75
44
|
options.force = true;
|
|
76
45
|
continue;
|
|
@@ -79,30 +48,6 @@ function parseCliArgs(args) {
|
|
|
79
48
|
options.validateApiKey = false;
|
|
80
49
|
continue;
|
|
81
50
|
}
|
|
82
|
-
if (arg === '--host' || arg.startsWith('--host=')) {
|
|
83
|
-
const { nextIndex, value } = readOption(args, index, '--host');
|
|
84
|
-
options.host = value;
|
|
85
|
-
index = nextIndex;
|
|
86
|
-
continue;
|
|
87
|
-
}
|
|
88
|
-
if (arg === '--port' || arg.startsWith('--port=')) {
|
|
89
|
-
const { nextIndex, value } = readOption(args, index, '--port');
|
|
90
|
-
options.port = parsePort(value);
|
|
91
|
-
index = nextIndex;
|
|
92
|
-
continue;
|
|
93
|
-
}
|
|
94
|
-
if (arg === '--path' || arg.startsWith('--path=')) {
|
|
95
|
-
const { nextIndex, value } = readOption(args, index, '--path');
|
|
96
|
-
options.path = value;
|
|
97
|
-
index = nextIndex;
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
if (arg === '--allowed-hosts' || arg.startsWith('--allowed-hosts=')) {
|
|
101
|
-
const { nextIndex, value } = readOption(args, index, '--allowed-hosts');
|
|
102
|
-
options.allowedHosts = parseList(value);
|
|
103
|
-
index = nextIndex;
|
|
104
|
-
continue;
|
|
105
|
-
}
|
|
106
51
|
throw new Error(`Unknown argument: ${arg}`);
|
|
107
52
|
}
|
|
108
53
|
return options;
|
|
@@ -113,14 +58,6 @@ async function main() {
|
|
|
113
58
|
case 'help':
|
|
114
59
|
printUsage();
|
|
115
60
|
return;
|
|
116
|
-
case 'http':
|
|
117
|
-
await startHttpServer({
|
|
118
|
-
allowedHosts: options.allowedHosts,
|
|
119
|
-
host: options.host,
|
|
120
|
-
path: options.path,
|
|
121
|
-
port: options.port,
|
|
122
|
-
});
|
|
123
|
-
return;
|
|
124
61
|
case 'stdio':
|
|
125
62
|
await startStdioServer();
|
|
126
63
|
return;
|
package/dist/server.d.ts
CHANGED
package/dist/server.js
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -16,15 +16,17 @@ export type WarmToolRegistrationTarget = McpServer;
|
|
|
16
16
|
export type RegisteredWarmTools = Record<WarmToolName, RegisteredTool>;
|
|
17
17
|
export interface WarmApiClient {
|
|
18
18
|
getAccounts(): Promise<GetAccountsOutput>;
|
|
19
|
-
getTransactions(input: GetTransactionsInput): Promise<GetTransactionsOutput>;
|
|
20
19
|
getFinancialState(): Promise<GetFinancialStateOutput>;
|
|
20
|
+
getTransactions(input: GetTransactionsInput): Promise<GetTransactionsOutput>;
|
|
21
21
|
verifyKey(): Promise<VerifyKeyOutput>;
|
|
22
22
|
}
|
|
23
23
|
export interface WarmApiAccount {
|
|
24
|
+
account_id?: string | null;
|
|
24
25
|
name?: string | null;
|
|
25
26
|
type?: string | null;
|
|
26
27
|
subtype?: string | null;
|
|
27
28
|
current_balance?: number | null;
|
|
29
|
+
available_balance?: number | null;
|
|
28
30
|
institution_name?: string | null;
|
|
29
31
|
mask?: string | null;
|
|
30
32
|
}
|
|
@@ -34,6 +36,7 @@ export interface WarmApiAccountsResponse {
|
|
|
34
36
|
}
|
|
35
37
|
export interface WarmApiTransaction {
|
|
36
38
|
id?: string | null;
|
|
39
|
+
account_id?: string | null;
|
|
37
40
|
date?: string | null;
|
|
38
41
|
amount?: number | null;
|
|
39
42
|
merchant_name?: string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warmio/mcp",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.2",
|
|
4
4
|
"description": "MCP server for Warm Financial API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -14,10 +14,6 @@
|
|
|
14
14
|
"types": "./dist/server.d.ts",
|
|
15
15
|
"default": "./dist/server.js"
|
|
16
16
|
},
|
|
17
|
-
"./http": {
|
|
18
|
-
"types": "./dist/http.d.ts",
|
|
19
|
-
"default": "./dist/http.js"
|
|
20
|
-
},
|
|
21
17
|
"./install": {
|
|
22
18
|
"types": "./dist/install.d.ts",
|
|
23
19
|
"default": "./dist/install.js"
|
|
@@ -32,7 +28,6 @@
|
|
|
32
28
|
"scripts": {
|
|
33
29
|
"build": "tsc",
|
|
34
30
|
"start": "node dist/index.js --stdio",
|
|
35
|
-
"start:http": "node dist/index.js --http",
|
|
36
31
|
"start:install": "node dist/index.js install",
|
|
37
32
|
"prepublishOnly": "npm run build"
|
|
38
33
|
},
|