Sales Analysis MCP Server

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.

Category
Visit Server

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

  1. Push this repo to GitHub.
  2. Open https://horizon.prefect.io/ and choose the GitHub repo.
  3. Configure the server with:
    • Server name: sales-analytics або інше унікальне ім'я.
    • Entrypoint: sales_mcp_server.py:mcp.
    • Authentication: увімкніть, якщо сервер має бути доступний тільки для вашої організації.
  4. Horizon має автоматично встановити dependencies з requirements.txt.
  5. Після 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"
      ]
    }
  }
}

Бізнес-сценарій для показу

  1. Агент читає sales://business-questions.
  2. Агент викликає load_sales_summary.
  3. Агент викликає top_products для revenue або gross_profit.
  4. Агент викликає monthly_sales_report.
  5. Агент використовує sales_report_prompt і готує короткий Markdown-звіт.

Обмеження безпеки

  • tools читають тільки CSV-файли всередині цієї демо-папки;
  • абсолютні шляхи заборонені;
  • файли поза демо-папкою заборонені;
  • сервер нічого не записує на диск;
  • сервер не використовує мережу й API keys.

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured