Prompt Learning

A stateful MCP server that optimizes prompts using pattern-based methods and embedding-backed performance learning.
  • javascript

1

GitHub Stars

javascript

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "erichowens-prompt-learning-mcp": {
      "command": "node",
      "args": [
        "~/mcp-servers/prompt-learning/dist/index.js"
      ],
      "env": {
        "REDIS_URL": "redis://localhost:6379",
        "VECTOR_DB_URL": "http://localhost:6333",
        "OPENAI_API_KEY": "sk-..."
      }
    }
  }
}

You run a stateful MCP server that learns to optimize prompts over time by tracking performance and using embedding-based retrieval. This server helps you improve prompts automatically, recall successful patterns, and analyze what works across domains.

How to use

Install the server and start it locally, then connect your MCP client to the local runtime. Use the provided tools to optimize prompts, retrieve similar high-performing prompts, record feedback, obtain quick improvements, and view analytics. Your workflow can include starting from a cold start to gradually leveraging history for smarter prompts.

How to install

Prerequisites: ensure you have Node.js 18 or newer and Docker available for vector and cache databases if you plan to run the full stack.

curl -fsSL https://someclaudeskills.com/install/prompt-learning.sh | bash

Or, install manually by following these steps:

cd ~/mcp-servers/prompt-learning
npm install
npm run build
npm run setup

Configuration

Configure the MCP server for Claude Code by placing the following in your Claude Code config file. This enables the prompt-learning MCP server to run locally with the required services.

{
  "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 and runtime details

The server relies on a vector database and a cache, accessed via environment variables. Ensure your vector store and cache are running before starting the MCP server.

Environment variables you will encounter include VECTOR_DB_URL for the Qdrant-compatible vector store, REDIS_URL for the Redis cache, and OPENAI_API_KEY for embeddings and evaluations.

Development and maintenance

Development commands let you install dependencies, run in development mode, build for production, set up required services, and run tests.

# 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 test

Troubleshooting

If the MCP server does not start, verify Docker containers for the prompt-learning stack are running.

docker ps | grep prompt-learning

If the vector DB cannot be reached, check the health endpoint and restart the vector store as needed.

curl http://localhost:6333/health
# Restart the vector store if needed
docker restart prompt-learning-qdrant

Tools and endpoints

The server exposes a set of tools to manage prompts and analytics.

Notes on usage and security

Keep your OpenAI API key secure. Use proper access controls for Docker containers and ensure network access to local services is restricted to trusted clients.

Available tools

optimize_prompt

Optimize a prompt using pattern-based and RAG-based techniques to improve structure and clarity.

retrieve_prompts

Find and retrieve prompts similar to a given prompt to reuse high-performing patterns.

record_feedback

Record the performance outcome of a prompt to enable learning and improve future optimizations.

suggest_improvements

Provide quick improvement suggestions without running a full optimization.

get_analytics

Show analytics for prompt performance over a selected time range.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
Prompt Learning MCP Server - erichowens/prompt-learning-mcp | VeilStrat