MCP Hub
Back to servers

Fabric Docker

A containerized Model Context Protocol server for the Fabric AI framework, providing access to over 233 crowdsourced prompt patterns across multiple LLM providers.

Stars
1
Updated
Jan 3, 2026
Validated
Jan 11, 2026

🧠 Fabric Docker

English | 简体中文 | 繁體中文 | 日本語

Docker License GitHub Stars

All-in-One Docker deployment for Fabric - AI augmentation framework with Web UI, REST API, and MCP Server

Fabric Logo

✨ Features

FeatureDescription
🌐 Web UIBeautiful Svelte-based web interface for pattern management
🔌 REST APIFull-featured HTTP API with Swagger documentation
🤖 MCP ServerModel Context Protocol server for AI assistant integration
📦 All-in-OneSingle container with all services included
🎯 233+ PatternsPre-loaded AI prompt patterns for various tasks
🔧 Multi-ModelSupport 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)

  1. Clone the repository

    git clone https://github.com/neosun100/fabric-docker.git
    cd fabric-docker
    
  2. Configure environment

    cp .env.example .env
    # Edit .env and add your API keys
    
  3. Start services

    docker compose up -d
    
  4. 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

VariableDescriptionDefault
PORTREST API port8180
WEB_PORTWeb UI port (host mapping)5173
MCP_PORTMCP Server port8181
OPENAI_API_KEYOpenAI API key-
ANTHROPIC_API_KEYAnthropic API key-
GEMINI_API_KEYGoogle Gemini API key-
OLLAMA_HOSTOllama server URL-
DEFAULT_MODELDefault AI modelgpt-4o
DEFAULT_VENDORDefault AI vendoropenai
API_KEYOptional API authentication-
TZTimezoneAsia/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

EndpointMethodDescription
/patterns/namesGETList all pattern names
/patterns/:nameGETGet pattern details
/patterns/exists/:nameGETCheck if pattern exists
/contexts/namesGETList all contexts
/sessions/namesGETList all sessions
/models/namesGETList available models
/configGETGet configuration
/strategiesGETList strategies
/chatPOSTSend chat request
/swagger/index.htmlGETSwagger 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

ComponentTechnology
BackendGo (Gin Framework)
Web UISvelte + SvelteKit + Tailwind CSS
MCP ServerPython (FastAPI + Uvicorn)
Process ManagerSupervisor
ContainerAlpine Linux
BuildMulti-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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments


⭐ Star History

Star History Chart

📱 Follow Me

WeChat

Reviews

No reviews yet

Sign in to write a review