File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
44import { z } from "zod" ;
55import fetch from 'node-fetch' ;
66import winston from 'winston' ;
7+ const VERSION = "0.0.1" ; // Version of the MCP server
78// Configure winston logger
89const logger = winston . createLogger ( {
910 level : 'info' ,
@@ -20,14 +21,15 @@ if (!SOCKET_API_KEY) {
2021 process . exit ( 1 ) ;
2122}
2223const SOCKET_HEADERS = {
24+ "user-agent" : `socket-mcp/${ VERSION } ` ,
2325 "accept" : "application/x-ndjson" ,
2426 "content-type" : "application/json" ,
2527 "authorization" : `Bearer ${ SOCKET_API_KEY } `
2628} ;
2729// Create server instance
2830const server = new McpServer ( {
2931 name : "socket" ,
30- version : "0.0.1" ,
32+ version : VERSION ,
3133 description : "Socket MCP server" ,
3234 capabilities : {
3335 resources : { } ,
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import { z } from "zod";
55import fetch from 'node-fetch' ;
66import winston from 'winston' ;
77
8+ const VERSION = "0.0.1" ; // Version of the MCP server
9+
810// Configure winston logger
911const logger = winston . createLogger ( {
1012 level : 'info' ,
@@ -28,6 +30,7 @@ if (!SOCKET_API_KEY) {
2830}
2931
3032const SOCKET_HEADERS = {
33+ "user-agent" : `socket-mcp/${ VERSION } ` ,
3134 "accept" : "application/x-ndjson" ,
3235 "content-type" : "application/json" ,
3336 "authorization" : `Bearer ${ SOCKET_API_KEY } `
@@ -36,7 +39,7 @@ const SOCKET_HEADERS = {
3639// Create server instance
3740const server = new McpServer ( {
3841 name : "socket" ,
39- version : "0.0.1" ,
42+ version : VERSION ,
4043 description : "Socket MCP server" ,
4144 capabilities : {
4245 resources : { } ,
You can’t perform that action at this time.
0 commit comments