
Prompts
STDIOMCP server for managing prompts and templates with project orchestration capabilities
MCP server for managing prompts and templates with project orchestration capabilities
A robust, extensible server for managing, versioning, and serving prompts and templates for LLM applications, built on the Model Context Protocol (MCP).
add_prompt
- Add new prompts to collectionget_prompt
- Retrieve prompts by IDlist_prompts
- List prompts with filteringupdate_prompt
- Update existing promptsdelete_prompt
- Remove promptsapply_template
- Apply variables to template promptsget_stats
- Get prompt statisticsnpm install @sparesparrow/mcp-prompts
# Start HTTP server npm start # or MODE=http node dist/index.js # Server runs on http://localhost:3003 # API docs: http://localhost:3003/api-docs # Health check: http://localhost:3003/health
# Start MCP server MODE=mcp node dist/index.js # or npm run start:mcp
Configure Cursor MCP:
Add to .cursor/mcp.json
:
{ "mcpServers": { "mcp-prompts": { "command": "node", "args": ["dist/index.js"], "env": { "MODE": "mcp" } } } }
Restart Cursor to load the MCP server
Use in Cursor:
pnpm run docker:build:mcp
pnpm run docker:up:mcp
pnpm run docker:logs:mcp
# Install dependencies pnpm install # Build the project pnpm run build # Start development server pnpm run dev
# Build pnpm run build pnpm run build:clean # Start servers pnpm run start # Default mode pnpm run start:http # HTTP mode pnpm run start:mcp # MCP mode # Docker pnpm run docker:build:mcp pnpm run docker:up:mcp pnpm run docker:down:mcp # Testing pnpm run test pnpm run test:watch # Linting & Formatting pnpm run lint pnpm run format
mcp-prompts/
├── src/
│ ├── index.ts # Main entry point
│ ├── mcp-server.ts # MCP server implementation
│ ├── http-server.ts # HTTP server implementation
│ └── utils.ts # Utility functions
├── data/
│ └── sample-prompts.json # Pre-loaded templates
├── dist/ # Compiled output
├── docs/ # Documentation
├── examples/ # Usage examples
└── docker/ # Docker configurations
# Test MCP server functionality node test-mcp-complete.js
# Start HTTP server pnpm run start:http <<<<<<< HEAD ======= # Test endpoints curl http://localhost:3003/health curl http://localhost:3003/api-docs
{ "method": "tools/call", "params": { "name": "list_prompts", "arguments": {} } }
<<<<<<< HEAD
TypeScript Path Resolution Errors:
# Clear TypeScript cache rm -rf **/*.tsbuildinfo pnpm run clean pnpm run build
SWC Build Failures:
# Ensure SWC is installed pnpm add -D @swc/cli @swc/core # Clean and rebuild pnpm run clean pnpm run build
Workspace Dependency Issues:
# Reinstall workspace dependencies pnpm install --force pnpm run build
Missing Modules or Types:
@mcp-prompts/core
firstdist/
directories are up to datedist/
directories and rebuildCommon Issues:
@mcp-prompts/core
first and that all dist/
directories are up to date.dist/
directories and rebuild.MCP Prompts follows a clean hexagonal architecture pattern:
mcp-prompts/
├── packages/
│ ├── core/ # Domain logic and ports
│ ├── @sparesparrow/ # Shared packages
│ └── adapters-*/ # Port implementations
├── apps/
│ └── server/ # MCP server application
└── docs/ # Documentation
# Build entire workspace pnpm run build # Development with watch mode pnpm run build:watch # Type checking pnpm run typecheck # Clean build artifacts pnpm run clean
# Core package pnpm -F @sparesparrow/mcp-prompts-core build pnpm -F @sparesparrow/mcp-prompts-core test # Adapter packages pnpm -F @sparesparrow/mcp-prompts-adapters-file build pnpm -F @sparesparrow/mcp-prompts-adapters-mdc build # Server app pnpm -F apps/server build pnpm -F apps/server test
For detailed API documentation, see:
{ "method": "tools/call", "params": { "name": "apply_template", "arguments": { "id": "code_review_assistant", "variables": { "language": "JavaScript", "code": "function hello() { console.log('Hello World'); }" } } } }
{ "method": "tools/call", "params": { "name": "add_prompt", "arguments": { "name": "My Custom Prompt", "content": "This is a custom prompt for {{subject}}", "isTemplate": true, "tags": ["custom", "example"], "variables": [ { "name": "subject", "description": "The subject to process", "required": true, "type": "string" } ] } } }
{{variable}}
syntax for dynamic contentMIT License - see LICENSE file for details.
Version: 3.0.8
Status: ✅ Production Ready
MCP Support: ✅ Full Implementation
Cursor Integration: ✅ Ready