
gloveboxes/ignite-zava-mcp-server-and-postgresql-sample
Database managementこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
A Model Context Protocol (MCP) server that provides comprehensive customer sales database access for Zava Retail DIY Business.
概要
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. 1. Docker Desktop installed 2. Git installed 3. : Install and authenticate with Azure CLI 4. Access to OpenAI text-embedding-3-small model and optionally gpt-4o-mini model. Open a terminal window and running the following commands: 1. Authenticate with Azure CLI Run the following scripts to automate the deployment of Azure resources needed for the MCP server. The deployment scripts will automatically deploy: - with both text-embedding-3-small and gpt-4o-mini models - (Flexible Server) with pgvector extension - for monitoring - Service principal with appropriate permissions The deployment will automatically initialize the PostgreSQL database with the Zava retail sample data.
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 のガイドから始めましょう →