Shop Analytics MCP
Provides read-only analytics tools for a SQLite database of an online shop, including schema inspection, customer metrics, product sales, category revenue, revenue by period, and order leader queries.
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., "@Shop Analytics MCPWhat are the top 5 best-selling products?"
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.
Shop Analytics MCP
MCP server in TypeScript for secure analytics of an online store's SQLite database. Works only via stdio and provides six specialized tools; arbitrary SQL is not accepted.
Requirements
Node.js 24.10+;
npm;
sqlite3CLI only for re-applying the migration.
Related MCP server: mcp-analytics-server
Installation and Running
npm ci
npm run build
SHOP_DB_PATH=./shop.db npm startSHOP_DB_PATH takes precedence. If the variable is not set, the server looks for shop.db in the current working directory. The path to the database is not hardcoded in the source code.
Data
The repository contains a ready-migrated shop.db. It contains customer countries and data for 2025. Monetary values are interpreted as EUR and are not converted.
To apply the migration to the original database once:
npm run migrateThe original schema is in database/schema.sql, and the deterministic migration is in database/001-add-analytics-data.sql.
Connecting to a Client
Ready-made configuration templates are in config/:
claude-code.mcp.json;codex.mcp.json;cursor.mcp.json.
Replace /absolute/path/to/mcp-server in the chosen template with the path to this project. All configurations run dist/src/index.js via stdio and pass the path to shop.db through SHOP_DB_PATH.
Tools
Tool | Purpose |
| Tables, columns, keys, and relationships. |
| Number of customers in a country or the leading country. |
| Product ranking by units sold and revenue. |
| Category ranking by revenue. |
| Revenue for the UTC period |
| Customer with the highest spending or number of orders. |
Financial and product metrics, as well as order counts, exclude cancelled. Amounts are returned in fields with the Eur suffix. Rankings accept a limit from 1 to 100; periods use YYYY-MM-DD dates.
Example Usage
Below shows how an MCP client calls get_database_schema to describe tables, and then get_customer_metrics to count customers from Germany.

Security
SQLite is opened with
readOnly: trueandPRAGMA query_only = ON.The SQLite authorizer forbids writes, DDL,
ATTACH,DETACH, and transactions.All values are bound as SQL parameters.
Tools do not accept SQL, so the agent cannot pass a destructive statement.
Validation errors do not reveal SQL, absolute paths, or stack traces.
Tests
npm testThe tests cover reference answers to eight acceptance questions, SQL injection in the country parameter, the prohibition of DELETE, the immutability of the SHA-256 of a temporary copy of the DB, and MCP interaction via stdio.
Acceptance Questions
Show me all available tables and explain what information each table contains.
How many customers are from Germany?
Which country has the most customers?
Who is the customer who spent the most money?
What are the top 5 best-selling products?
What are the top 3 product categories by revenue?
How much revenue did we generate in 2025?
Which customer placed the most orders?
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables AI to query a business database for customers, orders, and revenue using natural language through safe, well-defined tools.
- AlicenseNot gradedqualityBmaintenanceEnables LLMs to interact with a SQLite e-commerce database via safe, typed MCP tools with read-only guards and auth-gated mutations, plus a Claude agent for answering business questions.1MIT
- AlicenseAqualityCmaintenanceEnables safe exploration and analysis of SQLite databases through guarded read-only queries, schema inspection, aggregations, and CSV imports.5MIT
- FlicenseNot gradedqualityCmaintenanceProvides read-only tools for querying a synthetic e-commerce dataset, including product categories, products, sales data, customer history, and order details.
Related MCP Connectors
Explore, query, and inspect SQLite databases with ease. List tables, preview results, and view det…
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Privacy-first web analytics. Query pageviews, referrers, trends, and AI insights.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/Myrhoiazov/mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server