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

prompthub-mcp-adapter

v2.6.0

Published

MCP adapter for connecting AI clients (Cursor, Claude Desktop) to PromptHub server with advanced semantic search and natural language understanding

Readme

PromptHub MCP Adapter

npm version License: MIT

🚀 下一代智能提示词管理的MCP适配器 - 连接AI客户端(Cursor、Claude Desktop等)与PromptHub服务器

✨ 核心特性

  • 🧠 Context Engineering - 智能上下文适配,动态调整提示词内容以匹配用户需求
  • 🔍 语义搜索引擎 - 多维度相关性计算,精确匹配最相关的提示词
  • 📄 完美结果展示 - 提示词内容完整显示,支持一键复制使用
  • 📝 统一存储接口 - AI智能分析并存储提示词
  • 🎯 提示词优化 - 为第三方AI客户端提供结构化优化指导
  • 多种处理模式 - 支持 default、fast、deep 三种处理流水线
  • 🔧 零配置安装 - 使用npx一键安装,无需复杂配置
  • 🌐 跨平台兼容 - 支持所有主流AI客户端和操作系统

🚀 Quick Start

Install and Run with npx (Recommended)

npx prompthub-mcp-adapter

Install Globally

npm install -g prompthub-mcp-adapter
prompthub-mcp-adapter

📋 Prerequisites

  • Node.js 16.0.0 or higher
  • PromptHub API key (get one at prompt-hub.cc)

🔧 Configuration

Environment Variables

| Variable | Description | Default | Required | |----------|-------------|---------|----------| | API_KEY | Your PromptHub API key | - | ✅ | | MCP_SERVER_URL | PromptHub MCP server URL | https://mcp.prompt-hub.cc | ❌ | | MCP_TIMEOUT | Request timeout in milliseconds | 60000 | ❌ |

Cursor Configuration

Add to your Cursor settings:

{
  "mcpServers": {
    "prompthub": {
      "command": "npx",
      "args": ["prompthub-mcp-adapter"],
      "env": {
        "API_KEY": "your-api-key-here"
      }
    }
  }
}

Claude Desktop Configuration

Add to ~/.claude_desktop_config.json:

{
  "mcpServers": {
    "prompthub": {
      "command": "npx",
      "args": ["prompthub-mcp-adapter"],
      "env": {
        "API_KEY": "your-api-key-here"
      }
    }
  }
}

Local Development

For local PromptHub server:

{
  "env": {
    "MCP_SERVER_URL": "http://localhost:9010",
    "API_KEY": "your-local-api-key"
  }
}

🛠️ Available Tools

🚀 核心搜索工具 (推荐)

  • unified_search - 统一搜索引擎 - 语义理解,智能搜索,完美结果展示 ⭐⭐⭐⭐⭐

📝 提示词管理

  • get_categories - 获取所有提示词分类
  • get_tags - 获取所有提示词标签
  • get_prompt_names - 获取所有可用的提示词名称
  • get_prompt_details - 获取特定提示词详情
  • create_prompt - 创建新提示词
  • update_prompt - 更新现有提示词

🧠 智能功能

  • context_engineering - Context Engineering - 智能上下文适配,动态调整提示词内容 🆕⭐⭐⭐⭐⭐
  • unified_store - 统一存储 - AI智能分析并存储提示词 ⭐⭐⭐⭐⭐
  • prompt_optimizer - 提示词优化器 - 为第三方AI客户端提供结构化优化指导(仅提供建议,不自动保存) ⭐⭐⭐⭐⭐

🔍 Usage Examples

In Cursor

Once configured, you can use PromptHub tools directly in Cursor:

  • "Search for code optimization prompts"
  • "Create a new prompt for email writing"
  • "Optimize this prompt for better results"

Programmatic Usage

// The adapter handles MCP protocol automatically
// Tools are called through the AI client interface

🔍 Troubleshooting

Common Issues

  1. "API_KEY not set"

    • Ensure API key is properly configured in environment variables
  2. "Connection failed"

    • Check network connectivity
    • Verify server URL is correct
    • Confirm API key is valid
  3. "Tool not found"

    • Tool name might be incorrect
    • Use tools/list to see available tools

Debug Mode

The adapter outputs detailed logs to stderr:

[PromptHub MCP] Initializing...
[PromptHub MCP] Server: https://mcp.prompt-hub.cc
[PromptHub MCP] API Key: Set
[PromptHub MCP] Server connection: OK
[PromptHub MCP] Discovered 24 tools
[PromptHub MCP] Ready for MCP messages...

🔒 Security

  • Never hardcode API keys in configuration files
  • Use environment variables for sensitive data
  • Ensure HTTPS is used for production servers

📚 Documentation

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Support


Made with ❤️ by the PromptHub Team