@cybermem/mcp 0.6.2 → 0.6.4

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.js CHANGED
@@ -110,8 +110,9 @@ const apiClient = axios_1.default.create({
110
110
  });
111
111
  // Helper to get client with context
112
112
  function getClient(customHeaders = {}) {
113
- // Identity is taken from currentClientName which is updated per-request in SSE mode
114
- const clientName = customHeaders["X-Client-Name"] || currentClientName;
113
+ // Get client name from MCP protocol (sent during initialize) or fallback to CLI arg
114
+ const clientVersion = server.getClientVersion();
115
+ const clientName = customHeaders["X-Client-Name"] || clientVersion?.name || currentClientName;
115
116
  return {
116
117
  ...apiClient,
117
118
  get: (url, config) => apiClient.get(url, { ...config, headers: { "X-Client-Name": clientName, ...config?.headers } }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cybermem/mcp",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "description": "CyberMem MCP Server (TypeScript)",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -3,9 +3,9 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
3
  import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
4
4
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5
5
  import {
6
- CallToolRequestSchema,
7
- ListToolsRequestSchema,
8
- Tool
6
+ CallToolRequestSchema,
7
+ ListToolsRequestSchema,
8
+ Tool
9
9
  } from "@modelcontextprotocol/sdk/types.js";
10
10
  import axios from "axios";
11
11
  import cors from "cors";
@@ -122,8 +122,9 @@ const apiClient = axios.create({
122
122
 
123
123
  // Helper to get client with context
124
124
  function getClient(customHeaders: Record<string, string> = {}) {
125
- // Identity is taken from currentClientName which is updated per-request in SSE mode
126
- const clientName = customHeaders["X-Client-Name"] || currentClientName;
125
+ // Get client name from MCP protocol (sent during initialize) or fallback to CLI arg
126
+ const clientVersion = server.getClientVersion();
127
+ const clientName = customHeaders["X-Client-Name"] || clientVersion?.name || currentClientName;
127
128
 
128
129
  return {
129
130
  ...apiClient,