cellium-mcp-client 2.0.2 → 2.0.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/cli.js +4 -2
- package/dist/client.js +4 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -46,6 +46,8 @@ async function main() {
|
|
|
46
46
|
logger.info('Token format should be: user:username:hash');
|
|
47
47
|
process.exit(1);
|
|
48
48
|
}
|
|
49
|
+
// Get endpoint from environment or command line (environment takes precedence)
|
|
50
|
+
const endpoint = process.env.CELLIUM_MCP_ENDPOINT || options.endpoint;
|
|
49
51
|
// Validate token format
|
|
50
52
|
if (!token.match(/^user:[^:]+:[a-f0-9]+$/)) {
|
|
51
53
|
logger.error('Invalid token format. Expected: user:username:hash');
|
|
@@ -63,7 +65,7 @@ async function main() {
|
|
|
63
65
|
transportMode
|
|
64
66
|
}, 'Starting Cellium MCP Client');
|
|
65
67
|
logger.debug({
|
|
66
|
-
endpoint
|
|
68
|
+
endpoint,
|
|
67
69
|
httpPort: parseInt(options.port),
|
|
68
70
|
retryAttempts: parseInt(options.retryAttempts),
|
|
69
71
|
retryDelay: parseInt(options.retryDelay),
|
|
@@ -72,7 +74,7 @@ async function main() {
|
|
|
72
74
|
}, 'Configuration loaded');
|
|
73
75
|
const client = new client_1.CelliumMCPClient({
|
|
74
76
|
token,
|
|
75
|
-
endpoint
|
|
77
|
+
endpoint,
|
|
76
78
|
httpPort: parseInt(options.port),
|
|
77
79
|
logger,
|
|
78
80
|
retryAttempts: parseInt(options.retryAttempts),
|
package/dist/client.js
CHANGED
|
@@ -382,6 +382,8 @@ class CelliumMCPClient {
|
|
|
382
382
|
headers: {
|
|
383
383
|
'Authorization': `Bearer ${this.config.token}`,
|
|
384
384
|
'Content-Type': 'application/json',
|
|
385
|
+
'Accept': 'application/json, text/event-stream',
|
|
386
|
+
'MCP-Protocol-Version': this.mcpProtocolVersion,
|
|
385
387
|
'User-Agent': 'cellium-mcp-client/2.0.0'
|
|
386
388
|
},
|
|
387
389
|
body: JSON.stringify(requestBody)
|
|
@@ -615,6 +617,8 @@ class CelliumMCPClient {
|
|
|
615
617
|
headers: {
|
|
616
618
|
'Authorization': `Bearer ${this.config.token}`,
|
|
617
619
|
'Content-Type': 'application/json',
|
|
620
|
+
'Accept': 'application/json, text/event-stream',
|
|
621
|
+
'MCP-Protocol-Version': this.mcpProtocolVersion,
|
|
618
622
|
'User-Agent': 'cellium-mcp-client/2.0.0'
|
|
619
623
|
},
|
|
620
624
|
body: JSON.stringify({
|