@tigerdata/mcp-boilerplate 0.1.7 → 0.1.9
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/dist/index.d.ts +7 -0
- package/dist/index.js +5 -0
- package/dist/logger.js +5 -3
- package/package.json +9 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { cliEntrypoint } from './cliEntrypoint.js';
|
|
2
|
+
export { httpServerFactory } from './httpServer.js';
|
|
3
|
+
export { log } from './logger.js';
|
|
4
|
+
export { stdioServerFactory } from './stdio.js';
|
|
5
|
+
export { type ApiFactory } from './types.js';
|
|
6
|
+
export { StatusError } from './StatusError.js';
|
|
7
|
+
export { type AdditionalSetupArgs } from './mcpServer.js';
|
package/dist/index.js
ADDED
package/dist/logger.js
CHANGED
|
@@ -2,9 +2,11 @@ import { logs, SeverityNumber } from '@opentelemetry/api-logs';
|
|
|
2
2
|
const name = process.env.OTEL_SERVICE_NAME || 'mcp-app';
|
|
3
3
|
const logger = logs.getLogger(name);
|
|
4
4
|
// Helper functions to replace console.log
|
|
5
|
+
// We use console.error for all levels so that messages are written to stderr
|
|
6
|
+
// and not stdout, which would interfere with the stdio MCP transport.
|
|
5
7
|
export const log = {
|
|
6
8
|
debug: (...args) => {
|
|
7
|
-
console.
|
|
9
|
+
console.error(...args);
|
|
8
10
|
const [body, attributes] = args;
|
|
9
11
|
logger.emit({
|
|
10
12
|
severityText: 'DEBUG',
|
|
@@ -18,7 +20,7 @@ export const log = {
|
|
|
18
20
|
});
|
|
19
21
|
},
|
|
20
22
|
info: (...args) => {
|
|
21
|
-
console.
|
|
23
|
+
console.error(...args);
|
|
22
24
|
const [body, attributes] = args;
|
|
23
25
|
logger.emit({
|
|
24
26
|
severityText: 'INFO',
|
|
@@ -32,7 +34,7 @@ export const log = {
|
|
|
32
34
|
});
|
|
33
35
|
},
|
|
34
36
|
warn: (...args) => {
|
|
35
|
-
console.
|
|
37
|
+
console.error(...args);
|
|
36
38
|
const [body, attributes] = args;
|
|
37
39
|
logger.emit({
|
|
38
40
|
severityText: 'WARN',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tigerdata/mcp-boilerplate",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "MCP boilerplate code for Node.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "TigerData",
|
|
@@ -10,6 +10,14 @@
|
|
|
10
10
|
"url": "https://github.com/timescale/mcp-boilerplate-node"
|
|
11
11
|
},
|
|
12
12
|
"type": "module",
|
|
13
|
+
"main": "dist/index.js",
|
|
14
|
+
"types": "dist/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
13
21
|
"files": [
|
|
14
22
|
"dist"
|
|
15
23
|
],
|