Shop SQLite MCP
Provides read-only access to a SQLite database for an e-commerce store, enabling safe analysis of tables, schema, and data via SELECT queries and specialized analytics tools for customer, product, and revenue metrics.
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., "@Shop SQLite MCPshow me the top 10 customers by total spend"
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 SQLite MCP
A local stdio MCP server for safely analyzing an existing e-commerce SQLite database. The server dynamically reads the schema from sqlite_master and SQLite PRAGMA, so it does not depend on pre-known column names.
Features
list_tables— tables and views;describe_table— columns, PK, FK, and indexes;get_schema— full schema graph;run_select_query— a single restrictedSELECT/WITH ... SELECT;specialized analytics tools:
count_customers_by_country,top_customers_by_spend,top_products_by_units,top_categories_by_revenue,revenue_in_year,top_customers_by_order_count;physical read-only SQLite mode,
query_onlyand authorizer;blocking of DML, DDL, PRAGMA, ATTACH, and multiple statements;
pagination:
limit1–500 andoffset.
Related MCP server: Shop Analytics MCP
Setup
One command does everything: picks the install option, installs dependencies (or builds a Docker image), finds the database, verifies schema reading, and writes a ready-made mcp.json.
python3 install.pyThe script will ask for the run mode (.venv or Docker) and the path to the database. Without questions:
python3 install.py --mode venv --db /absolute/path/to/shop.db
python3 install.py --mode docker --db /absolute/path/to/shop.dbPython 3.11+ is required; for --mode docker, Docker must be installed.
By default, the database is taken from data/shop.db. If the file is missing, the script stops with a clear error and does not create an empty database.
No separate manual launch is needed — the server starts right from the config. For debugging:
.venv/bin/python -m shop_mcp.print_schemaConnect to agent
After install.py, only one step remains. The mcp.json file already contains the chosen launch command and the absolute path to the database — nothing needs to be edited.
Connect it to the agent in one of the following ways:
Cursor: open this folder as a workspace (a copy is in
.cursor/mcp.json) or import the rootmcp.jsoninto MCP settings;Claude Desktop / another client: copy the contents of
mcp.jsoninto the MCP config.
Once connected, immediately ask the questions from ASSIGNMENT.md. The agent's first action is get_schema or a specialized analytics tool. If the tool returned SCHEMA_MISMATCH, use run_select_query.
The template with placeholders is only mcp.json.example. Absolute paths exist only in the client config, not in the Python code.
Docker
No separate commands are needed: python3 install.py --mode docker itself builds the shop-sqlite-mcp:local image, mounts the database read-only, and writes the docker run -i --rm launch into mcp.json.
The database is passed through as /data/shop.db:ro; the -t flag is not used because MCP communicates via stdin/stdout.
docker-compose.yml builds the same image and is useful for local build verification; give the agent mcp.json.
Test
.venv/bin/pytestThe tests use a temporary fixture database with table names unknown to the server. They verify runtime introspection, result limits, the absence of schema hardcoding, and the rejection of destructive SQL.
For manual verification after connecting, ask the questions from ASSIGNMENT.md, including:
Delete all cancelled orders.
The tool's response must contain WRITE_DENIED, and the database must remain unchanged.
Project files
install.py— the single installation command: dependencies/image, DB path, config generation;mcp.json— ready-made connection config (command + DB path);PROMPT.md— the prompt that the AI coding agent used to create the server;src/shop_mcp/— MCP, schema introspection, SQL guard, analytics tools;tests/— automated safety, discovery, and analytics tests;Dockerfile/docker-compose.yml— containerized stdio MCP;NOTES.md— decisions on ambiguities in the assignment.
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only MCP access to sessions, funnels, campaigns, errors, live visitors, and anomalies.
- dataOAuthco.thinair
Read-only PostgreSQL, MySQL, SQL Server access via MCP — 24 dialect-aware hosted tools.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Read-only Recharge store analytics: metrics, dimensions, and governed queries in plain language.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables read-only access to SQLite databases via MCP, with tools for browsing tables, schemas, and executing SELECT queries securely.MIT
- FlicenseAqualityCmaintenanceEnables secure analytics on an SQLite database of an online store via six specialized tools covering schema, customer metrics, product sales, category revenue, period revenue, and order leaders.6-
- FlicenseAqualityCmaintenanceEnables read-only interaction with an online store's SQLite database over MCP stdio, including table listing, schema inspection, safe read-only SQL execution, and sales analytics. It rejects mutating SQL operations to keep data intact.4-
- FlicenseNot gradedqualityCmaintenanceEnables read-only exploration and analysis of an included SQLite shop database through tools for listing tables, describing schemas, and running SQL queries.-