Skip to main content

一个智能提示词MCP服务器

Project description

Smart Prompt MCP

一个基于MCP协议的智能提示词模板管理工具。

功能特点

  • 支持提示词模板的添加、更新、删除和查询
  • 支持使用双中括号语法引用模板,如 [[模板名]]
  • 配置文件自动保存和加载
  • 支持自定义配置文件路径
  • 提供调试模式

安装

pip3 install smart_prompt_mcp

使用方法

1. 启动服务器

python -m smart_prompt_mcp [--config CONFIG_FILE] [--debug]

参数说明:

  • --config: 指定配置文件路径(可选,默认为 ~/prompt_templates.json)
  • --debug: 启用调试日志(可选)

2. 可用工具

  • smart_template: 替换输入中的关键词

    • 输入: 包含 [[关键字]] 的文本
    • 输出: 替换后的文本
  • add_template: 添加新的关键词和提示词

    • 参数:
      • keyword: 关键字
      • prompt: 提示词内容
  • reset_template: 更新已存在的关键词对应的提示词

    • 参数:
      • keyword: 关键字
      • prompt: 新的提示词内容
  • show_template: 显示特定关键词的提示词

    • 参数:
      • keyword: 关键字
  • show_all_templates: 显示所有存储的关键词和提示词

  • delete_template: 删除特定的关键词和提示词

    • 参数:
      • keyword: 要删除的关键字

3. 使用示例

# 添加模板
add_template("接口分析", "分析该接口的入参、出参、业务逻辑和注意事项")

# 使用模板
smart_template("请帮我[[接口分析]]")

# 查看所有模板
show_all_templates()

配置文件格式

配置文件为JSON格式,结构如下:

{
  "关键字1": "提示词内容1",
  "关键字2": "提示词内容2"
}

依赖

  • Python >= 3.6
  • fastmcp >= 0.1.0

许可证

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smart_prompt_mcp-0.1.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smart_prompt_mcp-0.1.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file smart_prompt_mcp-0.1.2.tar.gz.

File metadata

  • Download URL: smart_prompt_mcp-0.1.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for smart_prompt_mcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d5da099fb84e66eb6a8da879050a500d70f7813b430ad574af1ba3a6f2e5d008
MD5 c7a1536ba2b0d36b39c28e65248c8310
BLAKE2b-256 6eb5646ea8b5dd0714191ef0c402465983e0bf5c20fe4e28cf29d02ed25cfa2f

See more details on using hashes here.

File details

Details for the file smart_prompt_mcp-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for smart_prompt_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1babe55dd842f22ec36fa88a46c559fc72194c4cdc3f3fa51dda755dbb49acf1
MD5 60fea0a158a8b467f80d1e90157a4d97
BLAKE2b-256 155cde62cd6ab94a48c4bbaef7dc8d8ad2552a0037700af4514f5fb04092a89d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page