Loading...

MCP server for ODBC databases using SQLAlchemy, enabling schema exploration, data querying, and stored procedure execution with various output formats.
Boost this tool
Subscribe to listing upgrades or segmented pushes.
MCP server for ODBC databases using SQLAlchemy, enabling schema exploration, data querying, and stored procedure execution with various output formats.
This server offers both read and write capabilities to a database. It's safe for read-only operations like schema exploration and table description. However, executing arbitrary SQL queries and stored procedures poses a moderate risk due to potential SQL injection and unintended side effects.
Performance depends on the underlying database system and the complexity of the queries. Consider optimizing queries and using appropriate indexing for large datasets.
Cost depends on the database system being used. For cloud-based databases, consider the cost of compute resources and data transfer.
pip install uv{
"mcpServers": {
"my_database": {
"command": "uv",
"args": ["--directory", "/path/to/mcp-sqlalchemy-server", "run", "mcp-sqlalchemy-server"],
"env": {
"ODBC_DSN": "dsn_name",
"ODBC_USER": "username",
"ODBC_PASSWORD": "password",
"API_KEY": "sk-xxx"
}
}
}
}API_KEYpodbc_get_schemasRetrieves a list of available database schemas.
Read-only operation, no data modification.
podbc_get_tablesLists tables within a specified database schema.
Read-only operation, no data modification.
podbc_describe_tableProvides details about the structure of a specified table.
Read-only operation, no data modification.
podbc_filter_table_namesLists tables based on a substring pattern.
Read-only operation, no data modification.
podbc_query_databaseExecutes a SQL query and returns results in JSON format.
Potential SQL injection if the query is not properly sanitized.
podbc_execute_queryExecutes a SQL query and returns results in JSONL format.
Potential SQL injection if the query is not properly sanitized.
podbc_execute_query_mdExecutes a SQL query and returns results in Markdown table format.
Potential SQL injection if the query is not properly sanitized.
podbc_spasql_queryExecutes a SPASQL query (Virtuoso-specific).
SPASQL queries can modify data or execute SPARQL queries with potential side effects.
podbc_sparql_queryExecutes a SPARQL query (Virtuoso-specific).
SPARQL queries can potentially have side effects depending on the endpoint configuration.
podbc_virtuoso_support_aiInteracts with the Virtuoso Support Assistant/Agent using a prompt.
Interaction with AI assistant might lead to unintended actions based on the prompt.
Environment Variable
This server offers both read and write capabilities to a database. It's safe for read-only operations like schema exploration and table description. However, executing arbitrary SQL queries and stored procedures poses a moderate risk due to potential SQL injection and unintended side effects.
The server allows both read and write operations by default. Autonomy should be carefully managed to prevent unintended data modification or security breaches.
Production Tip
Implement robust input validation and sanitization to prevent SQL injection attacks. Also, carefully manage access to stored procedures.
Any database with a SQLAlchemy provider and ODBC driver, such as Virtuoso, PostgreSQL, MySQL, and SQLite.
Edit your `~/.odbc.ini` file with the appropriate connection details for your database.
Always use parameterized queries and validate user inputs.
Yes, configure the `claude_desktop_config.json` file with the appropriate command and environment variables.
The API key is used for authentication and authorization to prevent unauthorized access.
Use the `podbc_spasql_query` tool for Virtuoso or construct a SQL query to call the stored procedure directly.
Use the MCP Inspector to monitor server interactions and check the ODBC DSN configuration.