shop-db
Provides read-only access to a SQLite database, enabling listing tables, inspecting table schemas, and executing safe read-only SQL queries with aggregations, joins, pagination, and row limits.
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-dbShow me the total revenue by product category"
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.
MCP server for an online store database (read-only)
MCP server in Python (mcp SDK) that gives an AI agent safe access
to the SQLite database shop.db. Works over stdio, connects to the
database itself, does not modify data.
Features
list_tables— list of tables and row counts.describe_table— table schema: columns, types, keys, foreign keys.query_database— read-only SQL (SELECT/WITH/VALUES/EXPLAIN) with aggregations, JOINs, pagination, and a row limit.
Safety (read-only)
Triple protection against database modification:
The connection is opened in
mode=ro— SQLite itself physically blocks writes.Additionally,
PRAGMA query_only = ONis enabled.Query validation:
INSERT/UPDATE/DELETE/DROP/ALTER/CREATEand other destructive operations are forbidden, and multiple statements per single call are forbidden.
The query "Delete all cancelled orders" will be rejected with a clear error, and the database remains unchanged.
Related MCP server: sqlite-mcp
Installation
cd /path/to/project
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtConfiguration
By default, the server looks for shop.db next to mcp_server.py. If the
database is in another location, set the path via an environment variable:
export SHOP_DB_PATH=/absolute/path/to/shop.dbRunning
python mcp_server.pyThe server communicates over stdio, so it is not launched manually, but as a child process of the agent (see below). You can verify that everything is up and running like this:
printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"probe","version":"0"}}}\n' | python mcp_server.pyConnecting to the AI agent (Claude Code)
Add the server to the MCP configuration. Example for ~/.claude.json or the
project's .mcp.json (see mcp_config.json.example):
{
"mcpServers": {
"shop-db": {
"command": "/path/to/project/.venv/bin/python",
"args": ["/path/to/project/mcp_server.py"],
"env": {
"SHOP_DB_PATH": "/path/to/project/shop.db"
}
}
}
}In Claude Code: /mcp → confirm that the shop-db server is connected. After
that, the agent can answer analytical questions about the store data.
Tests
source .venv/bin/activate
python -m pytest tests/ -qStructure
mcp_server.py # сам MCP-сервер
shop.db # база данных (read-only)
requirements.txt # зависимости
mcp_config.json.example # пример подключения к агенту
tests/test_server.py # автотестыThis server cannot be deployed
Maintenance
Related MCP Connectors
Draxlr's remote MCP server connects AI assistants to your SQL databases and dashboards. Explore schemas, run read-only queries, manage saved queries and dashboards, and export results, all with row-level security so each user sees only their own data.
Read-only MCP server: let AI agents read your ORANO saved-video library, tasks, and memory.
- dataOAuthco.thinair
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Read-only MCP server for The Quiet Protocol's engines, benchmarks, proof, and business data.
Related MCP Servers
- MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that enables AI agents to interact with SQLite databases by querying schemas, executing SQL, and inspecting table metadata. It supports safe database access through configurable read-only modes, query timeouts, and dry-run execution plans.MIT
- AlicenseNot gradedqualityDmaintenanceA read-only MCP server that enables LLMs to safely explore and query any SQLite database via natural language. It exposes tools for listing tables, describing schemas, and executing SELECT/WITH queries with built-in safety guards like write prevention and row limits.MIT
- AlicenseNot gradedqualityCmaintenanceRead-only MCP server for SQLite databases, enabling AI assistants to safely query and inspect database schemas without write access.MIT