KiezelPay Sales MCP
Click on "Deploy 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., "@KiezelPay Sales MCP What's my sales summary for today?"
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.
KiezelPay Sales MCP
An MCP client + server that lets you talk to your KiezelPay merchant sales data in natural language. Claude picks which reporting call to make, your products become attachable context, and common analyses are one-word commands.
The read-only KiezelPay merchant reporting API is wrapped as:
Tools (Claude calls these autonomously)
get_sales_summary- balance, totals, active trials, next/previous payoutget_sales_today/get_sales_yesterday- your sales vs. the best merchant + your rank (optionalplatform)get_purchase_history- recent individual purchases (limit,platform,sort)list_products- distinct product names, derived from historyget_product_sales- aggregated stats for one product
Resources - your products (derived by aggregating the
productfield across purchase history)kpay://products- list of product nameskpay://products/{product}- one product's aggregate (count, revenue*, countries, platforms, first/last sale)
Prompts - one-word analyses
/analyze-product <product>- performance deep-dive/trend-product <product>- trajectory over the available history window/predict-product <product>- near-term estimate (a heuristic extrapolation, not a statistical forecast)/sales-report- overall executive summary
* revenue is included only if the history records carry a price field.
Prerequisites
Python 3.10+
An Anthropic API key (for the chat host)
A KiezelPay merchant API key - get it at https://kiezelpay.com/account/api
The public test key
0123456789abcdef0123456789abcdefworks for summary/today/yesterday, but not/history, so products and the product prompts need a real key.
Related MCP server: Amazon Ads Manager MCP Server
Setup
1. Configure environment variables
Copy .env.example to .env and fill in the values:
ANTHROPIC_API_KEY="" # your Anthropic API key
CLAUDE_MODEL="claude-sonnet-5"
KIEZELPAY_API_KEY="" # your KiezelPay merchant key
USE_UV="1"The KiezelPay key is used only by the MCP server, is read from the environment, and is
never returned to the model or printed. .env is gitignored.
2. Install dependencies
Using uv (recommended):
uv venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
uv pip install -e .Or without uv:
python -m venv .venv
source .venv/bin/activate
pip install anthropic python-dotenv prompt-toolkit "mcp[cli]>=1.8.0" "httpx>=0.27.0"3. Run the chat host
uv run main.py # or: python main.pyUsage
Chat naturally - Claude will call the right tools:
> How did sales go today, and what's my current balance?
> Which products sold the most in the last 200 purchases?Attach a product as context with @ (Tab to autocomplete):
> How is @RadPro doing lately?Run an analysis prompt with / (Tab to autocomplete):
> /analyze-product RadPro
> /trend-product RadPro
> /predict-product RadPro
> /sales-reportUse from Claude Desktop / Claude Code
The server speaks stdio, so any MCP host can run it. Example Claude Desktop entry:
{
"mcpServers": {
"kiezelpay": {
"command": "uv",
"args": ["run", "mcp_server.py"],
"cwd": "/absolute/path/to/kiezelpay-mcp",
"env": { "KIEZELPAY_API_KEY": "your_key_here" }
}
}
}Project layout
File | Role |
| KiezelPay Sales MCP server (tools, product resources, prompts) |
| Thin async HTTP client for the KiezelPay merchant API + product aggregation |
| Generic MCP client + a small test harness ( |
| CLI chat host entry point |
| Chat host internals (Claude wrapper, chat loop, tool manager, CLI I/O) |
Notes & caveats
The API is read-only; this MCP never mutates anything.
Products are derived from history, so the catalog only reflects the fetched window (
CATALOG_LIMITinmcp_server.py, default 200). Raise it for a longer catalog./predict-productis a reasoning-based estimate over past patterns, not a real forecast.If
today/yesterdayday boundaries look off, adjust the timezoneoffsetinkpay_api.py(tz_offset_minutes()).
Available Tools
6 toolsget_product_salesA
Get aggregated sales for a single product derived from purchase history: purchase count, first/last sale, and breakdowns by country, platform, and trigger. Includes revenue if the history records carry a price.
Inputs: product (required), limit.
get_purchase_historyA
Get recent individual purchases. Each record includes paidDate, product, productId, country, platform, device, gross totalAmount, net amountToPayOut, status, and isRefunded. Use for detailed, purchase-level questions.
Inputs: sort, limit, platform.
get_sales_summaryA
Get the KiezelPay account sales summary: current balance, total purchases, total income, active trials, total paid out, and next/previous payout details.
Inputs: no named parameters.
get_sales_todayA
Get today's sales: your number of purchases, revenue (amount), and your rank among KiezelPay merchants for the day. Uses the local timezone for the day boundary.
Inputs: platform.
get_sales_yesterdayA
Get yesterday's sales: your number of purchases, revenue (amount), and your rank among KiezelPay merchants for the day. Uses the local timezone for the day boundary.
Inputs: platform.
list_productsA
List the distinct product names sold recently, derived from purchase history. Use this to discover which products exist before analyzing one.
Inputs: limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct aspect of sales data: products, account summary, daily stats, raw purchases, and product-level aggregates. The only close pair, get_sales_today and get_sales_yesterday, are clearly separated by the day in their names and descriptions.
All tools follow a consistent verb_noun pattern (list_products, get_sales_summary, get_sales_today, get_sales_yesterday, get_purchase_history, get_product_sales). The mix of 'list' and 'get' is standard and predictable, with no camelCase or chaotic variations.
Six tools is well-scoped for a sales-focused MCP server. Each tool covers a distinct need without redundancy, making the set feel intentional and manageable.
The tool surface covers the core sales questions: summary, daily performance, raw history, product listing, and per-product breakdowns. Minor gaps exist, such as no arbitrary date-range sales tool or explicit trial/refund analytics, but these can be worked around via purchase history and product sales.
Maintenance
Related MCP Connectors
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
KVK Handelsregister AI Connect: hosted MCP server for the Dutch business register.
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
Related MCP Servers
- FlicenseNot gradedqualityFmaintenanceA production-ready MCP server that transforms natural language into safe, executable SQL queries with multi-database support and intelligent schema analysis.1-
- AlicenseNot gradedqualityDmaintenanceMCP server for managing and analyzing Amazon Advertising data through natural language queries.14 npm6MIT
- AlicenseNot gradedqualityDmaintenanceA read-only MCP server that enables restaurant staff to query Veloce POS data using natural language, supporting sales summaries, payment breakdowns, and weekly reports.MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that exposes a LangChain agent with short-term memory to analyze real e-commerce data through predefined SQL tools, enabling natural language queries on sales, customers, and logistics.-