RaviMehta90/simple-db-mcp-server
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
andpyproject.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
- Python 3.11+
uv
Ollama
(local AI inference engine)qwen:14b
model (supports tool calling)- Claude Desktop (optional)
๐ง 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.