Loading...

The MCP ODBC server provides LLMs with access to ODBC-accessible data sources, enabling data retrieval and manipulation via SQL and SPARQL queries.
Boost this tool
Subscribe to listing upgrades or segmented pushes.
The MCP ODBC server provides LLMs with access to ODBC-accessible data sources, enabling data retrieval and manipulation via SQL and SPARQL queries.
The MCP ODBC server offers both safe read-only operations and potentially risky query execution. It is safe to use for listing schemas and tables, but running arbitrary SQL queries should be done with caution and proper input validation to prevent SQL injection attacks. Securely managing database credentials is crucial.
Performance depends on the complexity of the SQL queries and the speed of the ODBC connection. Large queries can be slow and resource-intensive.
Cost depends on the resources consumed by the database and the LLM API. Monitor query execution time and API usage to control costs.
npm install @modelcontextprotocol/sdk{
"mcpServers": {
"ODBC": {
"command": "/path/to/.nvm/versions/node/v21.1.0/bin/node",
"args": [
"/path/to/mcp-odbc-server/node_modules/.bin/tsx",
"/path/to/mcp-odbc-server/src/main.ts"
],
"env": {
"ODBCINI": "/Library/ODBC/odbc.ini",
"NODE_VERSION": "v21.1.0",
"PATH": "~/.nvm/versions/node/v21.1.0/bin:${PATH}"
},
"disabled": false,
"autoApprove": []
}
}
}API_KEYget_schemasLists database schemas accessible to the connected DBMS.
Read-only operation with no side effects.
get_tablesLists tables associated with a selected database schema.
Read-only operation with no side effects.
describe_tableProvides the description of a table associated with a designated database schema.
Read-only operation with no side effects.
filter_table_namesLists tables associated with a selected database schema, based on a substring pattern.
Read-only operation with no side effects.
query_databaseExecutes a SQL query and returns results in JSON Lines format.
Executes arbitrary SQL queries, potential for SQL injection.
execute_queryExecutes a SQL query and returns results in JSON Lines format.
Executes arbitrary SQL queries, potential for SQL injection.
execute_query_mdExecutes a SQL query and returns results in Markdown table format.
Executes arbitrary SQL queries, potential for SQL injection.
spasql_queryExecutes a SPASQL query and returns results.
Executes SPASQL queries, potential for complex vulnerabilities.
sparql_queryExecutes a SPARQL query and returns results.
Executes SPARQL queries, potential for complex vulnerabilities.
virtuoso_support_aiInteracts with the Virtuoso Support Assistant/Agent using LLMs.
Interaction with LLMs can introduce data leakage or unexpected behavior.
Environment Variable
The MCP ODBC server offers both safe read-only operations and potentially risky query execution. It is safe to use for listing schemas and tables, but running arbitrary SQL queries should be done with caution and proper input validation to prevent SQL injection attacks. Securely managing database credentials is crucial.
Autonomy is limited by the permissions of the database user and the capabilities of the LLM. Exercise caution when granting autonomy to tools that execute SQL queries.
Production Tip
Implement robust input validation and output sanitization to prevent SQL injection and data leakage.
Any database with an ODBC driver can be used.
Use environment variables and restrict database user permissions.
SPASQL is a SQL/SPARQL hybrid query language specific to Virtuoso.
Use parameterized queries and validate all user inputs.
The default authentication method is username and password, configured via environment variables.
Yes, but some tools like `virtuoso_support_ai` are Virtuoso-specific.
It specifies the location of the odbc.ini file, which contains ODBC data source configurations.