Fabric Docker
All-in-One Docker deployment for Fabric - AI augmentation framework with Web UI, REST API, and MCP Server
Installation
npx fabric-dockerAsk AI about Fabric Docker
Powered by Claude ยท Grounded in docs
I know everything about Fabric Docker. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
๐ง Fabric Docker
English | ็ฎไฝไธญๆ | ็น้ซไธญๆ | ๆฅๆฌ่ช
All-in-One Docker deployment for Fabric - AI augmentation framework with Web UI, REST API, and MCP Server
โจ Features
| Feature | Description |
|---|---|
| ๐ Web UI | Beautiful Svelte-based web interface for pattern management |
| ๐ REST API | Full-featured HTTP API with Swagger documentation |
| ๐ค MCP Server | Model Context Protocol server for AI assistant integration |
| ๐ฆ All-in-One | Single container with all services included |
| ๐ฏ 233+ Patterns | Pre-loaded AI prompt patterns for various tasks |
| ๐ง Multi-Model | Support for OpenAI, Anthropic, Gemini, Ollama, and more |
๐ Quick Start
# Clone the repository
git clone https://github.com/neosun100/fabric-docker.git
cd fabric-docker
# Copy environment file
cp .env.example .env
# Start with Docker Compose
docker compose up -d
# Access the services
# Web UI: http://localhost:5173
# REST API: http://localhost:8180
# Swagger: http://localhost:8180/swagger/index.html
# MCP: http://localhost:8181
๐ฆ Installation
Prerequisites
- Docker 20.10+
- Docker Compose 2.0+
- At least one AI provider API key (OpenAI, Anthropic, etc.)
Method 1: Docker Compose (Recommended)
-
Clone the repository
git clone https://github.com/neosun100/fabric-docker.git cd fabric-docker -
Configure environment
cp .env.example .env # Edit .env and add your API keys -
Start services
docker compose up -d -
Verify deployment
# Check container health docker ps # Test API curl http://localhost:8180/patterns/names
Method 2: Docker Run
# Pull or build the image
docker build -t fabric:latest .
# Run the container
docker run -d \
--name fabric \
-p 5173:8080 \
-p 8180:8180 \
-p 8181:8181 \
-e OPENAI_API_KEY=your-key-here \
-e ANTHROPIC_API_KEY=your-key-here \
-v fabric-config:/root/.config/fabric \
fabric:latest
โ๏ธ Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
PORT | REST API port | 8180 |
WEB_PORT | Web UI port (host mapping) | 5173 |
MCP_PORT | MCP Server port | 8181 |
OPENAI_API_KEY | OpenAI API key | - |
ANTHROPIC_API_KEY | Anthropic API key | - |
GEMINI_API_KEY | Google Gemini API key | - |
OLLAMA_HOST | Ollama server URL | - |
DEFAULT_MODEL | Default AI model | gpt-4o |
DEFAULT_VENDOR | Default AI vendor | openai |
API_KEY | Optional API authentication | - |
TZ | Timezone | Asia/Shanghai |
docker-compose.yml
services:
fabric:
build:
context: .
dockerfile: Dockerfile
image: neosun/fabric:latest
container_name: fabric
restart: unless-stopped
ports:
- "5173:8080" # Web UI
- "8180:8180" # REST API
- "8181:8181" # MCP Server
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
- DEFAULT_MODEL=gpt-4o
volumes:
- fabric-config:/root/.config/fabric
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8180/patterns/names"]
interval: 30s
timeout: 10s
retries: 3
volumes:
fabric-config:
๐ Usage
Web UI
Access the web interface at http://localhost:5173:
- Browse and search 233+ patterns
- Execute patterns with custom input
- Manage contexts and sessions
- Real-time chat interface
REST API
# List all patterns
curl http://localhost:8180/patterns/names
# Get a specific pattern
curl http://localhost:8180/patterns/summarize
# Check pattern exists
curl http://localhost:8180/patterns/exists/summarize
# Get available models
curl http://localhost:8180/models/names
# Get configuration
curl http://localhost:8180/config
# Get strategies
curl http://localhost:8180/strategies
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/patterns/names | GET | List all pattern names |
/patterns/:name | GET | Get pattern details |
/patterns/exists/:name | GET | Check if pattern exists |
/contexts/names | GET | List all contexts |
/sessions/names | GET | List all sessions |
/models/names | GET | List available models |
/config | GET | Get configuration |
/strategies | GET | List strategies |
/chat | POST | Send chat request |
/swagger/index.html | GET | Swagger UI |
MCP Integration
The MCP server enables AI assistants (like Claude Desktop) to use Fabric patterns directly.
Configure in your MCP client:
{
"mcpServers": {
"fabric": {
"url": "http://localhost:8181"
}
}
}
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Docker Container โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ Web UI โ โ REST API โ โ MCP Server โ โ
โ โ (Node) โ โ (Go) โ โ (Python) โ โ
โ โ :8080 โ โ :8180 โ โ :8181 โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ โ โ โ
โ โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโดโโโโโโโโโโโโ โ
โ โ Fabric Core โ โ
โ โ (233+ Patterns) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
Port 5173 Port 8180 Port 8181
๐ ๏ธ Tech Stack
| Component | Technology |
|---|---|
| Backend | Go (Gin Framework) |
| Web UI | Svelte + SvelteKit + Tailwind CSS |
| MCP Server | Python (FastAPI + Uvicorn) |
| Process Manager | Supervisor |
| Container | Alpine Linux |
| Build | Multi-stage Docker build |
๐ Project Structure
fabric-docker/
โโโ Dockerfile # Multi-stage build
โโโ docker-compose.yml # Compose configuration
โโโ docker/
โ โโโ entrypoint.sh # Container entrypoint
โ โโโ supervisord.conf # Process manager config
โ โโโ mcp_server.py # MCP server implementation
โ โโโ nginx.conf # Nginx config (optional)
โโโ data/
โ โโโ patterns/ # 233+ AI patterns
โ โโโ strategies/ # Prompt strategies
โโโ web/ # Svelte Web UI
โโโ cmd/ # Go commands
โโโ internal/ # Go internal packages
โโโ docs/ # Documentation
๐ง Troubleshooting
Container shows "unhealthy"
# Check logs
docker logs fabric
# Restart fabric-api service
docker exec fabric supervisorctl restart fabric-api
# Verify ports
docker exec fabric netstat -tlnp
API not responding
# Check if services are running
docker exec fabric supervisorctl status
# Manual restart
docker compose restart
Port conflicts
Edit .env to change port mappings:
PORT=8280
WEB_PORT=5273
MCP_PORT=8281
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Fabric - The original AI augmentation framework
- Daniel Miessler - Creator of Fabric
โญ Star History
๐ฑ Follow Me

