Prompt Learning MCP Server
Utilizes OpenAI's API to generate vector embeddings for prompts, powering RAG-based retrieval and performance-history learning.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Prompt Learning MCP Serveroptimize my prompt for summarizing research papers using past performance"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Prompt Learning MCP Server
Stateful prompt optimization that learns over time.
An MCP (Model Context Protocol) server that optimizes your prompts using research-backed techniques (APE, OPRO, DSPy patterns) and learns from performance history via embedding-based retrieval.
Features
π§ Smart Optimization: Uses actual LLM-based evaluation, not heuristics
π Learns Over Time: Stores prompt performance in vector database
π RAG-Powered: Retrieves similar high-performing prompts
β‘ Pattern-Based Quick Wins: Instant improvements without API calls
π Analytics: Track what's working across domains
Related MCP server: Promptheus
Quick Install
curl -fsSL https://someclaudeskills.com/install/prompt-learning.sh | bashOr manually:
cd ~/mcp-servers/prompt-learning
npm install
npm run build
npm run setupRequirements
Node.js 18+
Docker (for Qdrant and Redis)
OpenAI API key (for embeddings)
Usage
Once installed, use these tools in Claude Code:
optimize_prompt
Optimize a prompt using pattern-based and RAG-based techniques:
"optimize this prompt: summarize the document"Returns the optimized prompt with improvement details.
retrieve_prompts
Find similar high-performing prompts:
"find similar prompts for: code review feedback"record_feedback
Record how a prompt performed (enables learning):
"record that my last prompt succeeded with quality score 0.9"suggest_improvements
Get quick suggestions without full optimization:
"suggest improvements for this prompt: [your prompt]"get_analytics
View performance trends:
"show prompt analytics for the last 30 days"How It Works
Cold Start (No History)
Pattern-based improvements: Adds structure, chain-of-thought, constraints
OPRO-style iteration: LLM generates candidates, evaluates, selects best
APE-style generation: Creates multiple instruction variants
Warm Start (With History)
Embed the prompt: Creates vector representation
Retrieve similar: Finds high-performing prompts from database
Learn from winners: Synthesizes improvements from what worked
Iterate with feedback: Uses evaluation to guide optimization
Evaluation
All prompts are scored by an LLM evaluator on:
Clarity (25%): How unambiguous
Specificity (25%): Appropriate guidance level
Completeness (20%): Covers all requirements
Structure (15%): Well-organized
Effectiveness (15%): Likely to produce desired output
Architecture
Claude Code
β
β MCP Protocol
βΌ
βββββββββββββββββββββββββββββββ
β prompt-learning MCP Server β
β β
β Tools: β
β β’ optimize_prompt β
β β’ retrieve_prompts β
β β’ record_feedback β
β β’ suggest_improvements β
β β’ get_analytics β
βββββββββββ¬ββββββββββββββββββββ
β
βββββββ΄ββββββ
βΌ βΌ
βββββββββ βββββββββ
βQdrant β β Redis β
β(Vectorβ β(Cache)β
β DB) β β β
βββββββββ βββββββββConfiguration
Claude Code Config (~/.claude.json)
{
"mcpServers": {
"prompt-learning": {
"command": "node",
"args": ["~/mcp-servers/prompt-learning/dist/index.js"],
"env": {
"VECTOR_DB_URL": "http://localhost:6333",
"REDIS_URL": "redis://localhost:6379",
"OPENAI_API_KEY": "sk-..."
}
}
}
}Environment Variables
Variable | Default | Description |
|
| Qdrant server URL |
|
| Redis server URL |
| (required) | For embeddings |
Development
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build for production
npm run build
# Run setup (starts Docker, initializes DB)
npm run setup
# Run tests
npm testTroubleshooting
MCP Server Not Starting
Check Docker containers are running:
docker ps | grep prompt-learningVector DB Connection Failed
# Check Qdrant health
curl http://localhost:6333/health
# Restart Qdrant
docker restart prompt-learning-qdrantNo Improvements Seen
Ensure OPENAI_API_KEY is set correctly
Check Claude Code logs:
~/.claude/logs/mcp.logTry with a simple prompt first
Research Foundation
This server implements techniques from:
APE (Zhou et al., 2022): Automatic Prompt Engineer
OPRO (Yang et al., 2023): Optimization by Prompting
DSPy (Khattab et al., 2023): Programmatic prompt optimization
Contextual Retrieval (Anthropic, 2024): Enhanced embedding retrieval
License
MIT
Links
Documentation: https://www.someclaudeskills.com/skills/automatic-stateful-prompt-improver
Skill Definition: Part of the Some Claude Skills collection
Issues: https://github.com/erichowens/prompt-learning-mcp/issues
This server cannot be installed
Maintenance
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
- Alicense-qualityDmaintenanceIntelligently optimizes and enhances user prompts before execution using pattern matching, domain-specific enhancements, and analytics tracking for consistent AI outputs across marketing, data analysis, tax/accounting, and code generation domains.Last updated172MIT
- Alicense-qualityCmaintenanceRefines and optimizes prompts for LLMs through adaptive questioning and intelligent clarification workflows. Supports multiple AI providers (Google, OpenAI, Anthropic, Groq, Qwen) with interactive prompt enhancement and targeted modifications.Last updated17MIT
- AlicenseBqualityDmaintenanceAutomatically analyzes and optimizes AI prompts by calculating clarity scores, detecting risks, asking clarifying questions, and adding domain-specific requirements to improve AI interaction quality.Last updated1MIT
- Alicense-qualityDmaintenanceEnables AI agents to achieve production-ready solutions through iterative refinement and recursive thinking processes. It features token optimization via context compression and session-based tracking to improve problem-solving depth while minimizing cost.Last updated305MIT
Related MCP Connectors
Long-term memory for AI assistants. Hybrid retrieval, query expansion, auto-topics.
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/curiositech/prompt-learning-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server