Skip to main content
Glama
KrishBnsl

PromptVault MCP Server

by KrishBnsl

PromptVault

作为 MCP 服务器的开源提示词版本管理、评估和管理工具。

Python 3.11+ License: MIT Docs

什么是 PromptVault?

PromptVault 是一个面向 AI 工程师和提示词工程师的自托管工具,用于:

  • 对提示词进行版本管理,像管理代码一样,支持不可变版本和回滚

  • 评估提示词:使用 LLM 提供商(OpenAI、Anthropic、Ollama)基于数据集进行评估

  • 访问所有内容:通过 MCP 服务器、CLI 或 REST API

Related MCP server: PromptingBox MCP Server

快速开始

安装(无需克隆)

pip install pvlt

或者使用 uv/pipx:

uvx --from git+https://github.com/KrishBnsl/promptVault.git promptctl --help

或者使用 Docker:

docker run -p 8000:8000 -e GEMINI_API_KEY=your-key ghcr.io/krishbnsl/pvlt

从源码安装

git clone https://github.com/KrishBnsl/promptVault.git
cd promptVault
uv sync
cp .env.example .env
# Edit .env with your API keys

创建你的第一个提示词

promptctl prompt create summarize \
  --content "Summarize the following article in {tone} style:\n\n{article}" \
  --description "Summarizes an article" \
  --variables '{"tone": "concise", "article": "string"}' \
  --model-config '{"provider": "openai", "model": "gpt-4o-mini", "temperature": 0.2}' \
  --tags "summarization,content"

创建数据集

echo '{"input": {"article": "AI is transforming..."}, "expected_output": "AI transforms..."}' > dataset.jsonl
promptctl dataset create article-summaries --file dataset.jsonl

运行评估

promptctl eval run summarize --dataset article-summaries

与 MCP(Claude Desktop)一起使用

添加到你的 Claude Desktop 配置中:

{
  "mcpServers": {
    "pvlt": {
      "command": "promptctl",
      "args": ["serve"]
    }
  }
}

CLI 参考

promptctl prompt create <name> --content <text> [options]
promptctl prompt list [--tags TAGS] [--limit N]
promptctl prompt show <name> [--version N]
promptctl prompt versions <name>
promptctl prompt diff <name> <version-a> <version-b>
promptctl prompt rollback <name> --version N

promptctl dataset create <name> --file <jsonl-or-json>
promptctl dataset list

promptctl eval run <prompt-name> --dataset <dataset-name>
promptctl eval report <evaluation-id>

promptctl serve [--stdio|--http] [--port 8000]
promptctl web [--port 8080]

MCP 工具

工具

描述

prompt_create

创建一个带有初始版本的新提示词

prompt_get

获取一个提示词版本

prompt_list

列出所有提示词

prompt_versions

列出一个提示词的所有版本

prompt_diff

比较两个提示词版本的差异

prompt_rollback

回滚到之前的版本

dataset_create

创建数据集

dataset_list

列出数据集

dataset_get

获取数据集及其条目

evaluation_run

运行评估

evaluation_status

检查评估状态

evaluation_report

获取评估报告

evaluation_compare

比较两次评估

REST API

基础 URL: http://localhost:8000/api

# Create a prompt
curl -X POST http://localhost:8000/api/prompts \
  -H "Content-Type: application/json" \
  -d '{"name": "test", "content": "Hello {name}"}'

# List prompts
curl http://localhost:8000/api/prompts

# Get a prompt
curl http://localhost:8000/api/prompts/test

配置

.env.example 复制为 .env 并进行配置:

PROMPTVAULT_DB_PATH=./promptvault.db
PROMPTVAULT_DEFAULT_PROVIDER=openai
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GEMINI_API_KEY=...
OLLAMA_BASE_URL=http://localhost:11434

架构

┌─────────────┐   ┌─────────────┐   ┌─────────────┐
│   MCP Client │   │     CLI     │   │  REST Client │
│ (Claude etc) │   │ (promptctl) │   │ (curl, apps) │
└──────┬──────┘   └──────┬──────┘   └──────┬──────┘
       │                 │                 │
       ▼                 ▼                 ▼
┌─────────────────────────────────────────────────┐
│              PromptVault Core                   │
│  ┌─────────────┐ ┌──────────────┐ ┌──────────┐ │
│  │ Versioning  │ │ Evaluation   │ │ Storage  │ │
│  │ Engine      │ │ Engine       │ │ Layer    │ │
│  └─────────────┘ └──────────────┘ └──────────┘ │
│  ┌──────────────────────────────────────────┐  │
│  │        SQLite Database (local)           │  │
│  └──────────────────────────────────────────┘  │
└─────────────────────────────────────────────────┘

文档

📖 完整文档: https://krishbnsl.github.io/promptVault/

许可证

MIT 许可证 - 详见 LICENSE

A
license - permissive license
Not graded
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
3Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.

  • Free OpenAI-compatible inference with signed provenance receipts and 3 focused MCP tools.

  • MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/KrishBnsl/promptVault'

If you have feedback or need assistance with the MCP directory API, please join our Discord server