shop
読み取り専用 MCP ストアサーバー
Python MCP サーバー(stdio 経由)で、既存のオンラインストア SQLite データベース(data/shop.db)を読み取ります。ファイルは読み取り専用で開かれ、変更を伴う SQL は拒否され、実行されません。
インストール
Python 3.11 以上:
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"Related MCP server: sqlite-mcp-local
起動
プロジェクトのルートから(データベースへのパスはデフォルトで ./data/shop.db):
python -m shop_mcp
# или
shop-mcp別のデータベースパス:
SHOP_DB_PATH=~/my/test-mcp-db/data/shop.db python -m shop_mcpこのプロセスは MCP 経由で stdin/stdout を介して通信します。MCP クライアントが接続されるまで、このターミナルにコマンドを入力しないでください。
Cursor での MCP 設定
mcpServers エントリを追加します(Cursor Settings → MCP、またはプロジェクト内の .cursor/mcp.json)。トランスポートは stdio です。
例の中のパス ~/my/test-mcp-db は、このリポジトリを指しています。サーバーは SHOP_DB_PATH を自身で展開します(~ → ホームディレクトリ)。Cursor が command / cwd で ~ を展開しない場合は、そこに /Users/<вы>/my/test-mcp-db/... を指定してください。
ローカル (venv)
{
"mcpServers": {
"shop": {
"command": "~/my/test-mcp-db/.venv/bin/python",
"args": ["-m", "shop_mcp"],
"cwd": "~/my/test-mcp-db",
"env": {
"SHOP_DB_PATH": "~/my/test-mcp-db/data/shop.db"
}
}
}
}pip install -e . の後、コンソールスクリプトの方が便利な場合:
{
"mcpServers": {
"shop": {
"command": "~/my/test-mcp-db/.venv/bin/shop-mcp",
"cwd": "~/my/test-mcp-db",
"env": {
"SHOP_DB_PATH": "~/my/test-mcp-db/data/shop.db"
}
}
}
}Docker
イメージを一度ビルドします:
docker build -t shop-mcp .{
"mcpServers": {
"shop": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"~/my/test-mcp-db/data/shop.db:/data/shop.db:ro",
"-e",
"SHOP_DB_PATH=/data/shop.db",
"shop-mcp"
]
}
}
}-i フラグは stdin io を接続したままにするために必須です。shop.db のみをマウントしてください。コンテナがホスト上のファイルを上書きしないようにしてください。
ツール
Tool | 説明 |
| ユーザーテーブルとその役割の簡単な説明( |
| 実際のカラム、型、PK/FK |
| 単一の |
| 手動 SQL なしで年間ランキングと売上を取得 |
合計、数量、売上は order_items.quantity * order_items.unit_price として計算され、ステータスが cancelled の注文は除外されます。暦年は strftime('%Y',orders.order_date) から取得されます。
セキュリティ
SQLite URI
file:<abs>?mode=roコメントは除去され、クエリチェーン(
SELECT 1; DELETE ...)は拒否されますINSERT / UPDATE / DELETE / DROP / ALTER / CREATE / ATTACH / PRAGMA / … → 明示的な「許可されていません」エラー
SQLite の構文エラーと不明なカラムは、構造化して返されます。プロセスは終了しません
評価に関する注記
customersにはcountryカラムがありません。 これはdescribe_tableで確認できます。地理情報を勝手に推定してはいけません。SELECT country FROM customersは SQLite エラーを返します。現在のダンプの注文日は 2026 年です。 2025 年の売上は 0 になることがあります。これはフィルターの故障ではなく、正しい結果です。
テスト
pytestテストは、data/shop.db を一時ファイルにコピーし、拒否された書き込み後もコピーのハッシュが変更されないことを検証します。
実行済みクエリの例

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
- AlicenseNot gradedqualityCmaintenanceA 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
- FlicenseNot gradedqualityBmaintenanceEnables read-only querying of a local SQLite database via MCP, with tools to list tables, retrieve schema, and execute SELECT/WITH/EXPLAIN queries.
- FlicenseNot gradedqualityCmaintenanceProvides read-only access to a sales database, letting LLMs answer analytics questions like revenue by region or top customers via MCP tools.
- FlicenseNot gradedqualityCmaintenanceEnables natural-language sales queries against a SQLite database, generating and executing read-only SQL through a secure MCP server with table listing, schema description, and query execution.
Related MCP Connectors
Read-only MCP server for ClassQuill, a tutoring-business-management platform.
Read-only MCP access to sessions, funnels, campaigns, errors, live visitors, and anomalies.
Explore, query, and inspect SQLite databases with ease. List tables, preview results, and view det…
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/DrZeD-13/test-mcp-db'
If you have feedback or need assistance with the MCP directory API, please join our Discord server