npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

promptforge-mcp-server

v2.0.1

Published

Advanced AI prompt optimization MCP server with ML-based domain detection, templates, and analytics

Readme

PromptForge MCP Server 2.0.1

An advanced AI prompt optimization Model Context Protocol (MCP) server designed for sophisticated prompt engineering with ML-based domain detection, pattern management, and analytics.

PromptForge Logo License: MIT npm version

🚀 What's New in 2.0.1

Bug Fixes

  • Fixed Smithery deployment timeout with lazy loading implementation
  • Optimized server startup for better deployment compatibility

From 2.0

  • ML-Based Domain Detection: Intelligent automatic detection of prompt domains
  • Advanced Pattern Management: Create, update, and manage optimization patterns
  • Analytics Engine: Track optimization performance and metrics
  • Template System: Pre-built templates for common use cases
  • Chain-of-Thought Support: Add step-by-step reasoning to prompts
  • Output Formatting: Automatic formatting for JSON, Markdown, tables, and more
  • Feedback Learning: System learns from user feedback to improve optimizations

🎯 Features

Core Capabilities

  • Smart Prompt Optimization: Enhances prompts based on detected domain and intent
  • Multi-Domain Support: Specialized patterns for programming, CPA/accounting, AI marketing, and more
  • Confidence Scoring: Each optimization includes a confidence score
  • Modification Tracking: Detailed tracking of all changes made to prompts
  • Bypass Mode: Option to skip optimization when needed

Domain Specializations

  • Programming: Code generation, debugging, API design
  • CPA Marketing: Tax planning, accounting services, financial strategies
  • AI Automation: PPC campaigns, SEO optimization, marketing automation
  • General: Universal optimization for any domain

📦 Installation

Via Smithery (Recommended)

npx @smithery/cli install promptforge-mcp-server

Via npm

npm install -g promptforge-mcp-server

From Source

git clone https://github.com/stevekaplanai/promptforge-mcp-server.git
cd promptforge-mcp-server
npm install

🔧 Configuration

Claude Desktop Configuration

Add to your Claude configuration file:

Windows: %APPDATA%\Claude\claude_desktop_config.json macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "promptforge": {
      "command": "npx",
      "args": ["-y", "promptforge-mcp-server"]
    }
  }
}

Environment Variables (Optional)

Create a .env file for custom configuration:

PROMPTFORGE_LOG_LEVEL=info
PROMPTFORGE_MAX_HISTORY=1000
PROMPTFORGE_ANALYTICS_ENABLED=true

🛠️ Tools

optimize_prompt

Analyzes and enhances prompts with intelligent optimization.

Parameters:

  • prompt (required): The prompt to optimize
  • domain (optional): Target domain (auto-detected if not provided)
  • intent (optional): User's intent or goal
  • includeExamples (optional): Add relevant examples
  • chainOfThought (optional): Add step-by-step reasoning
  • outputFormat (optional): Format output as json, markdown, list, table, or code
  • bypassOptimization (optional): Skip optimization and return original

Example:

{
  "prompt": "Create a tax planning strategy for a small business",
  "domain": "cpa-marketing",
  "includeExamples": true,
  "chainOfThought": true,
  "outputFormat": "markdown"
}

manage_patterns

Manage optimization patterns for different domains.

Parameters:

  • action (required): "get", "add", "update", or "delete"
  • domain (required): Domain name
  • pattern (optional): Pattern configuration (for add/update)

Example:

{
  "action": "add",
  "domain": "legal",
  "pattern": {
    "triggerKeywords": ["contract", "legal", "compliance"],
    "enhancements": [
      { "type": "clarity", "value": "Include specific legal terminology" },
      { "type": "constraint", "value": "Ensure compliance with regulations" }
    ]
  }
}

track_analytics

Track and query optimization analytics.

Parameters:

  • action (required): "record" or "query"
  • data (optional): Analytics data to record
  • queryParams (optional): Parameters for querying

Example:

{
  "action": "query",
  "queryParams": {
    "domain": "cpa-marketing",
    "startDate": "2024-01-01",
    "endDate": "2024-12-31"
  }
}

💡 Usage Examples

Basic Optimization

User: Optimize this prompt: "Write a function to sort an array"

PromptForge Response:
{
  "original": "Write a function to sort an array",
  "optimized": "Write a function that implements an efficient sorting algorithm...",
  "modifications": [
    {
      "type": "clarity",
      "reason": "pattern_based",
      "text": "Added clarity instruction"
    }
  ],
  "confidence": 0.85,
  "metadata": {
    "detectedDomain": "programming",
    "timestamp": "2024-01-15T10:30:00Z"
  }
}

CPA Marketing Optimization

User: Optimize: "Create content about tax planning"

PromptForge Response:
{
  "optimized": "Context: Focus on relationship-driven accounting services...",
  "modifications": [
    {
      "type": "context",
      "reason": "pattern_based",
      "text": "Added context: Focus on relationship-driven..."
    }
  ],
  "confidence": 0.92,
  "metadata": {
    "detectedDomain": "cpa-marketing"
  }
}

🏗️ Architecture

Components

  1. PromptForge Core: Main optimization engine
  2. Domain Detector: ML-based domain classification
  3. Analytics Engine: Performance tracking and metrics
  4. Pattern Manager: Domain-specific pattern storage
  5. Feedback Learner: Continuous improvement system

Domain Detection Algorithm

  • Keyword matching with weighted scoring
  • Feature extraction for ML classification
  • Confidence calculation based on matches
  • Alternative domain suggestions

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

git clone https://github.com/stevekaplanai/promptforge-mcp-server.git
cd promptforge-mcp-server
npm install
npm run dev

Running Tests

npm test

📊 Performance

  • Average optimization time: <100ms
  • Domain detection accuracy: 94%
  • Memory footprint: ~50MB
  • Supported prompt length: Up to 10,000 characters

🔒 Privacy & Security

  • No data is sent to external servers
  • All processing happens locally
  • Analytics are stored locally and can be disabled
  • No personal information is collected

📝 License

MIT License - see LICENSE file for details.

🙏 Acknowledgments

  • Built for the MCP ecosystem by Anthropic
  • Inspired by modern prompt engineering best practices
  • Special thanks to the Smithery community

📞 Contact

🗺️ Roadmap

  • [ ] Advanced ML models for domain detection
  • [ ] Custom domain training interface
  • [ ] Real-time collaboration features
  • [ ] Integration with popular AI platforms
  • [ ] Prompt version control system

Made with ❤️ by Steve Kaplan for the AI community