Skip to main content
Glama

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:

  1. The connection is opened in mode=ro — SQLite itself physically blocks writes.

  2. Additionally, PRAGMA query_only = ON is enabled.

  3. Query validation: INSERT/UPDATE/DELETE/DROP/ALTER/CREATE and 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.txt

Configuration

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.db

Running

python mcp_server.py

The 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.py

Connecting 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/ -q

Structure

mcp_server.py            # сам MCP-сервер
shop.db                  # база данных (read-only)
requirements.txt         # зависимости
mcp_config.json.example  # пример подключения к агенту
tests/test_server.py     # автотесты
F
license - not found
Not graded
quality - not tested
C
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
    Not graded
    quality
    D
    maintenance
    A lightweight MCP server that provides read-only access to SQLite databases, allowing users to execute SELECT queries, list tables, and describe table schemas.
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    An 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
  • A
    license
    Not graded
    quality
    C
    maintenance
    A 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

View all related MCP servers

Related MCP Connectors

  • Read-only MCP server for ClassQuill, a tutoring-business-management platform.

  • Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.

  • Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only

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/alser15/mcp'

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