提示缪斯
一个MCP服务器,为常见的编码任务提供可重用的提示模板。
📚 查看完整文档
特性
此MCP服务器为常见编码任务提供即用型提示模板:
- 调试 -通过结构化指导帮助调试问题
- 解释 -解释代码是如何工作的,根据受众级别量身定制
- 文件 -生成全面的代码文档
- 添加功能 -在实现指导下向现有代码添加新功能
- 分支 -使用适当的命名约定创建git分支
- 提交 -按照最佳实践创建git提交
所有提示都以YAML文件的形式存储在 prompts/ 目录,便于定制和扩展。
安装
- 安装依赖项:
npm install- 通过在配置文件中添加以下内容,在Claude Desktop或其他MCP客户端中进行配置:
对于macOS上的Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json 对于Windows上的Claude Desktop: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"prompt-muse": {
"command": "node",
"args": ["/absolute/path/to/prompt-muse/index.js"]
}
}
}- 重新启动克劳德桌面
用法
配置后,您将在MCP客户端中看到可用的提示。您可以按名称调用它们,也可以选择传递参数。
例子
基本提示(无参数):
- 使用
code-review提示进行全面的代码审查
使用可选参数提示:
- 使用
refactor提示与focus: "performance"实现以性能为中心的重构
提示所需参数:
- 使用
add-feature提示与feature: "user authentication"添加新功能
添加自定义提示
提示作为单独的YAML文件存储在 prompts/ 目录。要添加新提示,请执行以下操作:
- 创建新
.yaml文件在prompts/目录 - 使用此结构:
# Comment describing the prompt
name: my-prompt # Unique identifier (required)
description: What this prompt does # Brief description (required)
# Optional arguments with template variable substitution
arguments:
- name: param1
description: Parameter description
required: true # or false
# The actual prompt text (required)
# Use {param1} for variable substitution
# Use {param1}conditional text{/param1} for optional text
template: |
Prompt text with {param1} placeholder
Multiple lines supported- 重新启动MCP服务器以加载新提示
模板语法
{variableName}-替换为参数值{variableName}optional text{/variableName}-仅在提供参数时才包含文本- 使用YAML
|用于多行模板 - 添加评论
#记录您的提示
示例:创建代码审查提示
创建 prompts/code-review.yaml:
# Code Review Prompt
# Provides comprehensive code review feedback
name: code-review
description: Get thorough code review with best practices
arguments:
- name: focus
description: Specific focus area (e.g., 'security', 'performance')
required: false
template: |
Please review this code{focus} with focus on {focus}{/focus}.
Provide:
- Code quality assessment
- Best practice suggestions
- Potential bugs or issues
- Improvement recommendations发展
直接运行服务器:
node index.js运行测试:
npm test文档
完整文档可在 ****
涵盖的主题:
- 入门指南
- 可用提示参考
- 创建自定义提示
- 模板语法指南
- 贡献指南
贡献
我们欢迎捐款!请查看我们的 贡献指南 了解详情。
许可证
麻省理工学院-参见 许可证 详情
