Skip to content

Conversation

@miguelarcjr
Copy link

Description

This PR adds native support for Microsoft SQL Server connections. It allows the MCP server to execute queries and list tables from DBeaver's SQL Server connections (using the microsoft or sqlserver drivers).

Changes

  • Added mssql dependency: Integrated the node-mssql library to handle SQL Server connections natively.
  • Implemented SQL Server query execution: Added logic in DBeaverClient to parse connection properties and execute queries against SQL Server.
  • Fixed LIMIT vs TOP syntax: Updated query execution logic to use "SELECT TOP n" instead of "LIMIT n" when the target database is SQL Server, fixing syntax errors during pagination.
  • Fixed missing dependency: Added xml2js to dependencies to resolve runtime errors when parsing DBeaver configuration files.

Verification

  • Validated connection to a remote SQL Server instance using DBeaver credentials.
  • Verified execution of simple queries (e.g., SELECT @@Version).
  • Confirmed that table listing and schema retrieval work correctly.

Adds native support for connecting to SQL Server databases.

- Adds mssql dependency

- Implements executeSQLServerQuery in DBeaverClient

- Fixes LIMIT/TOP syntax for SQL Server queries

- Fixes integration with dbeaver connections
@srthkdev srthkdev merged commit 0f0b655 into srthkdev:main Jan 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants