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"
4
4
import { z } from "zod" ;
5
5
import fetch from 'node-fetch' ;
6
6
import winston from 'winston' ;
7
+ const VERSION = "0.0.1" ; // Version of the MCP server
7
8
// Configure winston logger
8
9
const logger = winston . createLogger ( {
9
10
level : 'info' ,
@@ -20,14 +21,15 @@ if (!SOCKET_API_KEY) {
20
21
process . exit ( 1 ) ;
21
22
}
22
23
const SOCKET_HEADERS = {
24
+ "user-agent" : `socket-mcp/${ VERSION } ` ,
23
25
"accept" : "application/x-ndjson" ,
24
26
"content-type" : "application/json" ,
25
27
"authorization" : `Bearer ${ SOCKET_API_KEY } `
26
28
} ;
27
29
// Create server instance
28
30
const server = new McpServer ( {
29
31
name : "socket" ,
30
- version : "0.0.1" ,
32
+ version : VERSION ,
31
33
description : "Socket MCP server" ,
32
34
capabilities : {
33
35
resources : { } ,
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import { z } from "zod";
5
5
import fetch from 'node-fetch' ;
6
6
import winston from 'winston' ;
7
7
8
+ const VERSION = "0.0.1" ; // Version of the MCP server
9
+
8
10
// Configure winston logger
9
11
const logger = winston . createLogger ( {
10
12
level : 'info' ,
@@ -28,6 +30,7 @@ if (!SOCKET_API_KEY) {
28
30
}
29
31
30
32
const SOCKET_HEADERS = {
33
+ "user-agent" : `socket-mcp/${ VERSION } ` ,
31
34
"accept" : "application/x-ndjson" ,
32
35
"content-type" : "application/json" ,
33
36
"authorization" : `Bearer ${ SOCKET_API_KEY } `
@@ -36,7 +39,7 @@ const SOCKET_HEADERS = {
36
39
// Create server instance
37
40
const server = new McpServer ( {
38
41
name : "socket" ,
39
- version : "0.0.1" ,
42
+ version : VERSION ,
40
43
description : "Socket MCP server" ,
41
44
capabilities : {
42
45
resources : { } ,
You can’t perform that action at this time.
0 commit comments