allpets_mcp

allpets_mcp

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

Category
Visit Server

README

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_weekly_dashboard Full KPI dashboard for a date range
ask_analytics Freeform NL2SQL question
generate_excel_report Weekly dashboard as .xlsx (base64)

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

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
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

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