
gloveboxes/ignite-zava-mcp-server-and-postgresql-sample
Database managementЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
Сервер Model Context Protocol (MCP), который обеспечивает полный доступ к базе данных продаж клиентов для Zava Retail DIY Business.
Обзор
Сервер Model Context Protocol (MCP), который обеспечивает полный доступ к базе данных продаж клиентов для Zava Retail DIY Business. Этот сервер позволяет помощникам ИИ запрашивать и анализировать данные розничных продаж через безопасный интерфейс. 1. Docker Desktop установлен 2. Git установлен 3. : Установка и аутентификация с помощью Azure CLI 4. Доступ к встраиванию текста OpenAI 3-малой модели и необязательно gpt-4o-мини модели. Откройте окно терминала и выполните следующие команды: 1. Запустите следующие скрипты для автоматизации развертывания ресурсов Azure, необходимых для сервера MCP. Скрипты развертывания будут автоматически развертываться: - с встраиванием текста-3-малых и gpt-4o-мини моделей - (гибкий сервер) с расширением pgvector - для мониторинга - Принципал службы с соответствующими разрешениями Развертывание автоматически инициализирует базу данных PostgreSQL с данными розничной выборки Zava.
Обзор (машинный перевод)
для всестороннего анализа данных
См. ZAVA RETAIL DATABASE DOCUMENTATION
Сервер Model Context Protocol (MCP), который обеспечивает полный доступ к базе данных продаж клиентов для Zava Retail DIY Business. Этот сервер позволяет помощникам ИИ запрашивать и анализировать данные розничных продаж через безопасный интерфейс.
Предпосылки
1 Установлен Docker Desktop
2.Гит установлен.
3. ** Лазурный CLI**: Установка и аутентификация с помощью Azure CLI
4. Доступ к модели OpenAI text-embedding-3-small и необязательно gpt-4o-mini.
Начало работы
Откройте окно терминала и выполните следующие команды: 1 Аутентификация с помощью Azure CLI
-
Клонировать хранилище
-
Перейдите в каталог проекта
###Развертывание ресурсов Azure
Запустите следующие скрипты для автоматизации развертывания ресурсов Azure, необходимых для сервера MCP.
Скрипты развертывания будут автоматически развертываться:
- Azure AI Foundry с моделями
text-embedding-3-smallиgpt-4o-miniБаза данных Azure для PostgreSQL** (гибкий сервер) с расширением pgvector Применение Insights для мониторинга - Руководитель службы с соответствующими разрешениями
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
Sales Analysis MCP Server
For a comprehensive view of data
See ZAVA RETAIL DATABASE DOCUMENTATION
A Model Context Protocol (MCP) server that provides comprehensive customer sales database access for Zava Retail DIY Business. This server enables AI assistants to query and analyze retail sales data through a secure, schema-aware interface.
Prerequisites
- Docker Desktop installed
- Git installed
- Azure CLI: Install and authenticate with Azure CLI
- Access to OpenAI
text-embedding-3-smallmodel and optionallygpt-4o-minimodel.
Getting Started
Open a terminal window and running the following commands:
-
Authenticate with Azure CLI
az login -
Clone the repository
git clone https://github.com/gloveboxes/Zava-MCP-Server-and-PostgreSQL-Sample -
Navigate to the project directory
cd Zava-MCP-Server-and-PostgreSQL-Sample
Deploy Azure Resources
Run the following scripts to automate the deployment of Azure resources needed for the MCP server.
The deployment scripts will automatically deploy:
- Azure AI Foundry with both
text-embedding-3-smallandgpt-4o-minimodels - Azure Database for PostgreSQL (Flexible Server) with pgvector extension
- Application Insights for monitoring
- Service principal with appropriate permissions
The deployment will automatically initialize the PostgreSQL database with the Zava retail sample data.
Choose the script for your platform:
Windows (PowerShell)
# Run from the project root directory
cd infra && ./deploy.ps1
macOS/Linux (Bash)
# Run from the project root directory
cd infra && ./deploy.sh
Running the MCP Server
After deploying Azure resources using the deployment scripts above, the MCP server will automatically connect to your Azure PostgreSQL database using the configuration in .env.
To run the MCP servers:
# Start the MCP servers (they will connect to Azure PostgreSQL)
# Option 1: Using VS Code tasks
# Use Ctrl+Shift+P -> "Tasks: Run Task" -> "Start Supplier and Finance MCP Servers"
# Option 2: Using terminal
python -m app.mcp.supplier_server &
python -m app.mcp.finance_server &
The deployment script automatically creates a .env file with the correct Azure connection details.
Manual Database Initialization
If the automatic database initialization fails during deployment, you can initialize it manually:
cd infra
./init-azure-db.sh
This script will:
- Test the connection to Azure PostgreSQL
- Enable required extensions (pgvector, plpgsql)
- Create the store_manager user
- Restore the Zava retail database from the backup file
- Set up proper permissions
Cleanup Azure Resources
When you’re done with the workshop, you can remove all Azure resources:
cd infra
./cleanup.sh
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →