A Laravel application that provides a unified prompt library accessible through the Model Context Protocol (MCP). Access Fabric's 200+ curated patterns, create custom prompts, or sync from other repositories. All through a single, searchable library.
- Unified Prompt Library: Single interface for all prompt types (Fabric patterns, custom prompts, external sources)
- Simple Web Interface: Web UI for creating and managing custom prompts
- MCP Server Powered by Laravel Loop: Compatible with any MCP-enabled client (Claude Desktop, Cursor, Windsurf, etc.)
- PHP 8.2 or higher
- Composer
- Laravel 12.x
- SQLite (default) or your preferred database
- Clone and install dependencies:
git clone <repository-url> prompts-mcp
cd prompts-mcp
composer install- Configure environment:
cp .env.example .env
php artisan key:generate- Initialize database:
php artisan migrate- Sync Fabric patterns:
php artisan prompts:sync --source=fabricOnce configured, your AI client gains access to these unified tools:
compose_prompt- Compose any prompt (Fabric or custom) with user input- Parameters:
prompt_name(required),input_content,additional_context
- Parameters:
search_prompts- Search across all prompt sourceslist_categories- List categories with prompt countslist_prompts_by_category- Browse by categorylist_all_prompts- Complete prompt catalogget_prompt_details- Detailed prompt information
-
Use a Fabric pattern:
Use the analyze_claims prompt on this article: [paste content] -
Use a custom prompt:
Use my-custom-analysis with this data: [paste content] -
Browse available prompts:
List all prompts in the writing category -
Search prompts:
Search for prompts related to "code review"
-
Generate configuration:
php artisan loop:mcp:generate-config
-
Add to Claude Desktop config (
~/Library/Application Support/Claude/claude_desktop_config.json):{ "mcpServers": { "prompt-library": { "transport": "sse", "url": "http://your-app-url/mcp/sse" } } } -
Restart Claude Desktop
{
"mcpServers": {
"prompt-library": {
"command": "php",
"args": ["/path/to/your/project/artisan", "loop:mcp:start"]
}
}
}- 200+ official patterns from danielmiessler/fabric
- Automatically categorized and tagged
- Synced via
php artisan prompts:sync --source=fabric
- Create through web interface
- Full control over content, categorization, and visibility
- Support for template variables ({{INPUT}}, $INPUT)
The architecture supports additional sources:
- GitHub repositories with similar structure
- API-based prompt services
- Imported prompt collections
Visit your application URL to access the prompt library:
- Browse Library: View all prompts with filtering by source, category, and search
- Create Custom Prompts: Simple form with title, description, content, and categorization
- Manage Prompts: Edit and organize your custom prompts
# Sync from external sources
php artisan prompts:sync --source=fabric
php artisan prompts:sync --source=all --force
# Generate MCP client configuration
php artisan loop:mcp:generate-config
# Start STDIO MCP server
php artisan loop:mcp:startVia Web Interface:
- Visit
/prompts/create - Fill in title, description, content, and category
- Use template variables like
{{INPUT}}for user content - Set visibility (public/private)
Via Code:
use App\Services\PromptService;
$promptService = app(PromptService::class);
$prompt = $promptService->createManualPrompt([
'title' => 'My Custom Prompt',
'description' => 'Analyzes marketing copy',
'content' => 'You are a marketing expert. Analyze: {{INPUT}}',
'category' => 'analysis',
'tags' => ['marketing', 'analysis'],
'is_public' => true,
]);- Single
promptstable stores all prompt types source_typefield differentiates:'manual','fabric','github'- Consistent API across all prompt sources
Built on Laravel Loop:
- Unified toolkit exposes all prompts through same interface
- Source-aware - indicates prompt origin in responses
- Usage tracking - monitors prompt composition for analytics
"No prompts found"
- Run
php artisan prompts:sync --source=fabricto sync Fabric patterns - Check web interface at
/promptsto verify prompts exist
"MCP connection failed"
- Ensure Laravel server is running
- Verify MCP endpoint URL in client configuration
- Check authentication if enabled
"Tool not found"
- Prompt names use exact format from prompt library
- Use
search_promptsto find available prompts - Check web interface for correct prompt names