Pet Grooming Analytics MCP
Click on "Install 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., "@Pet Grooming Analytics MCPshow me the business overview"
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.
Pet Grooming Analytics MCP
A read-only Model Context Protocol server that connects Claude Desktop (or any MCP client) to a Supabase / PostgreSQL pet-grooming database. It exposes secure, tool-based analytics over customers, pets, appointments, services, and payments — Claude calls clearly-defined tools instead of generating unrestricted SQL.
The server runs locally over STDIO and is launched directly by Claude Desktop.
Why read-only tools instead of raw SQL
No arbitrary SQL from the model. Every tool issues a fixed, parameterised query. The client only supplies typed arguments (dates, names, limits).
Read-only at the connection layer. Pooled connections are pinned to
READ ONLYtransactions withdefault_transaction_read_only=onand a boundedstatement_timeout.Bounded results. Row limits are clamped server-side (
MAX_ROW_LIMIT).Defence in depth. You are encouraged to point
DATABASE_URLat a dedicated read-only database role (seesql/schema.sql).
Tools
Overview
Tool | Description |
| Headline counts (users, pets, appointments, services) and total revenue. |
| Active/inactive customers, users created in a date range, avg pets per customer. |
| Pet counts by species, breed, and size category. |
Appointments
Tool | Description |
| Aggregate metrics with optional |
| Count of appointments grouped by status. |
| Upcoming non-cancelled appointments with pet, owner, and services. |
Search & customers
Tool | Description |
| Find customers by partial |
| Find pets by |
| Full customer profile: pets, appointment count, lifetime spend. |
| Rank customers by lifetime spend or appointment count. |
| A pet's appointment history including booked services. |
Services
Tool | Description |
| Catalogue with pricing, duration, and lifetime booking counts. |
| Most-booked services over the last N days. |
| Realised revenue attributed to each service. |
Payments
Tool | Description |
| Totals, realised revenue, breakdowns by status and method. |
| Realised-revenue time series bucketed by day/week/month/year. |
Revenue definition: "realised revenue" sums payments whose status is one of
completed,paid,succeeded,captured,settled(seeconfig.py). Adjust that list to match yourpayment_statusenum.
Setup
1. Install
# with uv (recommended)
uv venv
uv pip install -e ".[dev]"
# or with pip
python -m venv .venv
.venv\Scripts\activate # Windows
# source .venv/bin/activate # macOS/Linux
pip install -e ".[dev]"2. Configure
cp .env.example .envSet DATABASE_URL to your Supabase Postgres connection string
(Supabase → Project Settings → Database → Connection string → URI). The real
.env is git-ignored.
If you don't have a database yet, run sql/schema.sql in the
Supabase SQL editor to create the schema.
How to run
An MCP server isn't a web app — there's no URL to open. It talks JSON-RPC over stdin/stdout and is normally launched by an MCP client (Claude Desktop). There are three ways to run it, depending on what you want to do.
A. Through Claude Desktop (the real use case)
Configure it once (see Connect to Claude Desktop below), then fully quit and restart Claude Desktop. Claude launches the server for you — you don't run anything manually. Check Settings → Developer; the server should show as connected.
B. Manually in a terminal (to see it start / debug)
uv run mcp_server.pyThis is the exact command Claude Desktop uses. It reads your .env, connects to
Supabase, then waits silently for input on stdin — that is correct behaviour
for an MCP server. If nothing errors, it's working. Press Ctrl+C to stop.
On Windows, launch with
uv run(or the project's venv) rather than a barepython mcp_server.py, so the server's async database driver uses a compatible event loop.
C. Interactive testing with the MCP Inspector (recommended)
A browser UI to click each tool and see live results from your database:
npx @modelcontextprotocol/inspector uv run mcp_server.pyRun the tests (no database required)
uv run pytestThe tests use a FakeDatabase that returns canned rows, so they verify each
tool's output shape and JSON serialization without a live Postgres instance.
Connect to Claude Desktop
Edit your Claude Desktop config
(%APPDATA%\Claude\claude_desktop_config.json on Windows,
~/Library/Application Support/Claude/claude_desktop_config.json on macOS) and
add the server. Point --directory at this project folder:
{
"mcpServers": {
"pet-grooming-analytics": {
"command": "uv",
"args": [
"--directory",
"C:\\dev\\pet_grooming_mcp\\pet_grooming_mcp",
"run",
"mcp_server.py"
],
"env": {
"DATABASE_URL": "postgresql://postgres.your-ref:your-password@aws-0-region.pooler.supabase.com:5432/postgres?sslmode=require"
}
}
}
}Notes:
Using
uv --directory ... run mcp_server.pyavoids PATH problems — you don't need the project's virtual environment to be active or onPATH.If your password contains a
%, percent-encode it as%25in the URL (other reserved characters likewise, e.g.@→%40).The
DATABASE_URLinenvcan be omitted if it is already set in.env.
Then fully quit and restart Claude Desktop and try:
"Give me a business overview."
"Find all dogs owned by customers named Johnson."
"Show Bella's appointment history."
"Which services have been used most during the last 90 days?"
"What was our revenue by month this year?"
Web dashboard (optional)
Alongside the MCP server, this repo ships a browser dashboard so you can see
the analytics: a FastAPI backend (src/pet_grooming_mcp/web/) that reuses the
exact same read-only Database and query tools, and a Next.js frontend
(../frontend/). Nothing about the security model changes — the HTTP layer
inherits the READ ONLY connection pool and bounded statement_timeout, and
the ad-hoc SQL paths reject anything that isn't a single SELECT.
Tabs
Statistics Snapshot — headline KPIs, revenue trend, appointments by status, pets by species, top customers. Export the whole view as JPEG or the metrics as CSV.
Data Quality Snapshot — completeness/integrity checks with a 0-100 health score. Export as JPEG or CSV.
Analyze (Prompt) — ask a question in plain English; Claude (
claude-opus-4-8) writes a read-only SQL query, the backend runs it, and the result is charted alongside the generated SQL.SQL Query Maker — write your own
SELECT, run it, browse the schema, chart the result, and export to CSV.
1. Backend
uv pip install -e ".[web]" # Think of this like a npm install for a json package you run once to activate the dependencies --> adds fastapi, uvicorn, anthropic
# Set ANTHROPIC_API_KEY in .env to enable the "Analyze (Prompt)" tab.
uv run pet-grooming-web # serves http://127.0.0.1:8000Windows: launch via
pet-grooming-web(orpython -m pet_grooming_mcp.web.app), not the bareuvicornCLI — the async Postgres driver needs the selector event loop, which the entry point sets up. Host/port/CORS are configurable viaWEB_HOST,WEB_PORT,WEB_CORS_ORIGINS.
2. Frontend
cd ../frontend
npm install
npm run dev # serves http://localhost:3000Point the UI at the backend with NEXT_PUBLIC_API_BASE (defaults to
http://127.0.0.1:8000); see frontend/.env.local.example.
Project layout
mcp_server.py # entry point: `uv run mcp_server.py`
src/pet_grooming_mcp/
server.py # FastMCP server: registers tools, manages the pool lifespan
config.py # environment configuration
database.py # read-only async connection pool
tools/ # query logic (overview, users, pets, appointments, services, payments)
models/ # JSON serialization helpers
sql/schema.sql # reference schema + read-only role
tests/ # offline testsLicense
MIT — see LICENSE.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Bert305/pet_grooming_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server