Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

MCP server for AllPets Clinic analytics, providing weekly KPI dashboards, natural language SQL queries, and Excel report generation.

README.md

allpets_mcp

Fully self-contained MCP server for AllPets Clinic & Beyond analytics. All business logic lives inside this repo — no dependency on any sibling folder at runtime.

---

Setup (one-time)

cd C:\Users\sathv\Desktop\allpets_mcp

# Create venv
python -m venv venv

# Install dependencies
.\venv\Scripts\pip.exe install -r requirements.txt

# Fill in credentials (already populated for local dev)
notepad .env

---

Local test

# Dev inspector — opens browser UI to call tools manually
.\venv\Scripts\python.exe -m mcp dev server.py

# Or run directly (exits immediately in stdio mode — expected)
.\venv\Scripts\python.exe server.py

---

Claude Desktop setup

  1. Open %APPDATA%\Claude\claude_desktop_config.json
  2. Add the allpets entry inside "mcpServers":
{
  "mcpServers": {
    "allpets": {
      "command": "C:\\Users\\sathv\\Desktop\\allpets_mcp\\venv\\Scripts\\python.exe",
      "args":    ["C:\\Users\\sathv\\Desktop\\allpets_mcp\\server.py"]
    }
  }
}
  1. Restart Claude Desktop completely (quit and reopen).
  2. The tool icon appears in the chat input — click it to see the 4 AllPets tools.

---

Phase 1 tools

| Tool | What it does | |---|---| | get_current_week_dates | Returns this ISO week's Monday/Sunday | | get_current_month_dates | Returns the current calendar month and boundaries | | get_weekly_dashboard | Full KPI dashboard for a date range | | get_monthly_dashboard | Full KPI dashboard for a YYYY-MM calendar month | | ask_analytics | Freeform NL2SQL question | | generate_excel_report | Weekly dashboard as .xlsx | | generate_monthly_excel_report | Monthly dashboard as .xlsx |

---

Project structure

allpets_mcp/
├── server.py              ← Entry point (stdio MCP server)
├── config.py              ← DB engine + env loading (self-contained)
├── dashboard_queries.py   ← Pre-computed weekly KPI engine
├── nl2sql_agent.py        ← 5-step LangGraph NL2SQL pipeline
├── sql_dynamic_agent.py   ← SQL generation + retry (~1970 lines)
├── excel_export.py        ← openpyxl report generator
├── etc/secrets/
│   └── schema_all.txt     ← Full DB schema DDL (used by SQL agent)
├── adapters/
│   ├── dashboard.py       ← Wraps DashboardService.run_weekly()
│   ├── analytics.py       ← Wraps nl2sql_agent.run_agent()
│   └── excel.py           ← Wraps generate_excel() → base64
├── tools/
│   ├── dashboard.py       ← get_weekly_dashboard, get_current_week_dates
│   ├── analytics.py       ← ask_analytics
│   └── reports.py         ← generate_excel_report
├── .env                   ← All credentials (DB + OpenAI)
└── requirements.txt

---

Updating business logic

When dashboard_queries.py, nl2sql_agent.py, sql_dynamic_agent.py, or excel_export.py change in allpets_new_schema, copy the updated file here:

Copy-Item ..\allpets_new_schema\dashboard_queries.py .\dashboard_queries.py -Force
Copy-Item ..\allpets_new_schema\nl2sql_agent.py .\nl2sql_agent.py -Force
Copy-Item ..\allpets_new_schema\sql_dynamic_agent.py .\sql_dynamic_agent.py -Force
Copy-Item ..\allpets_new_schema\excel_export.py .\excel_export.py -Force
Copy-Item ..\allpets_new_schema\etc\secrets\schema_all.txt .\etc\secrets\schema_all.txt -Force

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Databases servers.