{
  "name": "mcp-prompt-optimizer",
  "version": "3.8.1",
  "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.",
  "main": "index.js",
  "bin": {
    "mcp-prompt-optimizer": "index.js"
  },
  "scripts": {
    "start": "node index.js",
    "check-status": "node lib/check-status.js",
    "validate-key": "node lib/validate-key.js",
    "clear-cache": "node lib/clear-cache.js",
    "diagnose": "node lib/diagnose.js",
    "dev": "cross-env OPTIMIZER_DEV_MODE=true OPTIMIZER_API_KEY=sk-dev-test-key node index.js",
    "dev:mock": "cross-env NODE_ENV=development OPTIMIZER_DEV_MODE=true OPTIMIZER_API_KEY=sk-dev-mock-key node index.js",
    "dev:windows": "set OPTIMIZER_DEV_MODE=true && set OPTIMIZER_API_KEY=sk-dev-test-key && node index.js",
    "dev:unix": "OPTIMIZER_DEV_MODE=true OPTIMIZER_API_KEY=sk-dev-test-key node index.js",
    "health-check": "node -e \"console.log('Package health check passed')\"",
    "reset-cache": "node lib/clear-cache.js && echo 'Cache and health data cleared'",
    "test": "node tests/test-runner.js",
    "test:quick": "node tests/quick-test.js",
    "test:integration": "node tests/integration-test.js",
    "test:comprehensive": "node tests/comprehensive-test.js",
    "test:runner": "node tests/test-runner.js",
    "test:simple": "node tests/simple-test.js",
    "test:contract": "node tests/contract-check.js",
    "test:e2e": "node tests/e2e-stdio-smoke.js",
    "pretest": "npm run health-check",
    "prepublishOnly": "npm run test:quick",
    "version": "echo 'Updating version...' && npm run test:quick"
  },
  "dependencies": {
    "@modelcontextprotocol/sdk": "^1.15.1",
    "node-fetch": "^3.0.0"
  },
  "devDependencies": {
    "cross-env": "^7.0.3"
  },
  "engines": {
    "node": ">=16.0.0"
  },
  "os": [
    "win32",
    "darwin",
    "linux"
  ],
  "cpu": [
    "x64",
    "arm64"
  ],
  "keywords": [
    "mcp",
    "mcp-server",
    "prompt",
    "optimization",
    "ai",
    "claude",
    "anthropic",
    "prompt-engineering",
    "llm",
    "cursor",
    "windsurf",
    "cline",
    "context-aware",
    "professional",
    "automation"
  ],
  "author": "Prompt Optimizer Team <support@promptoptimizer.xyz>",
  "license": "Proprietary",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/prompt-optimizer/mcp-prompt-optimizer.git"
  },
  "homepage": "https://promptoptimizer.xyz",
  "bugs": {
    "url": "https://github.com/prompt-optimizer/mcp-prompt-optimizer/issues"
  },
  "files": [
    "index.js",
    "lib/",
    "README.md",
    "CHANGELOG.md",
    "CONTRIBUTING.md",
    "CODE_OF_CONDUCT.md",
    "SECURITY.md",
    "LICENSE"
  ],
  "config": {
    "crossPlatform": true,
    "platforms": [
      "win32-x64",
      "darwin-x64",
      "darwin-arm64",
      "linux-x64",
      "linux-arm64"
    ],
    "securityRequired": true,
    "binaryIntegrity": false,
    "freeTierSupport": false
  },
  "platforms": {
    "win32-x64": {
      "supported": true,
      "tested": true
    },
    "darwin-x64": {
      "supported": true,
      "tested": true
    },
    "darwin-arm64": {
      "supported": true,
      "tested": true
    },
    "linux-x64": {
      "supported": true,
      "tested": true
    },
    "linux-arm64": {
      "supported": true,
      "tested": false
    }
  },
  "api_requirements": {
    "required_keys": [
      {
        "name": "OPTIMIZER_API_KEY",
        "format": "sk-opt-*, sk-team-*, or sk-dev-*",
        "description": "Cloud API key from promptoptimizer.xyz/dashboard or development key for testing",
        "required": true
      }
    ],
    "optional_keys": [
      {
        "name": "OPTIMIZER_BACKEND_URL",
        "description": "Custom backend URL (defaults to production)",
        "required": false
      },
      {
        "name": "OPTIMIZER_DEV_MODE",
        "description": "Enable development mode (true/false)",
        "required": false,
        "default": "false"
      },
      {
        "name": "ENABLE_BAYESIAN_OPTIMIZATION",
        "description": "Enable Bayesian optimization features (true/false)",
        "required": false,
        "default": "true"
      },
      {
        "name": "ENABLE_AGUI_FEATURES",
        "description": "Enable AG-UI real-time optimization features (true/false)",
        "required": false,
        "default": "true"
      }
    ]
  },
  "features": {
    "core": {
      "ai_context_detection": true,
      "template_management": true,
      "optimization_insights": true,
      "quota_management": true,
      "multi_tier_support": true,
      "error_handling": true,
      "caching": true,
      "fallback_modes": true
    },
    "advanced": {
      "bayesian_optimization": true,
      "ag_ui_real_time": true,
      "streaming_optimization": true,
      "intelligent_routing": true,
      "performance_analytics": true,
      "ai_aware_rules": true,
      "context_aware_templates": true,
      "parameter_tuning": true
    },
    "enterprise": {
      "team_collaboration": true,
      "advanced_analytics": true,
      "custom_models": true,
      "priority_support": true,
      "sla_guarantees": true,
      "dedicated_resources": true
    }
  },
  "backend_alignment": {
    "version": "production-v2.3.0",
    "api_version": "v1",
    "endpoints_aligned": true,
    "feature_parity": true,
    "bayesian_support": true,
    "agui_support": true,
    "last_sync": "2026-06-01T00:00:00Z"
  },
  "release_notes": {
    "v3.7.5": {
      "major_features": [
        "Fixed: 10 MCP tools (generate_agent_sop, transform_for_framework, generate_harness_bundle, explore_sop_approaches, get_prompt_by_slug, compile_prompt, list_template_versions, rollback_template, publish_template, run_quick_evaluation) called backend routes that only accepted a JWT, which this stdio client can never obtain — every call failed unconditionally. Backend now accepts API-key auth on these routes too.",
        "Fixed: the tier-upgrade message for these tools never fired because the code checked for the literal string '403' inside the error body, which never appears there (that's the HTTP status code, not body text). Now checks the real status code.",
        "Fixed: get_optimization_insights and get_real_time_status fell back to hardcoded fake data (fabricated optimization counts, fake AG-UI metrics) on any backend error, presented as real account data. Both now report unavailability honestly instead.",
        "Fixed: formatRealTimeStatus was never reading the AG-UI status endpoint's actual response shape, even on success.",
        "Fixed: formatQuotaStatus invented a fake 5000 quota limit when the backend didn't report one.",
        "Fixed: free-tier quota text said 7/month; actual limit is 20.",
        "Fixed: dead promptoptimizer-blog.vercel.app domain and wrong sk-local-* key-format claims (that's the sibling local package's prefix, not this one's) across index.js, check-status.js, and package.json."
      ],
      "breaking_changes": [],
      "migration_guide": "No migration required. Users who called any of the 10 previously-broken MCP tools will now get real results instead of an auth error."
    },
    "v3.7.4": {
      "major_features": [
        "Fixed: 6 of 8 documented CLI commands (check-status, validate-key, diagnose, clear-cache, help, version) were not implemented in the argv dispatcher and silently started the blocking MCP server instead, hanging the terminal. Now wired to their lib/*.js implementations.",
        "Fixed: unrecognized CLI arguments now print an error + usage to stderr and exit(1), instead of silently falling through to server startup. Removes the entire hung-terminal bug class, not just the known commands.",
        "Removed 'test' from documented CLI commands: it mapped to a maintainer-only pre-publish script (tests/test-runner.js) that isn't included in the published package."
      ],
      "breaking_changes": [],
      "migration_guide": "No migration required. Only affects users who ran documented CLI subcommands other than 'connect', which previously hung."
    },
    "v3.7.3": {
      "major_features": [
        "Docs only: corrected stale free-tier quota in README (7 optimizations/month -> 20), matching the backend enforcement fix"
      ],
      "breaking_changes": [],
      "migration_guide": "No migration required."
    },
    "v3.7.2": {
      "major_features": [
        "MCP server startup logs (banner, status lines, mode indicators, key validation messages) now write to stderr so stdout stays a clean JSON-RPC channel for stdio MCP clients"
      ],
      "breaking_changes": [],
      "migration_guide": "No migration required. Log stream was incorrect on stdout for stdio transports; consumers that relied on parsing startup banners should now read stderr."
    },
    "v3.4.1": {
      "major_features": [
        "D6 pricing migration: tier names updated to free/pro/enterprise (was free_trial/explorer/creator/innovator)",
        "Tier-limit error message simplified to 'Pro tier or higher' matching new backend tier model",
        "Mock mode and account status display default to 'free' tier"
      ],
      "breaking_changes": [],
      "migration_guide": "No migration required. Existing API keys and configurations remain valid."
    },
    "v3.3.0": {
      "major_features": [
        "New tool: generate_harness_bundle — generate a deployment-ready Agentic Harness ZIP for 9 platforms (claude_code, claude_desktop, cursor, copilot, windsurf, cline, zed, replit, openai_agents)",
        "generate_agent_sop now accepts intent_frame parameter (perspective, out_of_scope, success_definition) to sharpen SOP scope and success criteria",
        "Explorer+ tier gate enforced server-side for non-default deploy targets",
        "callBackendAPI now handles binary (ZIP) responses gracefully — skips JSON parse for non-JSON content types",
        "Improved TIER_LIMIT_REACHED error detection with proper error detail stringification"
      ],
      "breaking_changes": [],
      "migration_guide": "No migration required. Both new features are additive and fully optional; existing calls are unaffected."
    },
    "v3.2.3": {
      "major_features": [
        "optimize_prompt now accepts intent_frame parameter for Question Method intent framing",
        "intent_frame.perspective steers optimization toward a specific angle or thesis",
        "intent_frame.out_of_scope excludes topics/approaches from optimization scope",
        "intent_frame.success_definition defines what a successful output achieves",
        "Any non-null intent_frame field floors routing to HYBRID tier minimum for higher-quality optimization",
        "Fixed value_hierarchy passthrough — was sent by client but silently dropped by backend MCP router (now fixed end-to-end)"
      ],
      "breaking_changes": [],
      "migration_guide": "No migration required. intent_frame is fully optional; existing calls are unaffected."
    },
    "v3.2.2": {
      "major_features": [
        "optimize_prompt now accepts value_hierarchy parameter for constraint-driven optimization",
        "NON_NEGOTIABLE entries force LLM-tier routing and inject hard constraints into system prompt",
        "HIGH/MEDIUM/LOW entries add ordered priority directives to optimization context"
      ],
      "breaking_changes": [],
      "migration_guide": "No migration required. value_hierarchy is fully optional; existing calls are unaffected."
    },
    "v3.0.5": {
      "major_features": [
        "Updated homepage and support links to promptoptimizer.xyz"
      ],
      "breaking_changes": [],
      "migration_guide": "No migration required. Drop-in replacement for v3.0.4."
    },
    "v3.0.4": {
      "major_features": [
        "Bayesian optimization with parameter tuning",
        "AG-UI real-time optimization capabilities",
        "Enhanced AI context detection with weighted scoring",
        "Advanced template search with AI-aware filtering"
      ],
      "breaking_changes": [],
      "migration_guide": "All existing functionality remains compatible. New features are opt-in via environment variables.",
      "backend_compatibility": "Fully aligned with FastAPI Backend v2.1.0-bayesian"
    }
  },
  "support": {
    "email": "support@promptoptimizer.xyz",
    "documentation": "https://promptoptimizer.xyz/docs",
    "dashboard": "https://promptoptimizer.xyz/dashboard",
    "pricing": "https://promptoptimizer.xyz/pricing"
  }
}
