PromptLab MCP Server
PromptLab: AIクエリ拡張エンジン
PromptLabは、基本的なユーザークエリをAIシステム向けに最適化されたプロンプトに変換します。コンテンツの種類(エッセイ、メール、技術説明、クリエイティブライティング)を自動的に検出し、カスタマイズされたテンプレートを適用し、強化されたプロンプトが元の意図を維持しているかどうかを検証します。
🔍 概要
PromptLabは、YAMLベースのテンプレートシステムを備えたモジュール式アーキテクチャ上に構築されており、コーディングの知識がなくても誰でもプロンプトテンプレートを作成・管理できます。このシステムは、より構造化された入力を通じて、より高品質なAI応答を生成します。
Related MCP server: Durable MCP Tripleshot
🏗️ 建築
PromptLab は 3 つの主要コンポーネントで構成されています。
テンプレート システム(
prompt_templates.yaml) - さまざまなコンテンツ タイプ用の構造化テンプレートMCP サーバー(
promptlab_server.py) - LangGraph ワークフローを使用して標準化されたプロトコルを通じてテンプレートを提供します。処理クライアント(
promptlab_client.py) - ユーザークエリを処理するシンクライアント
ワークフロープロセス
クエリ入力: ユーザーが自然言語クエリを送信する
分類: システムがコンテンツの種類 (エッセイ、電子メールなど) を決定します。
パラメータ抽出: 主要なパラメータが識別されます (トピック、対象者など)
テンプレートアプリケーション: 適切なテンプレートが取得され、入力されます
検証: 強化されたプロンプトは元の意図と照合されます
調整: 必要な調整は自動的に行われます
応答生成:最適化されたプロンプトは高品質の応答を生成します

📋 機能
コンテンツタイプの検出- ユーザークエリをエッセイ、メール、技術、またはクリエイティブライティングのリクエストに自動的に分類します
パラメータ抽出- トピック、受信者、オーディエンスレベルなどの主要なパラメータをインテリジェントに抽出します
テンプレートライブラリ- 構造化されたガイダンスを備えた一般的なコンテンツタイプ用の事前構成されたテンプレート
検証システム- 強化されたプロンプトが元のユーザーの意図を維持することを保証します
フィードバックループ- 検証で不整合が特定されたときにプロンプトを調整します
モジュラー設計- MCPサーバーはあらゆるLLMシステムに接続可能
非技術的な管理- コーディングの知識がなくてもテンプレートを更新できます
🚀 はじめに
前提条件
Python 3.8以上
依存関係:
mcp[cli]langchain-openailanggraph>=0.0.20python-dotenvpyyaml
インストール
# Clone the repository
git clone https://github.com/iRahulPandey/PromptLab.git
cd PromptLab
# Install dependencies
pip install -r requirements.txt
# Set up environment variables
cp .env
# Edit .env to add your OpenAI API key使用法
まずサーバーを実行します。
# The server loads templates from prompt_templates.yaml
python promptlab_server.pyクエリを使用してクライアントを実行します。
python promptlab_client.py "Write an essay about climate change"システムは以下を出力します:
元のクエリ
分類されたコンテンツの種類
強化されたプロンプト
検証結果
最終回答
📝 テンプレートシステム
テンプレートは、 prompt_templates.yamlで構造化された形式を使用して定義されます。
templates:
essay_prompt:
description: "Generate an optimized prompt template for writing essays."
template: |
Write a well-structured essay on {topic} that includes:
- A compelling introduction that provides context and states your thesis
...
parameters:
- name: topic
type: string
description: The topic of the essay
required: true新しいテンプレートの追加
prompt_templates.yamlを開く既存の形式に従って新しいテンプレートを追加する
パラメータと変換を定義する
サーバー側でツールを定義し、テンプレートをロードする
サーバーは再起動時に新しいテンプレートを自動的に読み込みます
🛠️ 高度な設定
環境変数
TEMPLATES_FILE- テンプレート YAML ファイルへのパス (デフォルト:prompt_templates.yaml)OPENAI_API_KEY- LLM アクセス用の OpenAI API キーMODEL_NAME- 使用するOpenAIモデル(デフォルト:gpt-3.5-turbo)PERSONA_SERVER_SCRIPT- サーバー スクリプトへのパス (デフォルト:promptlab_server.py)
カスタム変換
テンプレートには、パラメータを動的に調整する変換を含めることができます。
transformations:
- name: formality
value: "formal if recipient_type.lower() in ['boss', 'client'] else 'semi-formal'"📊 出力例
入力クエリ
「教授のために再生可能エネルギーについて何か書いてください」
強化されたプロンプト
Write a well-structured essay on renewable energy that includes:
- A compelling introduction that provides context and states your thesis
- 2-3 body paragraphs, each with a clear topic sentence and supporting evidence
- Logical transitions between paragraphs that guide the reader
- A conclusion that synthesizes your main points and offers final thoughts
The essay should be informative, well-reasoned, and demonstrate critical thinking.📄 ライセンス
MITライセンス - 詳細はLICENSEファイルを参照
🤝 貢献する
貢献を歓迎します!お気軽にプルリクエストを送信してください。
リポジトリをフォークする
機能ブランチを作成します(
git checkout -b feature/amazing-feature)変更をコミットします (
git commit -m 'Add some amazing feature')ブランチにプッシュする (
git push origin feature/amazing-feature)プルリクエストを開く
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
Manage, version, and publish LLM prompts with blocks, variables, and evaluations.
Your prompt library in any MCP client: list, fetch, save and version prompt templates.
Save, find, and run your reusable AI prompts and multi-step workflows.
A prompt engineer you talk to. It writes prompts, sharpens yours, and keeps them on your shelf.
Related MCP Servers
- AlicenseBqualityDmaintenanceA lightweight server that provides curated, high-quality prompts for common development tasks like UI/UX design, project setup, and debugging to enhance AI-powered development workflows.65 npm1MIT
- FlicenseNot gradedqualityDmaintenanceEnables users to search, browse, and retrieve AI prompts from the Tripleshot public API. Provides access to community prompts, trending content, and template rendering capabilities through a durable MCP server interface.-
- 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.410 npm4MIT
- AlicenseNot gradedqualityCmaintenanceA lightweight, file-based server for managing and serving personal prompt templates with variable substitution support via the Model Context Protocol. It allows users to store, update, and organize prompts in a local directory through integrated MCP tools and CLI assistants.7MIT