Skip to main content
Glama
docker-entrypoint.sh1.97 kB
#!/bin/bash # PrestaShop MCP Server - Docker Entrypoint # Handles documentation availability and indexing set -e DOCS_PATH="${PRESTASHOP_DOCS_PATH:-/data/prestashop-docs}" DB_PATH="${PRESTASHOP_DB_PATH:-/app/database.db}" AUTO_FETCH="${PRESTASHOP_AUTO_FETCH:-true}" echo "PrestaShop MCP Server - Starting..." >&2 echo "Docs path: $DOCS_PATH" >&2 echo "Database path: $DB_PATH" >&2 # Check if documentation exists if [ ! -d "$DOCS_PATH" ] || [ -z "$(ls -A $DOCS_PATH 2>/dev/null)" ]; then echo "Documentation not found at $DOCS_PATH" >&2 if [ "$AUTO_FETCH" = "true" ]; then echo "Auto-fetching PrestaShop documentation from GitHub..." >&2 mkdir -p /tmp git clone --depth 1 https://github.com/PrestaShop/docs.git /tmp/prestashop-docs >&2 # Update docs path to use cloned location export PRESTASHOP_DOCS_PATH=/tmp/prestashop-docs echo "Documentation cloned to /tmp/prestashop-docs" >&2 else echo "ERROR: No documentation found and AUTO_FETCH is disabled" >&2 echo "Please mount documentation to $DOCS_PATH or set PRESTASHOP_AUTO_FETCH=true" >&2 exit 1 fi else echo "Using documentation from: $DOCS_PATH" >&2 fi # Check if database needs indexing if [ ! -f "$DB_PATH" ]; then echo "Database not found, indexing documentation..." >&2 python -m prestashop_mcp.ingest_v2 --force >&2 # Verify indexing succeeded DOC_COUNT=$(python -c "import sqlite3; conn = sqlite3.connect('$DB_PATH'); cursor = conn.cursor(); cursor.execute('SELECT COUNT(*) FROM prestashop_docs'); print(cursor.fetchone()[0]); conn.close()") echo "Indexed $DOC_COUNT documents" >&2 if [ "$DOC_COUNT" -lt 100 ]; then echo "ERROR: Indexing failed, only $DOC_COUNT documents found" >&2 exit 1 fi else echo "Using existing database at: $DB_PATH" >&2 fi echo "Starting PrestaShop MCP Server..." >&2 # Start the MCP server exec python -m prestashop_mcp.server

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/florinel-chis/prestashop-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server