This document provides a complete guide to configuring the Devora Prompt Assistant MCP server for different environments and use cases.
- Quick Start
- Environment Variables
- Provider Setup
- Transport Options
- Security Configuration
- Performance Tuning
- Logging Configuration
- Environment-Specific Configs
- Troubleshooting
The easiest way to get started is with the one-click Cursor installation:
Add this to your Cursor MCP settings (~/.cursor/mcp.json):
{
"mcpServers": {
"devora-prompt-assistant": {
"command": "npx",
"args": ["-y", "@devora_no/prompt-assistant-mcp"],
"env": {
"TRANSPORT": "stdio",
"OPENAI_API_KEY": "your-openai-key-here",
"ANTHROPIC_API_KEY": "your-anthropic-key-here"
}
}
}
}At least one AI provider API key is required:
# Choose at least one provider
OPENAI_API_KEY="sk-..."
ANTHROPIC_API_KEY="sk-ant-..."
AZURE_OPENAI_API_KEY="your-azure-key"
AZURE_OPENAI_ENDPOINT="https://your-resource.openai.azure.com/"
AZURE_OPENAI_DEPLOYMENT="your-deployment-name"
GEMINI_API_KEY="AIza..."
PERPLEXITY_API_KEY="pplx-..."# Server Settings
SERVER_NAME="devora-prompt-assistant"
SERVER_VERSION="0.2.1"
LOG_LEVEL="info" # debug, info, warn, error
TRANSPORT="stdio" # stdio, streamable-http
PORT=8000 # HTTP server port
BIND_ADDRESS="127.0.0.1" # Server bind address# LLM Settings
LLM_MODE="review" # review, refine, off
DEFAULT_PROVIDER="openai" # openai, anthropic, gemini, perplexity, azureOpenAI# Security Settings
RATE_LIMIT_ENABLED="true" # Enable rate limiting
RATE_LIMIT_CAPACITY=50 # Max requests per client
RATE_LIMIT_REFILL_RATE=5 # Requests per second
RATE_LIMIT_BURST_SIZE=20 # Burst capacity
# Circuit Breaker
CIRCUIT_BREAKER_ENABLED="true" # Enable circuit breaker
CIRCUIT_BREAKER_FAILURE_THRESHOLD=5 # Failures before opening
CIRCUIT_BREAKER_TIMEOUT=30000 # Timeout in milliseconds
# Authentication (HTTP only)
AUTH_BEARER_TOKENS="dev-token-123,prod-token-456"# Performance Settings
LLM_TIMEOUT=30000 # LLM request timeout
CONTEXT_COLLECTION_TIMEOUT=10000 # Context collection timeout
MAX_MEMORY_MB=512 # Memory limit
CACHE_TTL_MINUTES=15 # Cache TTL
# Fallback Settings
FALLBACK_ENABLED="true" # Enable fallback mechanisms
FALLBACK_TIMEOUT=10000 # Fallback timeout
FALLBACK_MAX_RETRIES=2 # Max retries# Logging Settings
LOG_DIR="./logs" # Log directory
LOG_MAX_FILES=7 # Max log files to keep
LOG_MAX_SIZE="100M" # Max log file size
LOG_FORMAT="json" # json, text- Get API Key: Visit Anthropic Console
- Set Environment Variable:
export ANTHROPIC_API_KEY="sk-ant-..."
- Default Model:
claude-3-5-sonnet-latest - Features: Best for complex reasoning and analysis
- Get API Key: Visit OpenAI Platform
- Set Environment Variable:
export OPENAI_API_KEY="sk-..."
- Default Model:
o3-mini - Features: Good balance of speed and quality
- Get Credentials: From Azure Portal
- Set Environment Variables:
export AZURE_OPENAI_API_KEY="your-key" export AZURE_OPENAI_ENDPOINT="https://your-resource.openai.azure.com/" export AZURE_OPENAI_DEPLOYMENT="your-deployment-name"
- Default Model:
gpt-4o-mini - Features: Enterprise-grade OpenAI access
- Get API Key: Visit Google AI Studio
- Set Environment Variable:
export GEMINI_API_KEY="AIza..."
- Default Model:
gemini-2.0-flash - Features: Fast and cost-effective
- Get API Key: Visit Perplexity Console
- Set Environment Variable:
export PERPLEXITY_API_KEY="pplx-..."
- Default Model:
sonar - Features: Good for research tasks
Best for: Local development, Cursor integration
{
"mcpServers": {
"devora-prompt-assistant": {
"command": "npx",
"args": ["-y", "@devora_no/prompt-assistant-mcp"],
"env": {
"TRANSPORT": "stdio"
}
}
}
}Features:
- Direct process communication
- No network overhead
- Automatic process management
- Secure (no network exposure)
Best for: Remote access, production deployment
{
"mcpServers": {
"devora-prompt-assistant": {
"command": "npx",
"args": ["-y", "@devora_no/prompt-assistant-mcp"],
"env": {
"TRANSPORT": "streamable-http",
"PORT": "8000",
"AUTH_BEARER_TOKENS": "your-token-here"
}
}
}
}Features:
- Server-Sent Events (SSE)
- Load balancer compatible
- Bearer token authentication
- CORS support
# Enable rate limiting
RATE_LIMIT_ENABLED="true"
# Configure limits
RATE_LIMIT_CAPACITY=50 # Max requests per client
RATE_LIMIT_REFILL_RATE=5 # Requests per second
RATE_LIMIT_BURST_SIZE=20 # Burst capacity# Enable circuit breaker
CIRCUIT_BREAKER_ENABLED="true"
# Configure thresholds
CIRCUIT_BREAKER_FAILURE_THRESHOLD=5 # Failures before opening
CIRCUIT_BREAKER_TIMEOUT=30000 # Timeout in milliseconds# Set bearer tokens
AUTH_BEARER_TOKENS="dev-token-123,prod-token-456"
# Use in requests
curl -H "Authorization: Bearer dev-token-123" http://localhost:8000/health# Bind to localhost only
BIND_ADDRESS="127.0.0.1"
# Bind to all interfaces (production)
BIND_ADDRESS="0.0.0.0"# Set memory limit
MAX_MEMORY_MB=512 # Default
MAX_MEMORY_MB=1024 # High memory
MAX_MEMORY_MB=2048 # Very high memory# Adjust cache TTL
CACHE_TTL_MINUTES=15 # Default
CACHE_TTL_MINUTES=30 # Longer cache
CACHE_TTL_MINUTES=5 # Shorter cache# LLM timeout
LLM_TIMEOUT=30000 # 30 seconds
LLM_TIMEOUT=60000 # 60 seconds
# Context collection timeout
CONTEXT_COLLECTION_TIMEOUT=10000 # 10 seconds
CONTEXT_COLLECTION_TIMEOUT=30000 # 30 seconds# HTTP connection settings (automatic)
# Max sockets: 100
# Max free sockets: 10
# Keep-alive: enabled# Debug logging
LOG_LEVEL="debug"
# Production logging
LOG_LEVEL="info"
# Minimal logging
LOG_LEVEL="error"# Log directory
LOG_DIR="./logs"
# Log rotation
LOG_MAX_FILES=7 # Keep 7 days
LOG_MAX_SIZE="100M" # Max file size
# Log format
LOG_FORMAT="json" # JSON format
LOG_FORMAT="text" # Text formatlogs/YYYY-MM-DD-server.log- General application logslogs/YYYY-MM-DD-error.log- Error-only logslogs/YYYY-MM-DD-audit.log- Security and audit events
# .env.development
LOG_LEVEL="debug"
RATE_LIMIT_ENABLED="false"
CIRCUIT_BREAKER_ENABLED="false"
LLM_MODE="review"# .env.production
LOG_LEVEL="info"
RATE_LIMIT_ENABLED="true"
CIRCUIT_BREAKER_ENABLED="true"
MAX_MEMORY_MB=1024
CACHE_TTL_MINUTES=30# .env.test
LOG_LEVEL="error"
LLM_MODE="off"
CACHE_TTL_MINUTES=1
FALLBACK_ENABLED="false"# Docker environment
TRANSPORT="streamable-http"
BIND_ADDRESS="0.0.0.0"
LOG_FORMAT="json"{
"mcpServers": {
"devora-prompt-assistant": {
"command": "npx",
"args": ["-y", "@devora_no/prompt-assistant-mcp"],
"env": {
"TRANSPORT": "stdio",
"OPENAI_API_KEY": "sk-..."
}
}
}
}{
"mcpServers": {
"devora-prompt-assistant": {
"command": "npx",
"args": ["-y", "@devora_no/prompt-assistant-mcp"],
"env": {
"TRANSPORT": "stdio",
"LOG_LEVEL": "info",
"LLM_MODE": "review",
"DEFAULT_PROVIDER": "openai",
"OPENAI_API_KEY": "sk-...",
"ANTHROPIC_API_KEY": "sk-ant-...",
"RATE_LIMIT_ENABLED": "true",
"CIRCUIT_BREAKER_ENABLED": "true",
"MAX_MEMORY_MB": "512",
"CACHE_TTL_MINUTES": "15"
}
}
}
}{
"mcpServers": {
"devora-prompt-assistant": {
"command": "npx",
"args": ["-y", "@devora_no/prompt-assistant-mcp"],
"env": {
"TRANSPORT": "streamable-http",
"PORT": "8000",
"BIND_ADDRESS": "0.0.0.0",
"LOG_LEVEL": "info",
"LOG_FORMAT": "json",
"LLM_MODE": "review",
"OPENAI_API_KEY": "sk-...",
"ANTHROPIC_API_KEY": "sk-ant-...",
"AUTH_BEARER_TOKENS": "prod-token-123",
"RATE_LIMIT_ENABLED": "true",
"CIRCUIT_BREAKER_ENABLED": "true",
"MAX_MEMORY_MB": "1024",
"CACHE_TTL_MINUTES": "30"
}
}
}
}- Check API keys: Ensure at least one provider API key is set
- Verify format: Check API key format and validity
- Check environment: Ensure environment variables are loaded
- Check syntax: Verify JSON syntax in configuration files
- Check values: Ensure all values are within valid ranges
- Check required fields: Ensure all required fields are present
- Wait and retry: Automatic backoff is enabled
- Adjust limits: Increase
RATE_LIMIT_CAPACITYif needed - Use different provider: Switch to a different AI provider
- Wait for timeout: Circuit breaker resets after timeout
- Check provider health: Ensure AI provider is accessible
- Reset manually: Use health check endpoint to reset
# Test configuration
node -e "console.log(process.env.OPENAI_API_KEY ? 'OpenAI configured' : 'OpenAI not configured')"# Health check
curl http://localhost:8000/health
# Metrics
curl http://localhost:8000/metrics# Server logs
tail -f logs/server.log
# Error logs
tail -f logs/error.log
# Debug logs
LOG_LEVEL=debug npm start- Check Documentation: Review this guide and other docs
- GitHub Issues: Report bugs
- Discussions: Ask questions
- Security: Report security issues
Last Updated: October 12, 2025
Version: 0.2.1
Status: Production Ready
Security Status: ✅ Secured & Monitored
Maintained by: Devora
Developed by Devora ☔️
Brave • Innovative • Responsible • Creative • Different