simple-db-mcp-server

RaviMehta90/simple-db-mcp-server

3.2

If you are the rightful owner of simple-db-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This MCP Server connects to a local DB and performs basic CRUD operations.

Simple DB MCP Server

A lightweight MCP (Model Context Protocol) server built in Python for performing CRUD operations on a local SQLite database. Designed for fast iteration, Claude Desktop integration, and AI agent control via Ollama using the tool-calling-capable qwen:14b model.


๐Ÿš€ Features

  • MCP-compliant Python server
  • SQLite database (mcp_ecommerce.db)
  • Compatible with Claude Desktop via uv run mcp install
  • Client script for testing local interactions
  • Ollama-compatible with tool-calling enabled via qwen:14b
  • Managed cleanly with uv and pyproject.toml โ€” no pip required

๐Ÿ“ Project Structure

simple-db-mcp-server/
โ”œโ”€โ”€ db.py             # SQLite utility functions
โ”œโ”€โ”€ server.py         # MCP server logic
โ”œโ”€โ”€ client.py         # Example MCP client
โ”œโ”€โ”€ mcp_ecommerce.db  # Sample database
โ”œโ”€โ”€ pyproject.toml    # Project & dependency config
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ LICENSE
โ””โ”€โ”€ README.md

โš™๏ธ Requirements


๐Ÿง  Setting Up Ollama & Qwen

Make sure you have Ollama installed and running before starting the server or interacting via an agent.

1. Install Ollama

curl -fsSL https://ollama.com/install.sh | sh

Or download it from: https://ollama.com/download

2. Pull the Tool-Calling Model: qwen:14b

ollama pull qwen:14b

qwen:14b is a powerful open-source LLM that supports function/tool calling, required for AI agents to invoke this MCP server.


โš™๏ธ Project Setup with uv

1. Install uv

curl -Ls https://astral.sh/uv/install.sh | bash

2. Clone and Navigate

git clone https://github.com/RaviMehta90/simple-db-mcp-server.git
cd simple-db-mcp-server

3. Create and Activate a Virtual Environment

uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

4. Install Dependencies

uv sync

๐Ÿ–ฅ๏ธ Register the Server with Claude Desktop

uv run mcp install server.py

โœ… Output Example

[07/07/25 21:35:38] INFO     Added server 'ecommerce-sqlite' to Claude config
                    INFO     Successfully installed ecommerce-sqlite in Claude app

๐Ÿงช Running the Client

To interact with the MCP server via command-line client:

uv run client.py

๐Ÿ—ƒ๏ธ Sample Database

The SQLite file mcp_ecommerce.db contains prepopulated tables (e.g. users, products). You can explore it with any SQLite viewer or use:

sqlite3 mcp_ecommerce.db

๐Ÿ“œ License

This project is licensed under the .


๐Ÿ™‹ Support

Questions, ideas, or contributions welcome!
Contact @RaviMehta90 or open an issue.