@warmio/mcp 4.2.0 → 4.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.
- package/README.md +1 -23
- package/dist/index.js +0 -70
- 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
|
|
|
@@ -46,22 +41,6 @@ Optional auth overrides:
|
|
|
46
41
|
- `WARM_API_KEY`
|
|
47
42
|
- `WARM_API_KEY_FILE`
|
|
48
43
|
|
|
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
44
|
On Windows, prefer:
|
|
66
45
|
|
|
67
46
|
```json
|
|
@@ -292,7 +271,6 @@ Returns:
|
|
|
292
271
|
## Development
|
|
293
272
|
|
|
294
273
|
```bash
|
|
295
|
-
cd mcp
|
|
296
274
|
npm install
|
|
297
275
|
npm run build
|
|
298
276
|
```
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
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';
|
|
5
4
|
function printUsage() {
|
|
@@ -9,44 +8,11 @@ function printUsage() {
|
|
|
9
8
|
console.log('');
|
|
10
9
|
console.log(' warm-mcp [install] [--force] [--no-validate]');
|
|
11
10
|
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
11
|
console.log('');
|
|
15
12
|
console.log(' Aliases:');
|
|
16
13
|
console.log(' --server, --stdio Start stdio mode');
|
|
17
|
-
console.log(' --http Start HTTP mode');
|
|
18
14
|
console.log('');
|
|
19
15
|
}
|
|
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
16
|
function parseCliArgs(args) {
|
|
51
17
|
const options = {
|
|
52
18
|
command: 'install',
|
|
@@ -67,10 +33,6 @@ function parseCliArgs(args) {
|
|
|
67
33
|
options.command = 'stdio';
|
|
68
34
|
continue;
|
|
69
35
|
}
|
|
70
|
-
if (arg === 'http' || arg === '--http') {
|
|
71
|
-
options.command = 'http';
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
36
|
if (arg === '--force') {
|
|
75
37
|
options.force = true;
|
|
76
38
|
continue;
|
|
@@ -79,30 +41,6 @@ function parseCliArgs(args) {
|
|
|
79
41
|
options.validateApiKey = false;
|
|
80
42
|
continue;
|
|
81
43
|
}
|
|
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
44
|
throw new Error(`Unknown argument: ${arg}`);
|
|
107
45
|
}
|
|
108
46
|
return options;
|
|
@@ -113,14 +51,6 @@ async function main() {
|
|
|
113
51
|
case 'help':
|
|
114
52
|
printUsage();
|
|
115
53
|
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
54
|
case 'stdio':
|
|
125
55
|
await startStdioServer();
|
|
126
56
|
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.1",
|
|
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
|
},
|