Rosetta is an intelligent database interaction platform. It bridges the gap between raw MySQL data and non-technical users by allowing them to query, visualize, and manipulate data using conversational natural language.
Built with a centralized MySQL multi-PC architecture, a FastAPI backend, and a highly polished React/Vite frontend, Rosetta eliminates the need for complex database management tools like MySQL Workbench.
- 🗣️ Natural Language to SQL: Powered by LLMs (Groq, Gemini, Anthropic). Chat with your database in plain English. The agent handles context, short-name resolution, and constructs highly accurate MySQL queries.
- 🛡️ Read-Only Guardrails: The chat interface safely isolates intent. Modifications via natural language prompt for clarification before execution, and pure reading is heavily validated against destructive SQL injections.
- 🎛️ Live Database Manager (CRUD): A sleek, dark-themed real-time data grid. Perform Create, Read, Update, and Delete operations seamlessly right from the browser.
- 🌐 Multi-PC Networking: Designed to be hosted centrally. The backend and frontend bind to
0.0.0.0, allowing any device on the local network to securely access and edit the data. - 🤖 MCP Server Integration: Fully compliant with the open standard Model Context Protocol (MCP). Expose your database as a suite of tools (
list_tables,describe_table,run_sql,execute_write) directly to Claude Desktop or autonomous agents viastdio. - 📂 Resilient CSV Ingestion: Drag-and-drop CSV uploads dynamically construct MySQL tables on the fly. Uses robust standard-library parsing to bypass strict enterprise OS Application Control/DLL restrictions.
graph TD
User([User Device / Browser]) <-->|HTTP/REST :5173 & :8000| Frontend
subgraph PC2 - Application Host
Frontend[React / Vite Frontend] <-->|Proxy| Backend[FastAPI Backend]
MCP[FastMCP Server] --- Backend
end
subgraph PC1 - Data Server
Backend <-->|mysql-connector-python| MySQL[(MySQL Database)]
end
Agent([Claude Desktop]) <-->|stdio JSON-RPC| MCP
- Python 3.10+
- Node.js 18+
- MySQL 8.0+
Ensure your MySQL server is running. Create a database for Rosetta:
CREATE DATABASE rosetta_db;Navigate to the backend directory, set up your virtual environment, and install dependencies:
cd backend
python -m venv .venv
source .venv/bin/activate # On Windows use: .venv\Scripts\activate
pip install -r requirements.txtCreate a .env file in the backend folder:
# MySQL Configuration
DB_HOST=192.168.x.x # IP of the MySQL server (PC1)
DB_USER=your_mysql_user
DB_PASSWORD=your_mysql_password
DB_NAME=rosetta_db
# LLM Providers (Add at least one)
GROQ_API_KEY=gsk_...
GEMINI_API_KEY=AIza...
ANTHROPIC_API_KEY=sk-ant-...
# Preferred Provider Selection
LLM_PROVIDER=gemini # options: groq, gemini, anthropicRun the backend server:
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reloadNavigate to the frontend directory:
cd frontend
npm installRun the frontend development server:
npm run dev(The frontend will run on 0.0.0.0:5173 making it accessible across the network).
Rosetta includes a built-in Model Context Protocol (MCP) server, turning the database into an intelligent tool suite for AI clients like Claude Desktop.
To run the MCP server manually (via stdio):
cd backend
python mcp_server.pyEdit your claude_desktop_config.json:
{
"mcpServers": {
"rosetta-db": {
"command": "path/to/python",
"args": ["path/to/rosetta/backend/mcp_server.py"],
"env": {
"DB_HOST": "...",
"DB_USER": "...",
"DB_PASSWORD": "...",
"DB_NAME": "rosetta_db"
}
}
}
}- Network Exposure: The current configuration
host: trueallows network traffic. Ensure you are operating within a trusted Local Area Network (LAN). - Environment Variables: Never commit the
.envfile to version control. The included.gitignorehandles this automatically. - Database Backups: While the Live DB Manager makes edits easy, it directly executes against the live MySQL instance. Regular database backups are highly recommended.