Skip to main content
Glama
bulychauPI

shop-db MCP Server

by bulychauPI

shop-db MCP Server

AIエージェントにeコマースSQLiteデータベース(customersordersorder_itemsproducts)への分析アクセスを提供する読み取り専用のModel Context Protocolサーバーです。データを変更する機能は一切ありません。

**Node.js v24.19+**向けに構築されており、ネイティブのnode:sqlitenode:testを使用してTypeScriptソースファイルを直接実行します(ビルドステップなし)。

セットアップ

npm install

リポジトリにはプロジェクトルートにデータが入った./shop.dbがすでに含まれているため、シード手順は不要です。npm startnpm testのいずれもこのファイルに書き込みません。サーバーは読み取り専用で開き、テストスイートはtests/fixtures/seed.sqlからtests/配下に独自の使い捨てデータベースを構築します。

Related MCP server: shop-mcp

サーバーの実行

npm start

サーバーはstdio(StdioServerTransport)を介して通信します。これはMCPクライアント(Claude Code、Claude Desktopなど)によって起動されることを想定しており、対話的に実行するものではありません。

テスト

npm test

tests/に対してnode --testを実行し、SQL検証のエッジケース(変更キーワード、コメント回避、複数ステートメントインジェクション、CTE、EXPLAIN)と、tests/fixtures/seed.sqlから構築された分離されたテストデータベースに対する3つのMCPツールのエンドツーエンドテストをカバーします。コミット済みの./shop.dbはテストスイートによって読み書きされることはありません。

データベースパスの設定

デフォルトでは、サーバーは./shop.db(起動時の作業ディレクトリからの相対パス)を読み取ります。DB_PATH環境変数で上書きできます:

DB_PATH=/absolute/path/to/shop.db npm start

ツール

  • list_tables — 4つのテーブルをそれぞれの簡単な説明付きで一覧表示します。

  • describe_table — 1つのテーブル(tableName)またはすべてのテーブル(省略時)について、列定義、型、主キー、最大3件のサンプル行を表示します。

  • read_query — 読み取り専用のSELECT/WITH/EXPLAIN/PRAGMAクエリ(query、必須)を実行し、最大limit行(オプション、デフォルト100、最大1000)を返します。変更の試み(INSERTUPDATEDELETEDROPなど)は、SQLコメントで偽装されたりCTEにラップされたりしていても、明確なエラーで拒否されます。

AIエージェント設定

{
  "mcpServers": {
    "shop-db": {
      "command": "node",
      "args": ["/absolute/path/to/src/index.ts"],
      "env": {
        "DB_PATH": "/absolute/path/to/shop.db"
      }
    }
  }
}

プロジェクトドキュメント

  • AGENTS.md — このリポジトリで作業するAIコーディングエージェント向けの指示(シンボリックリンク経由でCLAUDE.mdとしても読み込まれます)。

  • CONTEXT.md — ドメインモデルと安全性アーキテクチャ。

Install Server
F
license - not found
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    A
    quality
    B
    maintenance
    Enables AI agents to safely interact with a SQLite shop database through schema discovery, read-only SQL queries, and pre-built analytics reports like top customers, top products, and revenue summaries.
    6
    92
    MIT
  • F
    license
    A
    quality
    C
    maintenance
    Enables AI agents to safely explore and query a SQLite database in read-only mode, allowing them to inspect schema and run analytical SQL queries without risking data modification.
    3
  • F
    license
    A
    quality
    C
    maintenance
    Enables AI agents to answer analytical questions about an online store's SQLite database through specialized read-only tools, without any risk of modifying the underlying data.
    8
  • F
    license
    A
    quality
    C
    maintenance
    Enables AI agents to safely inspect and query an SQLite e-commerce database with tools for listing tables, describing schemas, and running read-only SQL queries while blocking destructive operations.
    4

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

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/bulychauPI/shop-db-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server