@fullqueso/mcp-bc-gastos
v1.1.0
Published
MCP server for Business Central operational expense analysis - Full Queso franchise stores
Maintainers
Readme
@fullqueso/mcp-bc-gastos
MCP server for analyzing operational expenses and financial ratios from Microsoft Business Central. Built for the Full Queso franchise (3 stores: FQ01 Chacao, FQ28 Marques, FQ88 Candelaria).
Features
- Expense Analysis - Detailed breakdown by 10 categories with account-level detail and benchmarks
- Efficiency Ratios - Expense-to-income, payroll, rent, utilities, marketing, operating margin
- Store Comparison - Rankings, variances, and savings opportunities across stores
- Anomaly Detection - Automatic alerts by severity with root-cause analysis
- Trend Analysis - 6-month historical trends with growth rates and seasonality
- Expense Details - Transaction-level drill-down with vendor information
- Account Transactions - Per-account ledger with running balance and vendor lookup
Installation
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"fullqueso-bc-gastos": {
"command": "npx",
"args": ["-y", "@fullqueso/mcp-bc-gastos"],
"env": {
"BC_TENANT_ID": "your-azure-tenant-id",
"BC_CLIENT_ID": "your-azure-app-client-id",
"BC_CLIENT_SECRET": "your-azure-app-client-secret",
"BC_TOKEN_URL": "https://login.microsoftonline.com/YOUR_TENANT/oauth2/v2.0/token",
"BC_SCOPE": "https://api.businesscentral.dynamics.com/.default",
"BC_API_BASE": "https://api.businesscentral.dynamics.com/v2.0",
"BC_ENVIRONMENT": "production",
"BC_COMPANY_FQ01": "company-guid-fq01",
"BC_COMPANY_FQ28": "company-guid-fq28",
"BC_COMPANY_FQ88": "company-guid-fq88"
}
}
}
}Local Development
git clone https://github.com/Fullqueso/fullqueso-mcp-bc-gastos.git
cd fullqueso-mcp-bc-gastos
npm install
cp .env.example .env
# Edit .env with your credentials
npm startTools
get_expense_analysis
Detailed expense analysis by category with benchmark comparisons.
- Parameters:
stores,period,month,start_date,end_date
get_efficiency_ratios
Financial ratios: expense-to-income, payroll, rent, utilities, marketing, operating margin.
- Parameters:
stores,period,month,start_date,end_date
compare_stores
Compare all stores with efficiency rankings and savings opportunities.
- Parameters:
period,month,start_date,end_date
detect_anomalies
Detect expense anomalies with severity levels and recommended actions.
- Parameters:
stores,period,month,start_date,end_date,sensitivity
get_trends
Historical trend analysis (up to 6 months) with growth rates and ASCII charts.
- Parameters:
store,months
get_expense_details
Transaction-level drill-down with vendor lookup and filters.
- Parameters:
store,period,month,start_date,end_date,category,account_number,min_amount,limit
get_account_transactions
Per-account ledger view with running balance and vendor information.
- Parameters:
account_number,store,start_date,end_date
Environment Variables
| Variable | Required | Description |
|---|---|---|
| BC_TENANT_ID | Yes | Azure AD tenant ID |
| BC_CLIENT_ID | Yes | Azure AD app client ID |
| BC_CLIENT_SECRET | Yes | Azure AD app client secret |
| BC_TOKEN_URL | Yes | OAuth 2.0 token endpoint |
| BC_SCOPE | Yes | BC API scope |
| BC_API_BASE | Yes | BC API base URL |
| BC_ENVIRONMENT | Yes | BC environment (e.g., production) |
| BC_COMPANY_FQ01 | Yes | Company GUID for store FQ01 |
| BC_COMPANY_FQ28 | No | Company GUID for store FQ28 |
| BC_COMPANY_FQ88 | No | Company GUID for store FQ88 |
| LOG_LEVEL | No | Log level: debug, info, warn, error (default: info) |
Chart of Accounts
10 expense categories mapped to account ranges 60000-99999:
- Planta Fisica (60000-60999) - Rent, utilities
- Alquiler Equipos (61000-61999) - Equipment rental
- Logistica (62000-62999) - Vehicles, delivery
- Marketing (63000-63999) - Advertising, commissions
- Administrativos (64000-64999) - Office, software
- Seguros (65000-65999) - Insurance
- Bancarios (67000-67999) - Banking fees, interest
- Servicios Contratados (68000-68999) - Contracted services
- Nomina (70000-74999) - Payroll, benefits
- Otros (80000-99999) - Depreciation, other
License
MIT
