Skip to main content
Glama
rafael-BM08

Assistente Empresarial MCP Server

by rafael-BM08

销售与库存业务助手

智能命令行(CLI)虚拟助手,旨在帮助查询和分析服装店的商业信息、库存和销售数据。该系统使用模型上下文协议(MCP)配合 FastMCP 库和 LangChain 框架,将本地 Excel 电子表格数据与外部资源(如网络搜索和实时货币汇率)集成。


工作原理

该项目通过模型上下文协议(MCP)连接两个主要部分:

  1. MCP 服务器(server.py:集中业务工具,对 Excel 电子表格执行读取和聚合操作,并查询外部 API。

  2. 客户端/代理(agente.py:通过子进程(stdio)初始化 MCP 服务器,将工具暴露给 LLM(OpenAI 的 gpt-4o-mini),并管理助手的推理流程。

通信流程

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

功能

该助手可以访问本地和外部工具,以自然语言回答问题:

业务工具(本地数据)

  • consulta_estoque:返回完整的产品列表和当前计算库存(购买数量 - 销售数量)。

  • estoque_baixo:列出计算库存等于或低于 15 件的产品。

  • consulta_faturamento:计算并返回累计总营收(销售价格 × 销售数量)。

  • produto_mais_vendido:识别并详细说明销量最高的产品。

  • vendas_por_cor:按产品颜色分组并显示销售总额。

  • vendas_por_marca:按产品品牌分组并显示销售总额。

实用工具(外部 API)

  • pesquisa_web:通过 Tavily API 进行互联网搜索,以回答有关外部或最新数据的问题。

  • consultar_cotacao:使用 Frankfurter API 获取两种货币之间的实时汇率。


项目结构

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 FastMCP

前提条件

  • Python 3.10 或更高版本

  • OpenAI API 密钥(用于 LLM 模型)

  • Tavily API 密钥(用于互联网搜索)


安装与配置

1. 克隆或导航到仓库

导航到项目目录:

cd Assistente_empresarial_v1

2. 创建并激活虚拟环境(推荐)

python -m venv venv

在 Windows(PowerShell)中激活:

.\venv\Scripts\Activate.ps1

在 Linux/macOS 中激活:

source venv/bin/activate

3. 安装依赖

pip install -r requirements.txt

4. 配置环境变量

在项目根目录中,基于 .env.example 创建一个 .env 文件:

copy .env.example .env

打开 .env 文件并输入你的 OpenAI 和 Tavily 凭据:

OPENAI_API_KEY=sua_chave_da_openai_aqui
TAVILY_API_KEY=sua_chave_da_tavily_aqui

如何运行

在虚拟环境已激活且变量已配置的情况下,运行应用程序的入口点:

python main.py

助手将启动交互式终端。你将看到输入提示:

Bem_vindo ao Assistente Empresarial
Digite 'sair' caso queira sair

oque temos para hoje: 

问题示例

你可以询问类似以下内容:

  • "哪些产品库存不足?"

  • "公司的总营收是多少?"

  • "最畅销的品牌是哪个?"

  • "今天美元兑雷亚尔的汇率是多少?"

  • "哪种颜色卖得最好?"

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    C
    quality
    F
    maintenance
    Enables 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.
    35
    36
    36
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables 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.
    2
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables querying Excel and CSV files using SQL via natural language, allowing AI assistants to analyze data without manual SQL writing.
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • Live & historical FX rates and currency conversion for AI agents. No API keys.

  • Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.

  • Live & historical FX rates for AI agents, from European Central Bank data. No API keys.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rafael-BM08/Assistente_empresarial_v1'

If you have feedback or need assistance with the MCP directory API, please join our Discord server