tradeblocks-mcp 2.2.4 → 2.2.6
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 +22 -1
- package/dist/{chunk-O6FQQRJV.js → chunk-FIKAXL2L.js} +35 -17
- package/dist/chunk-FIKAXL2L.js.map +1 -0
- package/dist/{sync-AAV7BGOE.js → sync-2TUYF36I.js} +6 -2
- package/dist/test-exports.js +1 -1
- package/package.json +1 -1
- package/server/{chunk-TDKK4QFM.js → chunk-IBEPOZZK.js} +35 -17
- package/server/chunk-IBEPOZZK.js.map +1 -0
- package/server/index.js +32 -7
- package/server/index.js.map +1 -1
- package/server/{sync-T6GEBPJ7.js → sync-37YJXJVW.js} +6 -2
- package/dist/chunk-O6FQQRJV.js.map +0 -1
- package/server/chunk-TDKK4QFM.js.map +0 -1
- /package/dist/{sync-AAV7BGOE.js.map → sync-2TUYF36I.js.map} +0 -0
- /package/server/{sync-T6GEBPJ7.js.map → sync-37YJXJVW.js.map} +0 -0
package/server/index.js
CHANGED
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
upgradeToReadWrite,
|
|
52
52
|
upsertMarketImportMetadata,
|
|
53
53
|
upsertProfile
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-IBEPOZZK.js";
|
|
55
55
|
import "./chunk-MFUUPQED.js";
|
|
56
56
|
import "./chunk-CWC73SPW.js";
|
|
57
57
|
import "./chunk-TOL6XKBV.js";
|
|
@@ -14345,7 +14345,7 @@ function registerProfileAnalysisTools(server, baseDir) {
|
|
|
14345
14345
|
if (getConnectionMode() === "read_write") {
|
|
14346
14346
|
try {
|
|
14347
14347
|
if (input.blockId) {
|
|
14348
|
-
const { syncBlock: syncBlock2 } = await import("./sync-
|
|
14348
|
+
const { syncBlock: syncBlock2 } = await import("./sync-37YJXJVW.js");
|
|
14349
14349
|
await syncBlock2(input.blockId, baseDir);
|
|
14350
14350
|
} else {
|
|
14351
14351
|
await syncAllBlocks(baseDir);
|
|
@@ -14642,7 +14642,7 @@ function registerRegimeAdvisorTools(server, baseDir) {
|
|
|
14642
14642
|
if (getConnectionMode() === "read_write") {
|
|
14643
14643
|
try {
|
|
14644
14644
|
if (input.blockId) {
|
|
14645
|
-
const { syncBlock: syncBlock2 } = await import("./sync-
|
|
14645
|
+
const { syncBlock: syncBlock2 } = await import("./sync-37YJXJVW.js");
|
|
14646
14646
|
await syncBlock2(input.blockId, baseDir);
|
|
14647
14647
|
} else {
|
|
14648
14648
|
await syncAllBlocks(baseDir);
|
|
@@ -17025,6 +17025,11 @@ async function handleDirectCall(args) {
|
|
|
17025
17025
|
}, null, 2));
|
|
17026
17026
|
process.exit(1);
|
|
17027
17027
|
}
|
|
17028
|
+
if (process.env.TRADEBLOCKS_BLOCKS_DIR) {
|
|
17029
|
+
const resolvedBlocksDir = path3.resolve(process.env.TRADEBLOCKS_BLOCKS_DIR);
|
|
17030
|
+
const { setBlocksDir } = await import("./sync-37YJXJVW.js");
|
|
17031
|
+
setBlocksDir(resolvedBlocksDir);
|
|
17032
|
+
}
|
|
17028
17033
|
const capture = new ToolCapture();
|
|
17029
17034
|
const mockServer = capture;
|
|
17030
17035
|
registerBlockTools(mockServer, resolvedDir);
|
|
@@ -17137,12 +17142,14 @@ MCP Server Modes:
|
|
|
17137
17142
|
Options:
|
|
17138
17143
|
--http Start HTTP server instead of stdio (for web platforms)
|
|
17139
17144
|
--port <number> HTTP server port (default: 3100, requires --http)
|
|
17145
|
+
--blocks-dir <path> Directory containing CSV block folders (default: same as <folder>)
|
|
17140
17146
|
--market-db <path> Path to market.duckdb (default: <folder>/market.duckdb)
|
|
17141
17147
|
--no-auth Disable authentication (only use behind an auth proxy)
|
|
17142
17148
|
|
|
17143
17149
|
Environment:
|
|
17144
|
-
BLOCKS_DIRECTORY
|
|
17145
|
-
|
|
17150
|
+
BLOCKS_DIRECTORY Default backtests folder if not specified
|
|
17151
|
+
TRADEBLOCKS_BLOCKS_DIR Directory for CSV block folders (overrides default, overridden by --blocks-dir)
|
|
17152
|
+
MARKET_DB_PATH Path to market.duckdb (overrides default, overridden by --market-db)
|
|
17146
17153
|
|
|
17147
17154
|
Commands:
|
|
17148
17155
|
install-skills Install TradeBlocks skills to AI platform
|
|
@@ -17170,6 +17177,7 @@ function parseServerArgs() {
|
|
|
17170
17177
|
let port = 3100;
|
|
17171
17178
|
let noAuth = false;
|
|
17172
17179
|
let directory;
|
|
17180
|
+
let blocksDir;
|
|
17173
17181
|
let marketDb;
|
|
17174
17182
|
for (let i = 0; i < args.length; i++) {
|
|
17175
17183
|
const arg = args[i];
|
|
@@ -17181,6 +17189,9 @@ function parseServerArgs() {
|
|
|
17181
17189
|
port = parsedPort;
|
|
17182
17190
|
}
|
|
17183
17191
|
i++;
|
|
17192
|
+
} else if (arg === "--blocks-dir" && args[i + 1]) {
|
|
17193
|
+
blocksDir = args[i + 1];
|
|
17194
|
+
i++;
|
|
17184
17195
|
} else if (arg === "--market-db" && args[i + 1]) {
|
|
17185
17196
|
marketDb = args[i + 1];
|
|
17186
17197
|
i++;
|
|
@@ -17193,10 +17204,13 @@ function parseServerArgs() {
|
|
|
17193
17204
|
if (!directory) {
|
|
17194
17205
|
directory = process.env.BLOCKS_DIRECTORY;
|
|
17195
17206
|
}
|
|
17207
|
+
if (!blocksDir) {
|
|
17208
|
+
blocksDir = process.env.TRADEBLOCKS_BLOCKS_DIR;
|
|
17209
|
+
}
|
|
17196
17210
|
if (!marketDb) {
|
|
17197
17211
|
marketDb = process.env.MARKET_DB_PATH;
|
|
17198
17212
|
}
|
|
17199
|
-
return { http, port, noAuth, directory, marketDb };
|
|
17213
|
+
return { http, port, noAuth, directory, blocksDir, marketDb };
|
|
17200
17214
|
}
|
|
17201
17215
|
async function handleSkillCommand(command) {
|
|
17202
17216
|
console.log("Skills have moved to a standalone plugin:");
|
|
@@ -17230,7 +17244,7 @@ async function main() {
|
|
|
17230
17244
|
printUsage();
|
|
17231
17245
|
process.exit(0);
|
|
17232
17246
|
}
|
|
17233
|
-
const { http, port, noAuth, directory: backtestDir } = parseServerArgs();
|
|
17247
|
+
const { http, port, noAuth, directory: backtestDir, blocksDir } = parseServerArgs();
|
|
17234
17248
|
if (!backtestDir) {
|
|
17235
17249
|
printUsage();
|
|
17236
17250
|
process.exit(1);
|
|
@@ -17242,6 +17256,17 @@ async function main() {
|
|
|
17242
17256
|
console.error(`Error: Directory does not exist: ${resolvedDir}`);
|
|
17243
17257
|
process.exit(1);
|
|
17244
17258
|
}
|
|
17259
|
+
if (blocksDir) {
|
|
17260
|
+
const resolvedBlocksDir = path4.resolve(blocksDir);
|
|
17261
|
+
try {
|
|
17262
|
+
await fs4.access(resolvedBlocksDir);
|
|
17263
|
+
} catch {
|
|
17264
|
+
console.error(`Error: Blocks directory does not exist: ${resolvedBlocksDir}`);
|
|
17265
|
+
process.exit(1);
|
|
17266
|
+
}
|
|
17267
|
+
const { setBlocksDir } = await import("./sync-37YJXJVW.js");
|
|
17268
|
+
setBlocksDir(resolvedBlocksDir);
|
|
17269
|
+
}
|
|
17245
17270
|
const createServer = () => {
|
|
17246
17271
|
const server = new McpServer(
|
|
17247
17272
|
{ name: "tradeblocks-mcp", version: "2.0.0" },
|