converse-mcp-server 1.15.0 → 1.16.0
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/package.json +11 -11
- package/src/providers/anthropic.js +32 -9
- package/src/tools/chat.js +1 -1
- package/src/tools/consensus.js +1 -1
- package/src/utils/formatStatus.js +4 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "converse-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"description": "Converse MCP Server - Converse with other LLMs with chat and consensus tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -94,22 +94,22 @@
|
|
|
94
94
|
".env.example"
|
|
95
95
|
],
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@anthropic-ai/sdk": "^0.
|
|
98
|
-
"@google/genai": "^1.
|
|
99
|
-
"@mistralai/mistralai": "^1.
|
|
100
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
97
|
+
"@anthropic-ai/sdk": "^0.65.0",
|
|
98
|
+
"@google/genai": "^1.22.0",
|
|
99
|
+
"@mistralai/mistralai": "^1.10.0",
|
|
100
|
+
"@modelcontextprotocol/sdk": "^1.19.1",
|
|
101
101
|
"cors": "^2.8.5",
|
|
102
|
-
"dotenv": "^17.2.
|
|
102
|
+
"dotenv": "^17.2.3",
|
|
103
103
|
"express": "^5.1.0",
|
|
104
|
-
"lru-cache": "^11.
|
|
105
|
-
"openai": "^
|
|
104
|
+
"lru-cache": "^11.2.2",
|
|
105
|
+
"openai": "^6.1.0",
|
|
106
106
|
"p-limit": "^4.0.0",
|
|
107
|
-
"vite": "^7.1.
|
|
107
|
+
"vite": "^7.1.9"
|
|
108
108
|
},
|
|
109
109
|
"devDependencies": {
|
|
110
110
|
"@vitest/coverage-v8": "^3.2.4",
|
|
111
|
-
"cross-env": "^10.
|
|
112
|
-
"eslint": "^9.
|
|
111
|
+
"cross-env": "^10.1.0",
|
|
112
|
+
"eslint": "^9.36.0",
|
|
113
113
|
"prettier": "^3.6.2",
|
|
114
114
|
"rimraf": "^6.0.1",
|
|
115
115
|
"vitest": "^3.2.4"
|
|
@@ -29,6 +29,23 @@ const SUPPORTED_MODELS = {
|
|
|
29
29
|
description: 'Claude Opus 4.1 - Highest level of intelligence and capability with extended thinking',
|
|
30
30
|
aliases: ['claude-opus-4-1', 'claude-4.1-opus', 'claude-4-1-opus', 'opus-4.1', 'opus-4-1', 'claude-4-opus', 'opus-4', 'opus', 'claude-opus', 'claude-opus-4', 'opus4', 'opus4.1', 'claude-opus-4.1']
|
|
31
31
|
},
|
|
32
|
+
'claude-sonnet-4-5-20250929': {
|
|
33
|
+
modelName: 'claude-sonnet-4-5-20250929',
|
|
34
|
+
friendlyName: 'Claude Sonnet 4.5',
|
|
35
|
+
contextWindow: 200000,
|
|
36
|
+
maxOutputTokens: 64000,
|
|
37
|
+
supportsStreaming: true,
|
|
38
|
+
supportsImages: true,
|
|
39
|
+
supportsTemperature: true,
|
|
40
|
+
supportsWebSearch: false,
|
|
41
|
+
supportsThinking: true,
|
|
42
|
+
minThinkingTokens: 1024,
|
|
43
|
+
maxThinkingTokens: 64000,
|
|
44
|
+
timeout: 300000,
|
|
45
|
+
supports1MContext: true, // Beta 1M context support
|
|
46
|
+
description: 'Claude Sonnet 4.5 - Latest Sonnet with enhanced intelligence and optional 1M context',
|
|
47
|
+
aliases: ['claude-4.5-sonnet', 'sonnet-4.5', 'claude-sonnet-4.5', 'sonnet4.5', 'claude-sonnet-4-5']
|
|
48
|
+
},
|
|
32
49
|
'claude-sonnet-4-20250514': {
|
|
33
50
|
modelName: 'claude-sonnet-4-20250514',
|
|
34
51
|
friendlyName: 'Claude Sonnet 4',
|
|
@@ -42,6 +59,7 @@ const SUPPORTED_MODELS = {
|
|
|
42
59
|
minThinkingTokens: 1024,
|
|
43
60
|
maxThinkingTokens: 64000,
|
|
44
61
|
timeout: 300000,
|
|
62
|
+
supports1MContext: true, // Beta 1M context support
|
|
45
63
|
description: 'Claude Sonnet 4 - High intelligence and balanced performance with extended thinking',
|
|
46
64
|
aliases: ['claude-4-sonnet', 'sonnet-4', 'sonnet', 'claude-sonnet', 'claude-sonnet-4', 'sonnet4']
|
|
47
65
|
},
|
|
@@ -357,20 +375,23 @@ export const anthropicProvider = {
|
|
|
357
375
|
const resolvedModel = resolveModelName(model);
|
|
358
376
|
const modelConfig = SUPPORTED_MODELS[resolvedModel] || {};
|
|
359
377
|
|
|
360
|
-
// Initialize Anthropic client
|
|
361
|
-
// Use both prompt caching and extended cache duration headers for 1-hour caching
|
|
362
|
-
// Set beta headers for caching
|
|
363
|
-
const betaHeaders = ['prompt-caching-2024-07-31', 'extended-cache-ttl-2025-04-11'];
|
|
364
|
-
|
|
378
|
+
// Initialize Anthropic client
|
|
365
379
|
const anthropic = new Anthropic({
|
|
366
380
|
apiKey: config.apiKeys.anthropic,
|
|
367
|
-
defaultHeaders: {
|
|
368
|
-
'anthropic-beta': betaHeaders.join(',')
|
|
369
|
-
},
|
|
370
381
|
// Increase timeout to 20 minutes for thinking models that may take longer
|
|
371
382
|
timeout: 20 * 60 * 1000
|
|
372
383
|
});
|
|
373
384
|
|
|
385
|
+
// Build beta features array for the request
|
|
386
|
+
// Use both prompt caching and extended cache duration for 1-hour caching
|
|
387
|
+
const betas = ['prompt-caching-2024-07-31', 'extended-cache-ttl-2025-04-11'];
|
|
388
|
+
|
|
389
|
+
// Add 1M context beta feature if model supports it
|
|
390
|
+
if (modelConfig.supports1MContext) {
|
|
391
|
+
betas.push('context-1m-2025-08-07');
|
|
392
|
+
debugLog(`[Anthropic] Model ${resolvedModel} supports 1M context window with beta feature`);
|
|
393
|
+
}
|
|
394
|
+
|
|
374
395
|
// Convert messages to Anthropic format (system messages are always cached)
|
|
375
396
|
const { systemPrompt, messages: anthropicMessages } = convertMessagesToAnthropic(messages);
|
|
376
397
|
|
|
@@ -379,6 +400,7 @@ export const anthropicProvider = {
|
|
|
379
400
|
model: resolvedModel,
|
|
380
401
|
messages: anthropicMessages,
|
|
381
402
|
stream,
|
|
403
|
+
betas, // Include beta features
|
|
382
404
|
...otherOptions
|
|
383
405
|
};
|
|
384
406
|
|
|
@@ -404,7 +426,7 @@ export const anthropicProvider = {
|
|
|
404
426
|
// For other models, check against max_tokens if set
|
|
405
427
|
const maxTokensLimit = requestPayload.max_tokens ||
|
|
406
428
|
(resolvedModel.includes('claude-opus-4') ? 32000 :
|
|
407
|
-
resolvedModel.includes('claude-sonnet-4') ? 64000 :
|
|
429
|
+
(resolvedModel.includes('claude-sonnet-4-5') || resolvedModel.includes('claude-sonnet-4')) ? 64000 :
|
|
408
430
|
modelConfig.maxOutputTokens);
|
|
409
431
|
|
|
410
432
|
if (thinkingBudget > 0 && thinkingBudget < maxTokensLimit) {
|
|
@@ -449,6 +471,7 @@ export const anthropicProvider = {
|
|
|
449
471
|
max_tokens: requestPayload.max_tokens,
|
|
450
472
|
thinking: requestPayload.thinking,
|
|
451
473
|
temperature: requestPayload.temperature,
|
|
474
|
+
betas: requestPayload.betas,
|
|
452
475
|
message_count: requestPayload.messages?.length,
|
|
453
476
|
system_length: Array.isArray(requestPayload.system) ? requestPayload.system[0]?.text?.length : requestPayload.system?.length
|
|
454
477
|
}, null, 2));
|
package/src/tools/chat.js
CHANGED
|
@@ -810,7 +810,7 @@ async function executeChatWithStreaming(args, dependencies, context) {
|
|
|
810
810
|
}
|
|
811
811
|
|
|
812
812
|
// Tool metadata
|
|
813
|
-
chatTool.description = 'GENERAL CHAT & COLLABORATIVE THINKING -
|
|
813
|
+
chatTool.description = 'GENERAL CHAT & COLLABORATIVE THINKING - Development assistance, brainstorming, code analysis. Supports files, images, continuation_id for multi-turn conversations. Use model: "auto" for automatic selection.';
|
|
814
814
|
chatTool.inputSchema = {
|
|
815
815
|
type: 'object',
|
|
816
816
|
properties: {
|
package/src/tools/consensus.js
CHANGED
|
@@ -1336,7 +1336,7 @@ async function executeConsensusPhaseWithStreaming(providerCalls, messages, phase
|
|
|
1336
1336
|
}
|
|
1337
1337
|
|
|
1338
1338
|
// Tool metadata
|
|
1339
|
-
consensusTool.description = 'PARALLEL CONSENSUS WITH CROSS-MODEL FEEDBACK -
|
|
1339
|
+
consensusTool.description = 'PARALLEL CONSENSUS WITH CROSS-MODEL FEEDBACK - Query multiple models simultaneously, then optionally refine responses based on cross-feedback. For complex decisions, architectural choices, technical evaluations. Use models: ["auto"] for automatic selection.';
|
|
1340
1340
|
consensusTool.inputSchema = {
|
|
1341
1341
|
type: 'object',
|
|
1342
1342
|
properties: {
|
|
@@ -20,12 +20,11 @@ export async function formatJobListHumanReadable(jobsList, dependencies = {}) {
|
|
|
20
20
|
const parts = [];
|
|
21
21
|
|
|
22
22
|
// Summary line - include cancelled jobs if any
|
|
23
|
-
|
|
23
|
+
const summaryParts = [];
|
|
24
24
|
if (jobsList.summary.active_jobs > 0) summaryParts.push(`${jobsList.summary.active_jobs} active`);
|
|
25
25
|
if (jobsList.summary.completed_jobs > 0) summaryParts.push(`${jobsList.summary.completed_jobs} completed`);
|
|
26
26
|
if (jobsList.summary.failed_jobs > 0) summaryParts.push(`${jobsList.summary.failed_jobs} failed`);
|
|
27
27
|
if (jobsList.summary.cancelled_jobs > 0) summaryParts.push(`${jobsList.summary.cancelled_jobs} cancelled`);
|
|
28
|
-
|
|
29
28
|
const summaryStr = summaryParts.length > 0 ? summaryParts.join(', ') : '0 jobs';
|
|
30
29
|
parts.push(`📊 Jobs Summary: ${summaryStr}`);
|
|
31
30
|
|
|
@@ -170,11 +169,11 @@ export async function formatHumanReadableStatus(jobStatus, options = {}, depende
|
|
|
170
169
|
} else if (jobStatus.status === 'running' && !jobStatus.accumulated_content && jobStatus.elapsed_seconds > 5) {
|
|
171
170
|
// Fallback thinking status for jobs without reasoning summaries
|
|
172
171
|
const thinkingTime = Math.floor(jobStatus.elapsed_seconds);
|
|
173
|
-
debugLog(
|
|
174
|
-
parts.push(
|
|
172
|
+
debugLog('[FormatStatus] *** FALLBACK THINKING (no reasoning_summary available)');
|
|
173
|
+
parts.push('Thinking: Model is processing your request (' + thinkingTime + 's elapsed)');
|
|
175
174
|
}
|
|
176
175
|
|
|
177
|
-
// Generate streaming summary for running jobs if accumulated content available
|
|
176
|
+
// Generate streaming summary for running jobs if accumulated content available
|
|
178
177
|
if (jobStatus.status === 'running' && jobStatus.accumulated_content) {
|
|
179
178
|
try {
|
|
180
179
|
if (dependencies.config && dependencies.providers) {
|