Shinkuro-通用提示加载器MCP服务器
](https://www.npmjs.com/package/shinkuro) ](https://github.com/DiscreteTom/shinkuro-rs/releases)
从本地文件夹或git存储库加载markdown文件,并将其用作 MCP提示.
有助于将各种来源和格式的提示加载到启用MCP的应用程序中,并在组织之间共享提示。
用法
重要:确保您的MCP客户端支持MCP Prompts功能。请参阅 特征支持矩阵.
完整CLI使用情况
shinkuro --help
Universal prompt loader MCP server
Usage: shinkuro [OPTIONS]
Options:
--folder [env: FOLDER=]
--git-url [env: GIT_URL=]
--cache-dir [env: CACHE_DIR=] [default: ~/.shinkuro/remote]
--auto-pull [env: AUTO_PULL=]
--variable-format [env: VARIABLE_FORMAT=] [default: brace]
--auto-discover-args [env: AUTO_DISCOVER_ARGS=]
--skip-frontmatter [env: SKIP_FRONTMATTER=]
-h, --help Print help
-V, --version Print version本地文件
添加到MCP客户端配置中:
{
"mcpServers": {
"shinkuro": {
"command": "npx",
"args": ["-y", "shinkuro"],
"env": {
"FOLDER": "/path/to/prompts"
}
}
}
}远程Git仓库
添加到MCP客户端配置中:
{
"mcpServers": {
"shinkuro": {
"command": "npx",
"args": ["-y", "shinkuro"],
"env": {
"GIT_URL": "https://github.com/owner/repo.git",
"FOLDER": "prompts" // optional, subfolder within git repo
}
}
}
}这将把存储库克隆到本地缓存目录中。请确保您拥有正确的权限。
支持私有存储库,例如。 "GIT_URL": "git@github.com:DiscreteTom/shinkuro.git" (使用SSH密钥), `"GIT_URL": "https://:@github.com/owner/repo.git"` (带个人访问令牌)
与...一起使用 规格套件
Expand
首先,将规范工具包提示移到 ./.shinkuro/prompts 文件夹。
然后添加到MCP客户端配置中:
{
"mcpServers": {
"shinkuro": {
"command": "npx",
"args": ["-y", "shinkuro"],
"env": {
"FOLDER": "./.shinkuro/prompts",
"VARIABLE_FORMAT": "dollar",
"AUTO_DISCOVER_ARGS": "true",
"SKIP_FRONTMATTER": "true"
}
}
}
}这将以MCP提示的形式显示规格套件说明。
提示加载
指定文件夹(包括嵌套文件夹)中的每个markdown文件都会作为提示加载。
文件夹结构示例:
my-prompts/
├── think.md
└── dev/
├── code-review.md
└── commit.md上面的示例将加载到3个提示: think, code-review 和 commit.
提示文件示例
最简单的
Commit to git using conventional commit.提示元数据
---
name: "code-review" # optional, defaults to filename
title: "Code Review Assistant" # optional, defaults to filename
description: "" # optional, defaults to file path
---
# Code Review
Please review this code for best practices and potential issues.提出论点
---
name: "greeting"
description: "Generate a personalized greeting message"
arguments:
- name: "user"
description: "Name of the user"
# no default = required parameter
- name: "project"
description: "Project name"
default: "MyApp"
---
Say: Hello {user}! Welcome to {project}. Hope you enjoy your stay!变量如 {user} 和 {project} 当检索到提示时,将替换为实际值。
使用 {{var}} (双括号)用于在使用大括号格式化程序时转义和显示文字括号。
不同的变量格式: -brace(默认):{user},{project}-dollar:$user,$project
安装独立二进制文件
Shell (macOS/Linux)
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/DiscreteTom/shinkuro-rs/releases/latest/download/shinkuro-installer.sh | shPowerShell (Windows)
irm https://github.com/DiscreteTom/shinkuro-rs/releases/latest/download/shinkuro-installer.ps1 | iexnpm
npm install -g shinkuro