SQL-Transpiler MCP Tool
Transpile SQL queries between different dialects using the sqlglot library.
🚀 SQL-Transpiler MCP Tool
SQL-Transpiler is a MCP tool designed to transpile SQL queries between different dialects using the sqlglot library. This tool helps you convert SQL code from one dialect (e.g., MySQL) to another (e.g., PostgreSQL) with ease, ensuring compatibility across various database systems.
🛠️ Features
- Dialect Support: Lists all SQL dialects supported by
sqlglot. - SQL Transpilation: Converts SQL queries from one dialect to another.
- Error Handling: Informs you if a dialect is unsupported or if there are syntax errors.
📦 Library Used
sqlglot
Version: Check yourpyproject.tomloruv.lockfor the exact version used in this project.
⚙️ Prerequisites
- Python 3.13+ (if running locally)
- UV package manager (for dependency management)
- Docker (if running via container)
🚀 Installation
Option 1: Using UV (Locally)
-
Clone the repository
git clone https://github.com/Baronco/SQL-Transpiler-MCP-Tool.git cd sql-transpiler -
Install UV
pip install uv -
Sync dependencies (using
uv.lock)uv sync --frozen -
Run the server
uv run server.py
Option 2: Using Docker
-
Clone the repository
git clone https://github.com/your-username/sql-transpiler.git cd sql-transpiler -
Build the Docker image
docker build -t sql-transpiler .
📄 Usage
- Use the
Dialectstool to list all supported SQL dialects. - Use the
Transpilertool to convert SQL queries from one dialect to another.
For more details, see the instructions in src/instructions.md.
🖥️ Integration with Claude Desktop
To add the SQL-Transpiler MCP tool to your Claude Desktop configuration using the Docker image, update your claude_desktop_config.json as follows:
{
"mcpServers": {
"sql-transpiler":
{
"command": "docker",
"args": ["run", "-i", "--rm", "--init", "-e", "DOCKER_CONTAINER=true", "sql-transpiler"]
}
}
}
If you want to use your local environment with UV instead of Docker, configure your claude_desktop_config.json like this (adjust the path as needed):
{
"mcpServers": {
"sql-transpiler":
{
"command": "uv",
"args": [
"--directory",
"path/to/sql-transpiler",
"run",
"server.py"
]
}
}
}
📝 License
MIT License
相關伺服器
JDBC-MCP
Enables AI assistants to interact with various databases through JDBC connections.
GigAPI Timeseries Lake
An MCP server for GigAPI Timeseries Lake, enabling seamless integration with MCP-compatible clients.
CData CSV Files
A read-only MCP server for CSV files from CData, requiring an external JDBC driver for connection.
Statsource
A server for statistical analysis, enabling LLMs to analyze data from various sources, calculate statistics, and generate predictions.
Database Server
A Model Context Protocol (MCP) server that provides multi-database query execution capabilities with support for SQLite, PostgreSQL, and MySQL databases. Includes a built-in Web UI for managing database connections.
kintone Sample MCP Server
Integrate with kintone data and applications using the Model Context Protocol.
MCP Qdrant Codebase Embeddings
Uses Qdrant vector embeddings to understand semantic relationships in codebases.
MongoDB Atlas MCP Server
Manage MongoDB Atlas projects, including cluster creation, user management, and network access configuration.
Chroma
A vector database server powered by Chroma, enabling semantic document search, metadata filtering, and document management.
Zurich Open Data MCP Server
Enables Claude, ChatGPT, and other MCP-compatible AI assistants to directly query 900+ datasets, geodata, parliamentary proceedings, tourism data, linked data, and real-time environmental and mobility information from the City of Zurich. 20 Tools, 6 Resources, 6 APIs.