@vint.tri/report_gen_mcp 1.0.26 → 1.0.28

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 CHANGED
@@ -17,13 +17,13 @@ A powerful CLI tool for generating HTML reports with embedded charts, designed t
17
17
  ### Global Installation (Recommended)
18
18
 
19
19
  ```bash
20
- npm install -g @vint.tri/report_gen_mcp@1.0.24
20
+ npm install -g @vint.tri/report_gen_mcp@1.0.27
21
21
  ```
22
22
 
23
23
  ### Direct Execution with npx
24
24
 
25
25
  ```bash
26
- npx @vint.tri/report_gen_mcp@1.0.24 --directory ./reports
26
+ REPORTS_DIR=./reports npx @vint.tri/report_gen_mcp@1.0.27
27
27
  ```
28
28
 
29
29
  ## Usage
@@ -63,10 +63,11 @@ To use this tool with Claude Desktop, add the following configuration to your Cl
63
63
  "longRunning": false,
64
64
  "tags": [],
65
65
  "command": "npx",
66
+ "env": {
67
+ "REPORTS_DIR": "./reports"
68
+ },
66
69
  "args": [
67
- "@vint.tri/report_gen_mcp@1.0.24",
68
- "--directory",
69
- "./reports"
70
+ "@vint.tri/report_gen_mcp@1.0.27"
70
71
  ]
71
72
  }
72
73
  }
package/dist/index.js CHANGED
@@ -12,6 +12,26 @@ const fs_extra_1 = __importDefault(require("fs-extra"));
12
12
  const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
13
13
  const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
14
14
  const zod_1 = require("zod");
15
+ // Check for mandatory REPORTS_DIR environment variable
16
+ const reportsDir = process.env.REPORTS_DIR;
17
+ if (!reportsDir) {
18
+ console.error('Error: REPORTS_DIR environment variable is required.');
19
+ console.error('Please set the REPORTS_DIR environment variable to specify where reports should be generated.');
20
+ console.error('Example:');
21
+ console.error(' export REPORTS_DIR=/path/to/reports && npx @vint.tri/report_gen_mcp@latest');
22
+ console.error('Or:');
23
+ console.error(' REPORTS_DIR=/path/to/reports npx @vint.tri/report_gen_mcp@latest');
24
+ process.exit(1);
25
+ }
26
+ // Ensure the reports directory exists
27
+ try {
28
+ fs_extra_1.default.ensureDirSync(reportsDir);
29
+ }
30
+ catch (error) {
31
+ console.error(`Error: Cannot create or access the reports directory: ${reportsDir}`);
32
+ console.error('Please ensure the path is valid and you have write permissions.');
33
+ process.exit(1);
34
+ }
15
35
  const app = (0, express_1.default)();
16
36
  const port = 3000;
17
37
  app.use(express_1.default.json());
@@ -68,7 +88,7 @@ if (process.argv.length === 2) {
68
88
  // No command specified, run in stdio mode using MCP SDK
69
89
  const mcpServer = new mcp_js_1.McpServer({
70
90
  name: "report_gen_mcp",
71
- version: "1.0.24",
91
+ version: "1.0.28",
72
92
  }, {
73
93
  // Disable health check to prevent automatic calls
74
94
  capabilities: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vint.tri/report_gen_mcp",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "description": "CLI tool for generating HTML reports with embedded charts",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -10,6 +10,27 @@ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
10
10
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
11
11
  import { z } from 'zod';
12
12
 
13
+ // Check for mandatory REPORTS_DIR environment variable
14
+ const reportsDir = process.env.REPORTS_DIR;
15
+ if (!reportsDir) {
16
+ console.error('Error: REPORTS_DIR environment variable is required.');
17
+ console.error('Please set the REPORTS_DIR environment variable to specify where reports should be generated.');
18
+ console.error('Example:');
19
+ console.error(' export REPORTS_DIR=/path/to/reports && npx @vint.tri/report_gen_mcp@latest');
20
+ console.error('Or:');
21
+ console.error(' REPORTS_DIR=/path/to/reports npx @vint.tri/report_gen_mcp@latest');
22
+ process.exit(1);
23
+ }
24
+
25
+ // Ensure the reports directory exists
26
+ try {
27
+ fs.ensureDirSync(reportsDir);
28
+ } catch (error) {
29
+ console.error(`Error: Cannot create or access the reports directory: ${reportsDir}`);
30
+ console.error('Please ensure the path is valid and you have write permissions.');
31
+ process.exit(1);
32
+ }
33
+
13
34
  const app = express();
14
35
  const port = 3000;
15
36
 
@@ -75,7 +96,7 @@ if (process.argv.length === 2) {
75
96
  // No command specified, run in stdio mode using MCP SDK
76
97
  const mcpServer = new McpServer({
77
98
  name: "report_gen_mcp",
78
- version: "1.0.24",
99
+ version: "1.0.28",
79
100
  }, {
80
101
  // Disable health check to prevent automatic calls
81
102
  capabilities: {