home / mcp / mcp llamaindex sqlite bridge mcp server
MCP (Model Context Protocol) server with SQLite integration and LlamaIndex client using Ollama
Configuration
View docs{
"mcpServers": {
"elisha1994-mcp-llama-sqlite-bridge": {
"command": "python",
"args": [
"server.py",
"--server_type=sse"
]
}
}
}You can run MCP servers that expose database operations as tools and interact with them through LlamaIndex-based clients. This setup supports a simple SQLite demo and a full-feature HR management system, with async tooling and a natural language interface to query and modify data. Use the simple demo for quick experiments and the HR system for in-depth employee management, analytics, and auditing.
Connect to a running MCP server from the corresponding client to start an interactive session where you can issue natural language queries. You can explore available tools, then execute operations like adding records, querying data, updating employees, or generating dashboards. For the HR system, always include an employee email when adding new employees to ensure the operation succeeds.
Follow these steps to set up either the simple demo or the HR management system.
# Prerequisites
- Python 3.8+
- Ollama installed and running
- llama3.2 model (or another model that supports tool calling)
# 1) Clone the project
git clone https://github.com/ELISHA1994/mcp-llama-sqlite-bridge.git
cd mcp-llama-sqlite-bridge
# 2) Create a virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# 3) Install dependencies
pip install -r requirements.txt
# 4) Pull the required Ollama model
ollama pull llama3.2Run the simple SQLite demo server, then connect with the client to interact with the data.
python server.py --server_type=ssepython client.pyLaunch the HR-focused MCP server and then use the HR client to issue natural language queries, manage employees, leaves, compensation, and analytics.
python hr_server.py --server_type=ssepython hr_client.pyFor the simple demo, you can add and list people in the database. For the HR system, remember to include emails when adding employees, e.g. Add Sarah Johnson ([email protected]) to Engineering as Senior Developer with $105,000 salary.
If you encounter module or model issues, ensure dependencies are installed and you are using a model that supports function calling. Verify the MCP server is running before starting the client. If an employee addition fails due to missing email, re-run the command with the email included and check for the error message indicating the missing field.
The system exposes a set of tools for interacting with the databases. Use the simple demo tools to add or read data, and employ the HR tools to manage employees, leaves, salaries, dashboards, and more. When crafting natural language prompts, prefer explicit emails for employee creation and leverage the supported seniority, departments, and salary fields for accurate results.
Add records to the simple demo database using SQL INSERT statements.
Query records from the simple demo database using SQL SELECT statements.
Add a new employee to the HR management system; requires an email address.
Check leave balance for a given employee by name.
Update the salary for a specific employee by name.
Submit a leave request for an employee by name.
Retrieve all active employees from the HR system.
Search for employees within a specific department.
Generate an organizational chart for a department.
Create an HR metrics/dashboard report.
Analyze turnover analytics across periods.
Compute salary statistics and related metrics.
Create or update performance reviews for employees.