rt prompt mcp

Local 2025-09-01 01:03:44 0

A Model Context Protocol server that provides specialized prompt suggestions for backend development, frontend development, and general tasks to help LLMs generate better content.


RT-Prompt-MCP 是一个基于 Model Context Protocol (MCP) 的服务器,专注于提供开发和设计相关的提示词补充建议。

功能特点

  • 提供特定领域的提示词补充,帮助 LLM 生成更符合要求的内容
  • 支持后端开发、前端开发和通用场景的提示词
  • 易于集成到支持 MCP 协议的客户端
  • 使用 TypeScript 开发,类型安全

安装

全局安装:

npm install -g rt-prompt-mcp

使用方法

作为命令行工具运行

安装后,直接运行:

rt-prompt-mcp

作为 MCP Server 与 MCP 客户端集成

在支持 MCP 协议的应用中(如 Claude Desktop)配置:

{
  "mcpServers": {
    "rt-prompt-mcp": {
      "command": "rt-prompt-mcp",
      "args": []
    }
  }
}

工具说明

该 MCP Server 提供三个主要工具:

  1. get-backend-suggestions: 获取后端开发相关的提示词补充

  2. context: 当前上下文或任务描述

  3. databaseType: 数据库类型(如 MySQL、PostgreSQL 等)
  4. language: 编程语言(如 Java、Python 等)

  5. get-frontend-suggestions: 获取前端开发相关的提示词补充

  6. context: 当前上下文或任务描述

  7. framework: 前端框架(如 React、Vue 等)
  8. deviceType: 设备类型(如移动端、桌面端等)

  9. get-general-suggestions: 获取通用场景的提示词补充

  10. context: 当前上下文或任务描述
  11. taskType: 任务类型(如代码生成、文档生成等)

示例

例如,要获取 MySQL 数据库设计的建议:

使用 get-backend-suggestions 工具,并提供以下参数:
- context: "创建用户和订单的数据库表结构"
- databaseType: "MySQL"
- language: "SQL"

开发

前提条件

  • Node.js 16+
  • npm 或 yarn

本地开发

  1. 克隆仓库:
git clone https://github.com/yourusername/rt-prompt-mcp.git
cd rt-prompt-mcp
  1. 安装依赖:
npm install
  1. 构建项目:
npm run build
  1. 本地测试:
    npm start

许可证

MIT

[
  {
    "inputSchema": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "additionalProperties": false,
      "properties": {
        "context": {
          "description": "当前上下文或任务描述",
          "type": "string"
        },
        "databaseType": {
          "description": "数据库类型,如MySQL、PostgreSQL等",
          "type": "string"
        },
        "language": {
          "description": "编程语言,如Java、Python等",
          "type": "string"
        }
      },
      "type": "object"
    },
    "name": "get_backend_suggestions"
  },
  {
    "inputSchema": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "additionalProperties": false,
      "properties": {
        "context": {
          "description": "当前上下文或任务描述",
          "type": "string"
        },
        "deviceType": {
          "description": "设备类型,如移动端、桌面端等",
          "type": "string"
        },
        "framework": {
          "description": "前端框架,如React、Vue等",
          "type": "string"
        }
      },
      "type": "object"
    },
    "name": "get_frontend_suggestions"
  },
  {
    "inputSchema": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "additionalProperties": false,
      "properties": {
        "context": {
          "description": "当前上下文或任务描述",
          "type": "string"
        },
        "taskType": {
          "description": "任务类型,如代码生成、文档生成等",
          "type": "string"
        }
      },
      "type": "object"
    },
    "name": "get_general_suggestions"
  },
  {
    "inputSchema": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "additionalProperties": false,
      "properties": {
        "context": {
          "description": "当前上下文或任务描述",
          "type": "string"
        },
        "designType": {
          "description": "设计类型,如线框图、高保真原型图等",
          "type": "string"
        },
        "platform": {
          "description": "平台类型,如Web、iOS、Android等",
          "type": "string"
        }
      },
      "type": "object"
    },
    "name": "get_ui_design_suggestions"
  }
]