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 🙏

© 2026 – Pkg Stats / Ryan Hefner

promptrix-mcp

v0.1.1

Published

MCP Server for Promptrix - AI prompt enhancement and optimization for Claude Code

Readme

Promptrix MCP Server

npm version

A Model Context Protocol (MCP) server that provides AI prompt enhancement and optimization capabilities to Claude Code and other MCP-compatible clients.

Features

  • enhance_prompt: Enhance individual prompts using advanced prompt engineering techniques
  • auto_analyze_prompt: Analyze prompt quality and suggest improvements
  • Configurable enhancement parameters (style, format, language, complexity level)
  • Integration with the Promptrix API using API key authentication
  • Full TypeScript support with comprehensive error handling

Quick Start

Installation

No installation required! Use npx to run directly:

{
  "mcpServers": {
    "promptrix": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "promptrix-mcp"],
      "env": {
        "PROMPTRIX_API": "https://api.promptrix.co",
        "PROMPTRIX_API_KEY": "${PROMPTRIX_API_KEY}"
      }
    }
  }
}

Get Your API Key

Sign up at promptrix.co to get your API key, or run the Promptrix API locally:

# For local development
export PROMPTRIX_API_KEY="prx_live_your_api_key_here"

Configure Claude Code

Add the MCP server to your Claude Code configuration file (.mcp.json or claude_desktop_config.json):

{
  "mcpServers": {
    "promptrix": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "promptrix-mcp"],
      "env": {
        "PROMPTRIX_API": "https://api.promptrix.co",
        "PROMPTRIX_API_KEY": "${PROMPTRIX_API_KEY}"
      }
    }
  }
}

For local development:

{
  "mcpServers": {
    "promptrix": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "promptrix-mcp"],
      "env": {
        "PROMPTRIX_API": "http://localhost:8787",
        "PROMPTRIX_API_KEY": "${PROMPTRIX_API_KEY}"
      }
    }
  }
}

Usage in Claude Code

Once configured, you can use the prompt enhancement tools directly in Claude Code:

Can you enhance this prompt: "how to add 2 numbers in node"

Or analyze prompt quality:

Can you analyze the quality of this prompt: "make a function"

Available Tools

enhance_prompt

Enhances a single prompt with optional parameters:

  • prompt (required): The original prompt to enhance
  • style (optional): Style preference - detailed, concise, creative, technical, professional, casual
  • format (optional): Output format - markdown, json, structured, list, paragraph
  • language (optional): Target language (e.g., en, es, fr, de)
  • level (optional): Complexity level - beginner, intermediate, advanced, expert
  • constraints (optional): Specific constraints or requirements

auto_analyze_prompt

Analyzes prompt quality and suggests improvements:

  • prompt (required): The prompt to analyze for quality issues
  • threshold (optional): Quality threshold (0-100). Prompts below this score will trigger enhancement suggestions. Default: 70

Configuration

Environment Variables

  • PROMPTRIX_API: URL of the Promptrix API server (default: http://localhost:8787)
  • PROMPTRIX_API_KEY: Your Promptrix API key (required for authentication)
  • PROMPTRIX_AUTO_THRESHOLD: Quality threshold for auto-analysis (default: 70)

API Requirements

The MCP server requires the Promptrix API to be running with API key authentication enabled. The API should expose a /api/optimize endpoint that accepts POST requests with Bearer token authentication:

{
  "prompt": "string",
  "style": "string (optional)",
  "format": "string (optional)",
  "language": "string (optional)",
  "level": "string (optional)",
  "constraints": "string (optional)"
}

Development

# Development mode with hot reload
npm run dev

# Type checking
npm run typecheck

# Linting
npm run lint

# Format code
npm run format

Integration Examples

Basic Enhancement

enhance_prompt({
  "prompt": "how to use React hooks",
  "style": "detailed",
  "format": "structured"
})

Quality Analysis

auto_analyze_prompt({
  "prompt": "make a function",
  "threshold": 70
})

Error Handling

The server provides comprehensive error handling for:

  • Invalid parameters
  • API connectivity issues
  • Malformed responses
  • Network timeouts
  • Authentication failures

All errors are returned as structured MCP error responses with appropriate error codes and descriptive messages.

License

MIT