Sales Analysis MCP Server
Enables sales data analysis from CSV files using MCP tools, resources, and prompts, including metrics like revenue, profit, top products, and monthly trends.
README
FastMCP demo: аналіз продажів із CSV
MCP Demo показує, як перетворити кілька Python-функцій для аналізу продажів на MCP tools/resources/prompts.
Файли
sales_mcp_server.py- FastMCP server.sales_data.csv- маленький приклад продажів за 3 місяці.
Що демонструє приклад
tool: load_sales_summary- рахує загальні метрики продажів.tool: top_products- повертає топ продуктів за виручкою, прибутком або кількістю.tool: monthly_sales_report- показує динаміку продажів по місяцях.resource: sales://sample-csv- дає read-only доступ до sample CSV.resource: sales://business-questions- список типових бізнес-питань.prompt: sales_report_prompt- шаблон для AI sales analyst.
Локальна перевірка без MCP host
python3 -m pip install -r requirements.txt
python3 sales_mcp_server.py --demo
Цей режим викликає ті самі Python-функції напряму і друкує результат у термінал.
Перевірка FastMCP entrypoint
fastmcp inspect sales_mcp_server.py:mcp
fastmcp run fastmcp.json
fastmcp.json описує production-style запуск через HTTP transport. MCP endpoint буде доступний на /mcp/.
Deploy to Prefect Horizon
- Push this repo to GitHub.
- Open
https://horizon.prefect.io/and choose the GitHub repo. - Configure the server with:
- Server name:
sales-analyticsабо інше унікальне ім'я. - Entrypoint:
sales_mcp_server.py:mcp. - Authentication: увімкніть, якщо сервер має бути доступний тільки для вашої організації.
- Server name:
- Horizon має автоматично встановити dependencies з
requirements.txt. - Після deploy перевірте tools/resources/prompts у Horizon Inspector.
Очікуваний remote MCP endpoint матиме формат:
https://<server-name>.fastmcp.app/mcp
Запуск як MCP server
python3 -m pip install -r requirements.txt
python3 sales_mcp_server.py
Після цього сервер можна підключати до MCP host, який підтримує локальні stdio сервери.
Для HTTP запуску поза Horizon:
python3 sales_mcp_server.py --http
За замовчуванням HTTP server слухає 0.0.0.0:8000, а health check доступний на /health. Якщо platform задає PORT, сервер автоматично запуститься в HTTP mode.
Приклад конфігурації для host, який очікує команду запуску:
{
"mcpServers": {
"sales-analytics": {
"command": "python3",
"args": [
"/absolute/path/to/sales_mcp_server.py"
]
}
}
}
Бізнес-сценарій для показу
- Агент читає
sales://business-questions. - Агент викликає
load_sales_summary. - Агент викликає
top_productsдляrevenueабоgross_profit. - Агент викликає
monthly_sales_report. - Агент використовує
sales_report_promptі готує короткий Markdown-звіт.
Обмеження безпеки
- tools читають тільки CSV-файли всередині цієї демо-папки;
- абсолютні шляхи заборонені;
- файли поза демо-папкою заборонені;
- сервер нічого не записує на диск;
- сервер не використовує мережу й API keys.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.