mcp-prompt-optimizer 3.1.2 ā 3.2.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/CHANGELOG.md +7 -1
- package/README.md +5 -4
- package/index.js +31 -5
- package/lib/api-key-manager.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.1.3] - 2026-04-13
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- š¦ **Version Bump**: Incremented version to 3.1.3 to ensure clean publishing and link alignment.
|
|
12
|
+
- š **Link Alignment**: Unified API key signup links to https://promptoptimizer.xyz/local-license.
|
|
13
|
+
|
|
8
14
|
## [3.1.2] - 2026-04-12
|
|
9
15
|
|
|
10
16
|
### Added
|
|
@@ -62,7 +68,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
62
68
|
- ā
**Production-only**: Package now enforces backend connectivity
|
|
63
69
|
|
|
64
70
|
### Migration from v2.x
|
|
65
|
-
- All users must have valid API keys from https://promptoptimizer
|
|
71
|
+
- All users must have valid API keys from https://promptoptimizer.xyz/pricing
|
|
66
72
|
- `OPTIMIZER_DEV_MODE=true` no longer works (intentionally disabled)
|
|
67
73
|
- Offline usage no longer supported (requires active backend connection)
|
|
68
74
|
- Short-lived caching (1-2 hours) replaces long-term caching
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# MCP Prompt Optimizer v3.1.
|
|
1
|
+
# MCP Prompt Optimizer v3.1.3
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/mcp-prompt-optimizer)
|
|
4
4
|
[](LICENSE)
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
**1. Get your API key (required):**
|
|
28
28
|
|
|
29
|
-
- **š Free Tier** (`sk-local-*`): 5 daily optimizations ā [promptoptimizer
|
|
29
|
+
- **š Free Tier** (`sk-local-*`): 5 daily optimizations ā [promptoptimizer.xyz/pricing](https://promptoptimizer.xyz/pricing)
|
|
30
30
|
- **ā Paid Tiers** (`sk-opt-*`, `sk-team-*`): Higher quotas, team features, advanced capabilities
|
|
31
31
|
|
|
32
32
|
**2. Install:**
|
|
@@ -431,7 +431,7 @@ Windsurf, Cline, VS Code, Zed, Replit, JetBrains IDEs, and Neovim are all suppor
|
|
|
431
431
|
|
|
432
432
|
- š **Documentation:** [promptoptimizer-blog.vercel.app/docs](https://promptoptimizer-blog.vercel.app/docs)
|
|
433
433
|
- š **Dashboard & model config:** [promptoptimizer-blog.vercel.app/dashboard](https://promptoptimizer-blog.vercel.app/dashboard)
|
|
434
|
-
- š **Pricing & API Keys
|
|
434
|
+
- š **Pricing & API Keys**: [promptoptimizer.xyz/local-license](https://promptoptimizer.xyz/local-license)
|
|
435
435
|
- š **Issues:** [GitHub Issues](https://github.com/prompt-optimizer/mcp-prompt-optimizer/issues)
|
|
436
436
|
- š **License:** [Commercial License](LICENSE)
|
|
437
437
|
- š **Security:** [Security Policy](SECURITY.md)
|
|
@@ -443,4 +443,5 @@ Windsurf, Cline, VS Code, Zed, Replit, JetBrains IDEs, and Neovim are all suppor
|
|
|
443
443
|
|
|
444
444
|
---
|
|
445
445
|
|
|
446
|
-
*Get started with 5 free optimizations at [promptoptimizer
|
|
446
|
+
*Get started with 5 free optimizations at [promptoptimizer.xyz/pricing](https://promptoptimizer.xyz/pricing)*
|
|
447
|
+
at [promptoptimizer.xyz/pricing](https://promptoptimizer.xyz/pricing)*
|
package/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Production-grade with Bayesian optimization, AG-UI real-time features, enhanced network resilience,
|
|
6
6
|
* development mode, and complete backend alignment
|
|
7
7
|
*
|
|
8
|
-
* Version: 3.
|
|
8
|
+
* Version: 3.2.0 - add delete_template tool (15 tools total)
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
const { Server } = require('@modelcontextprotocol/sdk/server/index.js');
|
|
@@ -36,6 +36,9 @@ const ENDPOINTS = {
|
|
|
36
36
|
|
|
37
37
|
/** Update (PATCH) */
|
|
38
38
|
UPDATE: (id) => `${MCP_PREFIX}/templates/${id}`,
|
|
39
|
+
|
|
40
|
+
/** Delete (DELETE) */
|
|
41
|
+
DELETE: (id) => `${MCP_PREFIX}/templates/${id}`,
|
|
39
42
|
},
|
|
40
43
|
|
|
41
44
|
/** Search templates (GET) ā MCP endpoint, API-key auth */
|
|
@@ -188,6 +191,17 @@ class MCPPromptOptimizer {
|
|
|
188
191
|
required: ["template_id"]
|
|
189
192
|
}
|
|
190
193
|
},
|
|
194
|
+
{
|
|
195
|
+
name: "delete_template",
|
|
196
|
+
description: "šļø Delete a saved optimization template by ID.",
|
|
197
|
+
inputSchema: {
|
|
198
|
+
type: "object",
|
|
199
|
+
properties: {
|
|
200
|
+
template_id: { type: "string", description: "The ID of the template to delete" }
|
|
201
|
+
},
|
|
202
|
+
required: ["template_id"]
|
|
203
|
+
}
|
|
204
|
+
},
|
|
191
205
|
{
|
|
192
206
|
name: "search_templates",
|
|
193
207
|
description: "š Search your saved template library with AI-aware filtering, context-based search, and sophisticated template matching",
|
|
@@ -364,6 +378,7 @@ class MCPPromptOptimizer {
|
|
|
364
378
|
case "create_template": return await this.handleCreateTemplate(args);
|
|
365
379
|
case "get_template": return await this.handleGetTemplate(args);
|
|
366
380
|
case "update_template": return await this.handleUpdateTemplate(args);
|
|
381
|
+
case "delete_template": return await this.handleDeleteTemplate(args);
|
|
367
382
|
case "get_optimization_insights": return await this.handleGetOptimizationInsights(args);
|
|
368
383
|
case "get_real_time_status": return await this.handleGetRealTimeStatus();
|
|
369
384
|
case "generate_agent_sop": return await this.handleGenerateAgentSop(args);
|
|
@@ -970,6 +985,17 @@ class MCPPromptOptimizer {
|
|
|
970
985
|
}
|
|
971
986
|
}
|
|
972
987
|
|
|
988
|
+
async handleDeleteTemplate(args) {
|
|
989
|
+
if (!args.template_id) throw new Error('Template ID is required');
|
|
990
|
+
try {
|
|
991
|
+
const result = await this.callBackendAPI(ENDPOINTS.TEMPLATE.DELETE(args.template_id), null, 'DELETE');
|
|
992
|
+
const title = result.message || `Template ${args.template_id}`;
|
|
993
|
+
return { content: [{ type: "text", text: `# šļø Template Deleted\n\n${title}` }] };
|
|
994
|
+
} catch (error) {
|
|
995
|
+
throw new Error(`Failed to delete template: ${error.message}`);
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
|
|
973
999
|
async handleGenerateAgentSop(args) {
|
|
974
1000
|
if (!args.goal) throw new Error('goal is required');
|
|
975
1001
|
const payload = { goal: args.goal };
|
|
@@ -1259,10 +1285,10 @@ class MCPPromptOptimizer {
|
|
|
1259
1285
|
const remaining = limit - used;
|
|
1260
1286
|
if (remaining <= 0) {
|
|
1261
1287
|
output += `\nā **Quota Exhausted** ā You have no optimizations remaining this month.\n`;
|
|
1262
|
-
output += `Upgrade at https://promptoptimizer
|
|
1288
|
+
output += `Upgrade at https://promptoptimizer.xyz/local-license\n`;
|
|
1263
1289
|
output += `*(Quota resets at the start of your next billing cycle)*\n`;
|
|
1264
1290
|
} else if (percentage >= 90) {
|
|
1265
|
-
output += `\nā ļø **Critical** ā ${remaining} optimization${remaining === 1 ? '' : 's'} remaining. Upgrade at https://promptoptimizer
|
|
1291
|
+
output += `\nā ļø **Critical** ā ${remaining} optimization${remaining === 1 ? '' : 's'} remaining. Upgrade at https://promptoptimizer.xyz/local-license\n`;
|
|
1266
1292
|
} else if (percentage >= 75) {
|
|
1267
1293
|
output += `\nā ļø **Warning** ā Approaching your monthly limit.\n`;
|
|
1268
1294
|
}
|
|
@@ -1289,7 +1315,7 @@ class MCPPromptOptimizer {
|
|
|
1289
1315
|
output += `\n## š **Account Management**\n`;
|
|
1290
1316
|
output += `- Dashboard: https://promptoptimizer-blog.vercel.app/dashboard\n`;
|
|
1291
1317
|
output += `- Analytics: https://promptoptimizer-blog.vercel.app/analytics\n`;
|
|
1292
|
-
output += `- Upgrade: https://promptoptimizer
|
|
1318
|
+
output += `- Upgrade: https://promptoptimizer.xyz/local-license\n`;
|
|
1293
1319
|
|
|
1294
1320
|
return output;
|
|
1295
1321
|
}
|
|
@@ -1447,7 +1473,7 @@ async function startValidatedMCPServer() {
|
|
|
1447
1473
|
try {
|
|
1448
1474
|
const apiKey = process.env.OPTIMIZER_API_KEY;
|
|
1449
1475
|
if (!apiKey) {
|
|
1450
|
-
console.error('ā API key required. Get one at https://promptoptimizer
|
|
1476
|
+
console.error('ā API key required. Get one at https://promptoptimizer.xyz/local-license');
|
|
1451
1477
|
process.exit(1);
|
|
1452
1478
|
}
|
|
1453
1479
|
|
package/lib/api-key-manager.js
CHANGED
|
@@ -578,7 +578,7 @@ class CloudApiKeyManager {
|
|
|
578
578
|
|
|
579
579
|
throw new Error(
|
|
580
580
|
'API key required. Set the OPTIMIZER_API_KEY environment variable.\n' +
|
|
581
|
-
'Get your API key at: https://promptoptimizer
|
|
581
|
+
'Get your API key at: https://promptoptimizer.xyz/local-license'
|
|
582
582
|
);
|
|
583
583
|
}
|
|
584
584
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-prompt-optimizer",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Professional cloud-based MCP server for AI-powered prompt optimization with intelligent context detection, Bayesian optimization, AG-UI real-time optimization, template auto-save, optimization insights, personal model configuration via WebUI, team collaboration, enterprise-grade features, production resilience, and startup validation. Universal compatibility with Claude Desktop, Cursor, Windsurf, and 17+ MCP clients.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
{
|
|
125
125
|
"name": "OPTIMIZER_API_KEY",
|
|
126
126
|
"format": "sk-opt-*, sk-team-*, sk-dev-*, or sk-local-*",
|
|
127
|
-
"description": "Cloud API key from promptoptimizer.xyz/
|
|
127
|
+
"description": "Cloud API key from promptoptimizer.xyz/local-license or development key for testing",
|
|
128
128
|
"required": true
|
|
129
129
|
}
|
|
130
130
|
],
|