Skip to main content
AI-Powered Context Detection & Professional Optimization

Documentation

Complete guide to integrating and using Prompt Optimizer's AI-powered prompt engineering platform with intelligent context detection and universal MCP compatibility

Security & Compliance Status

Our platform is built on a enterprise-ready security foundation with comprehensive authentication, multi-tenant isolation, and audit trails. We are currently in the SOC 2 Type I preparation phaseand maintain GDPR/CCPA-compliant practices. Full SOC 2 Type II certification is planned for 2025 Q2.

Direct API Access

AI-powered optimization APIs with automatic context detection and team collaboration

curl -X POST api/v1/optimize
-H "X-API-Key: sk-opt-your-key"

MCP Integration

Seamless integration with Claude Desktop, Cursor, Windsurf, and 17+ MCP clients

npm install -g mcp-prompt-optimizer
mcp-prompt-optimizer --setup

What Makes Our AI Engine Unique

Context Detection

Automatically detects image generation, LLM interaction, technical contexts

50+ Techniques

Advanced optimization goals with intelligent routing between rules and LLM

Parameter Safe

Preserves technical parameters like --ar, --v, code blocks

Universal MCP

Works with 17+ clients including Claude Desktop, Cursor, Windsurf

Platform Overview

Prompt Optimizer is a professional AI-powered prompt enhancement platform that combines intelligent context detection with universal MCP integration:

• **AI Context Detection** - Automatically detects image generation, LLM interaction, and technical automation contexts

• **Professional Optimization** - 50+ sophisticated optimization techniques including clarity, specificity, and technical accuracy

• **Universal MCP Integration** - Works seamlessly with Claude Desktop, Cursor, Windsurf, and 17+ MCP clients

• **Team Collaboration** - Multi-user subscriptions with shared quotas and collaborative template management

• **Enterprise Security Foundation** - Multi-tenant architecture with role-based access and comprehensive audit trails

• **High Performance** - Sub-50ms response times with intelligent routing between rules and LLM optimization

Subscription Plans

All plans include the same sophisticated AI engine with full capabilities. Plans differ only in usage quotas, team size, and support level.

Explorer ($2.99/month)

*Perfect for individual developers exploring professional prompt engineering*

• **5,000 optimizations/month** - Generous quota for personal projects

• **1 API key included** - Individual access with full MCP integration

• **Full AI engine access** - Complete optimization capabilities

• **Web UI access** - Browser-based optimization interface

• **Template management** - Save and review all optimizations

• **AI context detection** - Automatic context recognition and routing

• **All optimization techniques** - Access to all 50+ professional goals

• **Community support** - Standard support channels

**Creator ($25.99/month)** ⭐ *Most Popular*

*Ideal for creators and small teams*

• **18,000 optimizations/month** - Perfect for active development teams

• **Up to 3 API keys** - Team collaboration support

• **2 team members included** - Shared access and collaboration

• **Full AI engine access** - Complete optimization capabilities

• **Priority processing** - Faster response times

• **Batch file processing** - Process multiple files simultaneously

• **Template analytics** - Track optimization patterns and effectiveness

• **Team collaboration** - Shared templates and usage tracking

• **Email support** - Standard support with 12-24 hour response

Innovator ($69.99/month)

*Enterprise-grade for large teams and agencies*

• **75,000 optimizations/month** - Enterprise-level capacity

• **Up to 10 API keys** - Large team management

• **5 team members included** - Full team collaboration

• **Full AI engine access** - Complete optimization capabilities

• **Advanced analytics dashboard** - Comprehensive usage insights

• **Priority processing** - Fastest response times

• **Priority support** - Dedicated support with 2-6 hour response

• **Team management tools** - Admin/member roles and permissions

• **Dedicated support channel** - Enhanced support experience

AI Intelligence Features

Context Detection System:

• **Image Generation Detection** - Automatically identifies Midjourney, DALL-E, and other image prompts

• **LLM Interaction Analysis** - Recognizes conversational and instruction-based prompts

• **Technical Automation** - Detects code generation, API calls, and technical workflows

• **Parameter Preservation** - Maintains technical parameters like --ar, --v, code blocks

Intelligent Routing:

• **Advanced Rules Engine** - Comprehensive rule-based optimization for specific contexts

• **LLM Enhancement** - AI-powered optimization for complex and nuanced prompts

• **Hybrid Approach** - Combines rule-based precision with AI intelligence

• **Context-Aware Selection** - Automatically chooses optimal optimization strategy

Professional Optimization Goals:

clarity - Improve readability and understanding

specificity - Add concrete details and precise instructions

technical_accuracy - Enhance technical precision and terminology

contextual_relevance - Align with specific domains and use cases

actionability - Make prompts more executable and practical

structure - Organize information logically and coherently

conciseness - Remove redundancy while preserving meaning

technical_precision - Optimize for technical and professional contexts

linguistic_precision - Enhance language quality and style

holistic_effectiveness - Comprehensive optimization across all dimensions

Deployment Options

Option 1: Direct API Access

• Call our cloud API directly from your applications

• RESTful endpoints with JSON request/response format

• Authentication via API keys (sk-opt-* format)

• Real-time optimization responses under 50ms average

• Ideal for web applications, scripts, and custom integrations

Option 2: MCP Integration (Recommended)

• Install our NPM package: npm install -g mcp-prompt-optimizer

• Local server acts as bridge between MCP clients and cloud API

• Zero configuration needed beyond API key setup

• Seamless integration with Claude Desktop, Cursor, Windsurf, and more

• Perfect for AI-assisted development workflows

Option 3: Web Interface

• Browser-based optimization interface

• Team collaboration and template management

• Real-time usage analytics and insights

• API key generation and management

API Reference

**Base URL:** https://p01--project-optimizer--fvrdk8m9k9j.code.run

Authentication:

• All requests require API key in X-API-Key header

• API keys format: sk-opt-[random-string]

• Generate keys from your dashboard after subscribing

Core Optimization Endpoints:

POST /api/v1/optimize - Standard optimization with AI context detection

POST /api/v1/optimize/stream - Streaming optimization with SSE

GET /api/v1/optimize/quota - Team quota status

POST /api/v1/optimize/download - Download optimization as JSON template

POST /api/v1/optimize/download-simple - Download as text file

File Processing Endpoints:

POST /api/v1/upload/parse - Upload and parse files (TXT, JSON, DOCX, PDF, MD)

POST /api/v1/upload/batch-optimize - Batch optimization with parallel/sequential processing

API Key Management:

POST /api/v1/api-keys/generate - Generate new API keys

GET /api/v1/api-keys/list - List user API keys

DELETE /api/v1/api-keys/{key_id} - Revoke API key

POST /api/v1/validate-key - Validate API key

Template Management:

GET /api/v1/templates - List saved templates

POST /api/v1/templates - Save optimization as template

GET /api/v1/templates/{template_id} - Get specific template

DELETE /api/v1/templates/{template_id} - Delete template

Team Management:

GET /api/v1/teams/members - List team members (admin only)

GET /api/v1/teams/usage - Team usage analytics

POST /api/v1/teams/invite - Invite team members

Health & Status:

GET /health - Service health check

Available Optimization Goals:

clarity, conciseness, technical_accuracy, contextual_relevance, specificity, actionability, structure, technical_precision, linguistic_precision, holistic_effectiveness

MCP Integration

NPM Package Installation

# Install globally

npm install -g mcp-prompt-optimizer

# Setup API key

mcp-prompt-optimizer --setup

Package Details:

• **Package Name:** mcp-prompt-optimizer

• **Current Version:** 1.0.1

• **Node Requirements:** >=16.0.0

• **Repository:** https://github.com/nivlewd1/prompt-optimizer

MCP Client Configuration

**Claude Desktop** (~/.claude/claude_desktop_config.json):

{

"mcpServers": {

"prompt-optimizer": {

"command": "npx",

"args": ["mcp-prompt-optimizer"]

}

}

}

**Cursor IDE** (~/.cursor/mcp.json):

Same configuration as Claude Desktop

Windsurf:

Configure via Windsurf settings or add to configuration file with same format

Supported MCP Clients:

• Claude Desktop - Anthropic's official desktop application

• Cursor - AI-powered code editor

• Windsurf - AI development environment

• Cline - AI coding assistant

• VS Code - With MCP extensions

• Zed Editor - High-performance editor

• Replit - Browser-based development

• + Any MCP-compatible client

Team Collaboration

Team Management Features:

• **Multi-user Subscriptions** - Shared billing and quota management

• **Role-Based Access** - Admin and member roles with appropriate permissions

• **Shared Quota System** - Team quota shared across all members

• **Billing Synchronization** - Quota resets on team's Stripe billing date

• **Template Sharing** - Collaborative optimization template library

• **Usage Analytics** - Real-time team usage tracking and insights

Team Quota Management:

• **Billing Date Reset** - Quotas reset on your Stripe billing anniversary (not calendar month)

• **Real-time Tracking** - Live usage monitoring across all team members

• **Automatic Management** - System automatically handles quota resets and limits

• **Grace Periods** - Subscription management handled through Stripe portal

Team Roles:

• **Admin** - Full team management, billing access, member invitation, API key generation

• **Member** - Access to team quota, shared templates, and optimization features

Team Analytics:

• Track usage patterns across team members

• Monitor optimization effectiveness and confidence scores

• Export usage data for reporting and analysis

• View billing period summaries and projections

File Processing

Supported File Types:

• **Text Files** - .txt, .md (Markdown)

• **Documents** - .docx (Microsoft Word), .pdf (PDF)

• **Data Files** - .json (JSON with automatic structure detection)

• **Templates** - Automatic prompt template recognition and parsing

Processing Capabilities:

• **Batch Upload** - Process up to 10 files simultaneously (10MB each)

• **Intelligent Parsing** - Context-aware content extraction and prompt identification

• **Parallel Processing** - Configurable concurrency for faster batch optimization

• **Error Tolerance** - Continue processing even if individual files fail

• **Metadata Preservation** - Maintain file structure and context information

AI-Enhanced Processing:

• **Context Detection** - Automatically identifies prompt contexts within files

• **Parameter Preservation** - Maintains technical parameters and formatting

• **Intelligent Chunking** - Optimal prompt segmentation for large files

Batch Optimization:

POST /api/v1/upload/batch-optimize

Content-Type: application/json

X-API-Key: sk-opt-your-key

{

"prompts": [

{

"prompt": "First prompt to optimize",

"goals": ["clarity"]

},

{

"prompt": "Second prompt to optimize",

"goals": ["specificity"]

}

],

"parallel_processing": true,

"continue_on_error": true

}

Template Management

Automatic Template Saving:

• Every successful optimization is automatically saved as a template

• Rich metadata includes timestamps, goals, confidence scores, and request IDs

• Templates linked to your account for privacy and organization

• Full audit trail for compliance and review purposes

Enhanced Template Features:

• **Intelligent Categorization** - Automatic prompt classification and tagging

• **Performance Metrics** - Confidence scores and optimization effectiveness tracking

• **Context Recognition** - AI-detected context information preserved

• **Parameter Tracking** - Technical parameters and formatting maintained

Template Structure:

• Original and optimized prompt text

• Optimization goals and confidence metrics

• AI-detected context and complexity analysis

• Team ID and user metadata for collaboration

• Usage statistics and effectiveness tracking

Export Options:

• **JSON Templates** - Complete metadata and structure preservation

• **Simple Text** - Clean, readable format with context

• **Batch Export** - Multiple templates with analytics

Access Methods:

• View templates through the web dashboard

• Export capabilities for data portability

• API endpoints for programmatic access

• Team-shared templates for collaboration

Security & Privacy

Production-Grade Security Foundation:

• **API Authentication** - Secure sk-opt-* format keys with server-side validation

• **Team Isolation** - Multi-tenant architecture with secure workload separation

• **Role-Based Access Control** - Granular permissions for team members

• **Data Encryption** - Industry-standard encryption at rest and in transit

• **Audit Trails** - Comprehensive request logging and usage tracking

• **Rate Limiting** - Intelligent throttling to prevent abuse

Privacy Protection:

• **Intellectual Property** - You retain full rights to all prompts and optimizations

• **No Training Data** - Your content is never used to train AI models

• **Team Privacy** - Secure isolation between different teams and users

• **HTTPS Only** - All communications encrypted with TLS 1.3

Compliance Roadmap:

• **Security-First Architecture** - Enterprise-ready security foundation implemented

• **SOC 2 Compliance Planning** - Currently in preparation phase for Type I audit

• **GDPR and CCPA Ready** - Privacy-compliant data handling practices

• **Regular Security Monitoring** - Ongoing security assessments and monitoring

• **Encrypted Storage** - All API keys and sensitive data encrypted at rest

Technical Infrastructure

Backend Technology:

• **Framework** - FastAPI with high-performance async processing

• **Database** - PostgreSQL via Supabase with real-time capabilities

• **Hosting** - Northflank enterprise cloud platform

• **Payments** - Stripe with comprehensive webhook handling

• **Authentication** - OAuth 2.0 + JWT with secure session management

Performance Specifications:

• **Response Time** - Sub-50ms average for optimization requests

• **Uptime** - 99.9% target SLA with comprehensive monitoring

• **Scalability** - Auto-scaling infrastructure based on demand

• **Global CDN** - Optimized latency worldwide

AI Engine Performance:

• **Intelligent Routing** - Sub-10ms context detection

• **Hybrid Processing** - Rules engine + LLM optimization

• **Parameter Preservation** - Zero-loss technical parameter handling

• **Batch Processing** - Parallel optimization with configurable concurrency

Rate Limits:

• **Explorer**: 10 requests/minute

• **Creator**: 20 requests/minute

• **Innovator**: 50 requests/minute

• **Enterprise**: Custom limits available

Getting Started

Option 1: MCP Integration (Recommended)

1. **Install Package**: npm install -g mcp-prompt-optimizer

2. **Setup API Key**: mcp-prompt-optimizer --setup

3. **Configure Client**: Add to your MCP client configuration

4. **Start Optimizing**: Use within your favorite MCP-compatible tool

Option 2: Direct API Integration

1. **Subscribe**: Choose your plan and subscribe

2. **Generate API Key**: Create key in your dashboard

3. **Make Requests**: Call optimization endpoints directly

4. **Integrate**: Build custom applications using our API

Option 3: Web Interface

1. **Visit Dashboard**: https://promptoptimizer-blog.vercel.app/dashboard

2. **Create Account**: Sign up and choose your subscription

3. **Generate API Key**: Set up access credentials

4. **Start Optimizing**: Use the web interface or integrate with your workflow

Example API Request with Context Detection:

curl -X POST "https://p01--project-optimizer--fvrdk8m9k9j.code.run/api/v1/optimize" \

-H "Content-Type: application/json" \

-H "X-API-Key: sk-opt-your-key" \

-d '{

"prompt": "make a logo for my startup --ar 16:9 --v 6",

"goals": ["clarity", "specificity"]

}'

AI Context Detection In Action:

• Image generation prompts are automatically detected and optimized for visual clarity

• Technical parameters like --ar and --v are preserved

• Context-appropriate optimization goals are applied automatically

Troubleshooting

Common Issues:

MCP Connection Problems:

# Verify installation

npm list -g mcp-prompt-optimizer

# Check Node.js version

node --version # Should be >=16.0.0

# Restart MCP client after configuration changes

API Authentication Issues:

• Verify API key format (should start with sk-opt-)

• Check subscription status in dashboard

• Ensure you have an active subscription for API access

• Test key validation:

curl -X POST "https://p01--project-optimizer--fvrdk8m9k9j.code.run/api/v1/validate-key" \

-H "X-API-Key: your-key"

Quota and Usage:

• Monitor team quota usage in dashboard

• Check quota status via API:

curl -X GET "https://p01--project-optimizer--fvrdk8m9k9j.code.run/api/v1/optimize/quota" \

-H "X-API-Key: your-key"

• Remember quotas reset on billing date, not calendar month

• Upgrade plan for higher limits

Context Detection Issues:

• AI context detection works automatically - no configuration needed

• Technical parameters are preserved automatically

• If optimization seems incorrect, try adding specific context in prompt

Backend Health:

curl https://p01--project-optimizer--fvrdk8m9k9j.code.run/health

Support Channels:

• **Email**: promptoptimizer.help@gmail.com

• **Enterprise**: enterprise@promptoptimizer.help

• **Dashboard**: Live chat for subscribers

• **GitHub**: Bug reports and feature requests

Response Times:

• **Explorer**: Community support (24-48 hours)

• **Creator**: Standard support (12-24 hours)

• **Innovator**: Priority support (2-6 hours)

• **Enterprise**: Dedicated support with SLA