@openfinance-sh/mcp 0.1.1 → 0.1.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/build/index.js +5 -2
- package/manifest.json +1 -1
- package/openfinance.mcpb +0 -0
- package/package.json +1 -2
package/build/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
5
5
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
6
6
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
7
7
|
import { createServer } from "http";
|
|
8
|
+
import { createRequire } from "module";
|
|
8
9
|
|
|
9
10
|
// src/client.ts
|
|
10
11
|
var OpenFinanceClient = class {
|
|
@@ -184,6 +185,8 @@ Example queries:
|
|
|
184
185
|
}
|
|
185
186
|
|
|
186
187
|
// src/index.ts
|
|
188
|
+
var require2 = createRequire(import.meta.url);
|
|
189
|
+
var pkg = require2("../../package.json");
|
|
187
190
|
function parseArgs() {
|
|
188
191
|
const args = process.argv.slice(2);
|
|
189
192
|
let transport = "stdio";
|
|
@@ -201,7 +204,7 @@ function parseArgs() {
|
|
|
201
204
|
}
|
|
202
205
|
async function main() {
|
|
203
206
|
const apiKey = process.env.OPENFINANCE_API_KEY;
|
|
204
|
-
const baseUrl = process.env.OPENFINANCE_URL || "
|
|
207
|
+
const baseUrl = process.env.OPENFINANCE_URL || "https://api.openfinance.sh";
|
|
205
208
|
if (!apiKey) {
|
|
206
209
|
console.error(
|
|
207
210
|
"Error: OPENFINANCE_API_KEY environment variable is required"
|
|
@@ -212,7 +215,7 @@ async function main() {
|
|
|
212
215
|
const client = new OpenFinanceClient({ baseUrl, apiKey });
|
|
213
216
|
const server = new McpServer({
|
|
214
217
|
name: "openfinance",
|
|
215
|
-
version:
|
|
218
|
+
version: pkg.version
|
|
216
219
|
});
|
|
217
220
|
registerAccountTools(server, client);
|
|
218
221
|
registerTransactionTools(server, client);
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest_version": "0.3",
|
|
3
3
|
"name": "openfinance",
|
|
4
4
|
"display_name": "OpenFinance",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.3",
|
|
6
6
|
"description": "Connect your financial accounts to view balances, search transactions, and get spending insights.",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "OpenFinance"
|
package/openfinance.mcpb
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfinance-sh/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"openfinance-mcp": "./build/index.js"
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
17
|
-
"@openfinance/shared": "workspace:*",
|
|
18
17
|
"zod": "^3.24.0"
|
|
19
18
|
},
|
|
20
19
|
"files": [
|