opik-mcp 0.0.6 → 0.0.7
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/cli.js +22 -28
- package/build/index.js +0 -1
- package/package.json +1 -1
package/build/cli.js
CHANGED
|
@@ -8,36 +8,30 @@ const config = configImport;
|
|
|
8
8
|
const argv = yargs(hideBin(process.argv))
|
|
9
9
|
.scriptName('opik-mcp')
|
|
10
10
|
.usage('$0 [args]')
|
|
11
|
-
.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
type: 'number',
|
|
24
|
-
default: 3001,
|
|
25
|
-
});
|
|
11
|
+
.option('transport', {
|
|
12
|
+
alias: 't',
|
|
13
|
+
description: 'Transport to use (stdio or sse)',
|
|
14
|
+
type: 'string',
|
|
15
|
+
default: 'stdio',
|
|
16
|
+
choices: ['stdio', 'sse'],
|
|
17
|
+
})
|
|
18
|
+
.option('port', {
|
|
19
|
+
alias: 'p',
|
|
20
|
+
description: 'Port to listen on (for sse transport)',
|
|
21
|
+
type: 'number',
|
|
22
|
+
default: 3001,
|
|
26
23
|
})
|
|
27
|
-
.demandCommand(1, 'You need to specify a command')
|
|
28
24
|
.help()
|
|
29
25
|
.alias('help', 'h')
|
|
26
|
+
.strict(false) // Allow unknown options
|
|
30
27
|
.parseSync();
|
|
31
|
-
//
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
configImport.
|
|
35
|
-
if (argv.transport === 'sse') {
|
|
36
|
-
configImport.ssePort = argv.port;
|
|
37
|
-
}
|
|
38
|
-
// Start the server using main from index.ts
|
|
39
|
-
main().catch(error => {
|
|
40
|
-
console.error(`Fatal error: ${error}`);
|
|
41
|
-
process.exit(1);
|
|
42
|
-
});
|
|
28
|
+
// Update config based on CLI arguments
|
|
29
|
+
configImport.transport = argv.transport;
|
|
30
|
+
if (argv.transport === 'sse') {
|
|
31
|
+
configImport.ssePort = argv.port;
|
|
43
32
|
}
|
|
33
|
+
// Start the server
|
|
34
|
+
main().catch(error => {
|
|
35
|
+
console.error(`Fatal error: ${error}`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
});
|
package/build/index.js
CHANGED
|
@@ -13,7 +13,6 @@ const logFile = '/tmp/opik-mcp.log';
|
|
|
13
13
|
// Import configuration
|
|
14
14
|
import { loadConfig } from './config.js';
|
|
15
15
|
const config = loadConfig();
|
|
16
|
-
console.log(config);
|
|
17
16
|
// Define logging functions
|
|
18
17
|
function logToFile(message) {
|
|
19
18
|
// Only log if debug mode is enabled
|