Prompt Saver MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Prompt Saver MCP Server
Well, now this thing calledSkills exists! :) This was a fun project exploring the same idea before it had a name: saving what worked as reusable instructions your agent can pull up later, and letting your agent write and maintain them for you as well. Keeping it up for posterity.
MCP server that converts successful conversation threads into prompts that can be used for future tasks.
Based on the principle that the most important artifact of your LLM interactions is what you did to produce the results, not the results themselves (see The New Code). And also considering that LLMs are probably already better prompt engineers than humans.
https://github.com/user-attachments/assets/d2e90767-c6f2-44b7-a216-1d9e103e968a
Quick Start
git clone https://github.com/davidhou17/prompt-saver-mcp.git
cd prompt-saver-mcp
uv syncAdd to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"prompt-saver": {
"command": "uv",
"args": ["run", "python", "-m", "prompt_saver_mcp.server", "stdio"],
"cwd": "/path/to/prompt-saver-mcp",
"env": {
"OPENAI_API_KEY": "your-api-key"
}
}
}
}Prompts are stored in the prompts/ directory within the MCP server folder by default.
Related MCP server: Teleprompter
Tools
save_prompt
Summarizes, categorizes, and converts conversation history into a markdown formatted prompt template.
Run upon completion of a successful complex task to build your prompt library.
Parameters:
conversation_messages(string): JSON string containing the conversation historytask_description(optional string): Description of the task being performedcontext_info(optional string): Additional context about the conversation
search_prompts
Retrieves prompts using text search (or semantic search if Voyage API key is available). Returns the most relevant prompts for user selection.
Parameters:
query(string): Description of the problem or task you need help withlimit(optional int): Maximum number of prompts to return (default: 3)
improve_prompt_from_feedback
Summarizes feedback during the conversation and updates the prompt based on the feedback and conversation context.
Parameters:
prompt_id(string): ID of the prompt to improvefeedback(string): User feedback about the prompt's effectivenessconversation_context(optional string): Context from the conversation where the prompt was used
update_prompt
For manual updates to an existing prompt.
Parameters:
prompt_id(string): ID of the prompt to updatechange_description(string): Description of what was changed and whysummary(optional string): Updated summaryprompt_template(optional string): Updated prompt templatehistory(optional string): Updated historyuse_case(optional string): Updated use case
get_prompt_details
Get detailed information about a specific prompt including its full template, history, and metadata. Used to view the complete prompt before applying it.
Parameters:
prompt_id(string): ID of the prompt to retrieve
search_prompts_by_use_case
Search for prompts by their use case category (e.g., 'code-gen', 'text-gen', 'data-analysis'). Efficient category-based search that works independently of embedding services.
Parameters:
use_case(string): The use case category to search forlimit(optional int): Maximum number of results to return (default: 5)
Prompt Engineering Best Practices
The generated prompt templates use the following prompt engineering techniques:
Structure
Templates are organized in this order:
Identity: Defines the assistant's persona and goals
Instructions: Provides clear rules and constraints
Examples: Shows desired input/output patterns (few-shot learning)
Context: Adds relevant data and documents
Formatting
Markdown headers (#) and lists (*) for logical hierarchy
XML tags (
<example>) to separate content sectionsMessage roles (developer/user/assistant) where appropriate
Placeholders (
{variable}) for customizable inputs
This ensures the saved prompts are well-structured, reusable, and effective for future tasks.
System Prompt Configuration
To maximize the value of this MCP server, add the following instructions to your LLM interface's system prompt:
Always search for relevant prompts before starting any large or complex tasks.
Upon successful completion of a task, always ask if I want to save the conversation as a prompt.
Upon successful completion of a task with a prompt, always ask if I want to update the prompt.
This helps ensure that the LLM runs the relevant tools without you explicitly asking.
Configuration
All configuration is done via environment variables in the env block of your MCP config.
LLM Providers
Variable | Description | Default |
|
|
|
| OpenAI API key | Required for OpenAI |
| Model name |
|
| Anthropic API key | Required for Anthropic |
| Model name |
|
| Azure OpenAI API key | Required for Azure |
| Azure OpenAI endpoint | Required for Azure |
| Model deployment name |
|
Storage
Variable | Description | Default |
|
|
|
| Directory for prompt files |
|
| MongoDB connection URI | Required for MongoDB |
| Database name |
|
Optional
Variable | Description |
| Enables semantic search |
Note: For MongoDB storage, install with
uv sync --extra mongodb
Usage Examples
1. Saving a Prompt
After completing a complex task, save the conversation as a reusable prompt:
# Example conversation messages (JSON format)
conversation = [
{"role": "user", "content": "Help me create a Python function to parse CSV files"},
{"role": "assistant", "content": "I'll help you create a robust CSV parser..."},
# ... more conversation
]
# Save the prompt
save_prompt(
conversation_messages=json.dumps(conversation),
task_description="Creating a CSV parser function",
context_info="Successfully created a parser with error handling"
)2. Finding and Using a Prompt
Search for relevant prompts when starting a new task:
# Search for prompts
result = search_prompts("I need help with data processing in Python")
# The tool will return the most relevant prompts and ask you to select one3. Updating a Prompt
After using a prompt, update it based on your experience:
update_prompt(
prompt_id="prompt_id_here",
change_description="Added error handling examples",
prompt_template="Updated template with better error handling..."
)4. Getting Prompt Details
Retrieve the full details of a specific prompt:
# Get complete prompt information
result = get_prompt_details("prompt_id_here")
print(result["prompt"]["prompt_template"]) # View the full template5. Improving a Prompt with Feedback
Use AI to automatically improve a prompt based on feedback:
improve_prompt_from_feedback(
prompt_id="prompt_id_here",
feedback="The prompt worked well but could use more specific examples for edge cases",
conversation_context="Used for debugging a complex API integration issue"
)6. Searching by Use Case
Find prompts for specific types of tasks:
# Find all code generation prompts
result = search_prompts_by_use_case("code-gen", limit=5)
# Find data analysis prompts
result = search_prompts_by_use_case("data-analysis", limit=3)Prompt Storage Format
File Storage (Default)
Prompts are stored in the prompts/ directory within the MCP server directory. Each prompt gets its own folder named after the prompt summary (slugified). The prompts/ directory is gitignored by default to keep your personal prompts private.
Directory Structure:
prompts/
└── {use-case}/
└── {prompt-name}/
├── prompt.md # The prompt template
└── changelog.md # ID, history, and changelogExample:
prompts/
├── code-gen/
│ ├── python-csv-parser/
│ │ ├── prompt.md
│ │ └── changelog.md
│ └── react-component-generator/
│ ├── prompt.md
│ └── changelog.md
└── general/
└── project-planning-template/
├── prompt.md
└── changelog.mdFile Contents:
prompt.md — Clean prompt template, ready to use:
You are an expert Python developer...changelog.md — Metadata and history with YAML frontmatter:
---
id: abc12345-1234-5678-9abc-def012345678
use_case: code-gen
summary: Python CSV parser with error handling
created: 2025-01-21T10:00:00+00:00
last_updated: 2025-01-21T10:00:00+00:00
num_updates: 0
changelog:
- '2025-01-21T10:00:00+00:00: Initial creation'
---
# History
Steps taken to create this prompt...Note: If two prompts have the same name, a suffix (
-2,-3, etc.) is appended to the folder name.
MongoDB Storage (Optional)
When using MongoDB (STORAGE_TYPE=mongodb), prompts are stored as documents:
{
"_id": ObjectId,
"use_case": str, # "code-gen", "text-gen", "data-analysis", "creative", "general"
"summary": str, # Summary of the prompt and its use case
"prompt_template": str, # Universal problem-solving prompt template
"history": str, # Summary of steps taken and end result
"embedding": List[float], # Vector embeddings (optional, for semantic search)
"last_updated": datetime,
"num_updates": int,
"changelog": List[str] # List of changes made to this prompt
}License
MIT License - see LICENSE file for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Team prompt library with version control and reviews. Save, search and reuse prompts via MCP.
Your prompt library inside your AI: 1,000+ pro templates, frameworks, vocab & pipelines.
Your prompt library in any MCP client: list, fetch, save and version prompt templates.
A prompt engineer you talk to. It writes prompts, sharpens yours, and keeps them on your shelf.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables creation, management, and templating of prompts through a simplified SOLID architecture, allowing users to organize prompts by category and fill in templates at runtime.7228 npm120MIT
- AlicenseAqualityDmaintenanceEnables storage and reuse of prompt templates with variable substitution for LLMs. Supports creating, searching, and retrieving prompt templates to avoid repeating complex instructions across conversations.47 npm4MIT
- AlicenseAqualityDmaintenanceAllows users to save, organize, and manage AI prompts, folders, and tags directly within MCP-compatible tools like Claude and Cursor. It supports version history tracking, prompt searching, and the ability to save public templates to a personal collection.2017 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables users to organize, search, and manage a shared library of prompts across AI tools via the Model Context Protocol. It supports hierarchical folder organization, tagging, and template variable substitution for dynamic prompt generation.MIT