Assistente Empresarial MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Assistente Empresarial MCP ServerQual o produto mais vendido?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Business Sales and Inventory Assistant
Intelligent command-line (CLI) virtual assistant designed to assist with querying and analyzing business information, inventory, and sales for a clothing store. The system uses the Model Context Protocol (MCP) with the FastMCP library and the LangChain framework, integrating local data from an Excel spreadsheet with external resources, such as web search and real-time currency exchange rates.
How It Works
The project is structured into two main parts connected through the Model Context Protocol (MCP):
MCP Server (
server.py): Centralizes business tools, performing read and aggregation operations on an Excel spreadsheet, as well as queries to external APIs.Client/Agent (
agente.py): Initializes the MCP server via subprocess (stdio), exposes the tools to the LLM (gpt-4o-minifrom OpenAI), and manages the assistant's reasoning flow.
Communication Flow
Usuário (CLI) <──> main.py
│
▼
agente.py (Agente LangChain / GPT-4o-Mini)
│
(Comunicação via MCP - stdio)
│
▼
server.py (Servidor FastMCP)
┌────────────┼────────────┐
▼ ▼ ▼
Planilha Excel Tavily API Frankfurter API
(estoque_vendas) (Busca Web) (Cotação de Moedas)Related MCP server: mcp-data-lens
Features
The assistant has access to local and external tools to answer questions in natural language:
Business Tools (Local Data)
consulta_estoque: Returns the complete list of products and the current calculated stock (Quantity Purchased - Quantity Sold).estoque_baixo: Lists products with calculated stock equal to or below 15 units.consulta_faturamento: Calculates and returns the total accumulated revenue (Sale Price × Quantity Sold).produto_mais_vendido: Identifies and details the product with the highest number of units sold.vendas_por_cor: Groups and displays total sales grouped by product color.vendas_por_marca: Groups and displays total sales grouped by product brand.
Utility Tools (External APIs)
pesquisa_web: Performs internet searches via the Tavily API to answer questions about external or up-to-date data.consultar_cotacao: Retrieves the real-time exchange rate between two currencies using the Frankfurter API.
Project Structure
Assistente_empresarial_v1/
├── .env.example # Modelo das variáveis de ambiente necessárias
├── .gitignore # Arquivos ignorados pelo Git
├── agente.py # Inicialização do agente e conexão com o cliente MCP
├── estoque_vendas.xlsx # Planilha de dados (fonte de dados de estoque e vendas)
├── main.py # Ponto de entrada da aplicação (loop interativo da CLI)
├── requirements.txt # Lista de dependências do Python
└── server.py # Definição das ferramentas e inicialização do servidor FastMCPPrerequisites
Python 3.10 or higher
OpenAI API key (for the LLM model)
Tavily API key (for internet searches)
Installation and Setup
1. Clone or navigate to the repository
Navigate to the project directory:
cd Assistente_empresarial_v12. Create and activate the virtual environment (Recommended)
python -m venv venvActivation on Windows (PowerShell):
.\venv\Scripts\Activate.ps1Activation on Linux/macOS:
source venv/bin/activate3. Install the dependencies
pip install -r requirements.txt4. Configure the environment variables
Create a .env file in the project root based on .env.example:
copy .env.example .envOpen the .env file and enter your OpenAI and Tavily credentials:
OPENAI_API_KEY=sua_chave_da_openai_aqui
TAVILY_API_KEY=sua_chave_da_tavily_aquiHow to Run
With the virtual environment activated and the variables configured, run the application entry point:
python main.pyThe assistant will start the interactive terminal. You will see the input prompt:
Bem_vindo ao Assistente Empresarial
Digite 'sair' caso queira sair
oque temos para hoje: Example Questions
You can ask things like:
"Which products are low in stock?"
"What was the company's total revenue?"
"Which brand sold the most?"
"What is the dollar to real exchange rate today?"
"Which color sells the most?"
This server cannot be deployed
Maintenance
Related MCP Connectors
Ask questions in plain language, get answers from your business database. No SQL required.
Query and audit AppSheet apps in natural language via Knotrik's pre-scanned definitions.
AI access to Quadratic spreadsheets: open files, run Python/SQL, query connected databases.
Ask business questions in plain English. Get instant answers from your database, no SQL needed.
Related MCP Servers
- AlicenseCqualityBmaintenanceEnables conversational data analysis of Excel/CSV files through natural language queries, powered by 395 Excel functions via HyperFormula and multi-provider AI. Supports advanced analytics, bulk operations, financial modeling, and large file processing with intelligent chunking.352636MIT
- AlicenseNot gradedqualityCmaintenanceEnables users to ask questions about their spreadsheets in plain English and receive instant answers using DuckDB-powered analytics, supporting multiple file formats like Excel, CSV, and Parquet.2MIT
- FlicenseNot gradedqualityDmaintenanceEnables natural language sales analysis by connecting to a SQLite database, generating charts, and exporting results to CSV/Excel.-
- FlicenseNot gradedqualityCmaintenanceEnables AI-powered Excel spreadsheet manipulation through natural language, supporting CRUD operations with JWT-authenticated REST API and MCP tools.-