Skip to main content

prompt-optimizer-mcp v1.1.0

ZCode 提示词优化插件。提供 optimize_prompt MCP 工具和 /optimize 命令,通过 LLM 优化提示词,使其更清晰、更具体、更可执行。

安装

pip install prompt-optimizer-mcp

在 ZCode 中使用

安装后在 ZCode 的 MCP 配置中添加:

{
  "mcpServers": {
    "prompt-optimizer": {
      "command": "prompt-optimizer-mcp",
      "env": {}
    }
  }
}

配置

~/.zcode/mcp/prompt-optimizer/.env 中设置 API Key:

OPTIMIZE_API_KEY=你的key
OPTIMIZE_BASE_URL=https://你的地址/v1
OPTIMIZE_MODEL=模型名

或直接设置环境变量:

AGNES_API_KEY=...
# 或
NVIDIA_API_KEY=...
# 或
OPENROUTER_API_KEY=...

使用

作为 MCP 工具

AI 在对话中自动调用 optimize_prompt 工具:

optimize_prompt(prompt="写一个Python脚本读取CSV")
# 返回:写一个Python脚本,读取指定路径的CSV文件...

作为命令行工具

prompt-optimizer-mcp

启动 stdio MCP 服务器。

更新日志

v1.1.0

  • 兼容 mcp 2.0.0(FastMCPMCPServer
  • 依赖更新:mcp>=2.0.0

v1.0.0

  • 初始发布

作者

goodie1972

许可证

MIT

Download files

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

Source Distribution

prompt_optimizer_mcp-1.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

prompt_optimizer_mcp-1.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file prompt_optimizer_mcp-1.1.0.tar.gz.

File metadata

  • Download URL: prompt_optimizer_mcp-1.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.2

File hashes

Hashes for prompt_optimizer_mcp-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f3265e95377202ed83f8fd292fb421b5ae990bb0b8c768c4c075ff5e322a5f10
MD5 e57fc60e2af25f3e7f6ac4455b088632
BLAKE2b-256 874e39a448a69bbcef80296b3234a617b60458155557a2fcf40a1e521f55ee19

See more details on using hashes here.

File details

Details for the file prompt_optimizer_mcp-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for prompt_optimizer_mcp-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e77ecf29ecc2f7e22c88fd31745ae8e5a50e74794fad7b93847359c57632dc21
MD5 782c34cf70d0d74c923251426070a04b
BLAKE2b-256 63e9b2a44193b310d4aedefde27804dbbd8e1f8919d0ae14774b18d2bc4cf4f7

See more details on using hashes here.

Release history Release notifications | RSS feed

1.2.0

2 files

1.1.1

2 files

This release

1.1.0 This release

2 files

Supported by

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