
Company News
AWS Security Hub Adds Socket for Supply Chain Security
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.
db-compare-mcp
Advanced tools
db-compare: read-only MCP server that diffs SQL Server / Azure SQL schema between named environments.
Read-only MCP server for comparing SQL Server / Azure SQL schema between named environments (e.g. dev vs prod).
This server never writes to the database. All operations are SELECT queries against catalog views (sys.*). No DDL, DML, or EXEC is performed.
db_datareader + VIEW DEFINITION)Get-OdbcDriver | Where-Object Name -like '*SQL Server*')cd c:\Users\yadukrishnan\Develop\DBCompare
uv sync
# JDBC only:
uv sync --extra jdbc
SQLDIFF_DRIVER=odbc
SQLDIFF_CONN_<NAME>=<odbc connection string>
Example:
SQLDIFF_CONN_DEV=Driver={ODBC Driver 18 for SQL Server};Server=tcp:myserver-dev.database.windows.net,1433;Database=mydb;Uid=readonly;Pwd=...;Encrypt=yes;TrustServerCertificate=no;ApplicationIntent=ReadOnly;
SQLDIFF_DRIVER=jdbc
SQLDIFF_JDBC_JAR=C:/path/to/mssql-jdbc-12.8.1.jre11.jar
SQLDIFF_CONN_<NAME>=jdbc:sqlserver://host:1433;databaseName=mydb;encrypt=true;trustServerCertificate=false;
SQLDIFF_JDBC_USER_<NAME>=readonly
SQLDIFF_JDBC_PASSWORD_<NAME>=...
Notes:
jdbc:sqlserver: automatically uses JDBC even if SQLDIFF_DRIVER=odbc.SQLDIFF_DRIVER_DEV=jdbc, SQLDIFF_DRIVER_PROD=odbc.user=...;password=...) instead of separate env vars.ApplicationIntent=ReadOnly / applicationIntent=ReadOnly) if not present.uv run server.py
# or
uv run db-compare
Edit .cursor/mcp.json with your connection strings (or use Cursor secrets). Restart Cursor, then verify tools appear in the MCP panel.
Example mcp.json:
{
"mcpServers": {
"db-compare": {
"command": "uv",
"args": ["run", "server.py"],
"cwd": "/path/to/DBCompare",
"env": {
"SQLDIFF_CONN_DEV": "...",
"SQLDIFF_CONN_PROD": "..."
}
}
}
}
Example chat prompts:
| Tool | Description |
|---|---|
list_environments | Show configured environment names |
test_connection | Verify read-only connectivity |
list_schemas | List user schemas in one environment |
list_objects | List tables/views/procs/functions/triggers |
diff_schema_inventory | High-level inventory diff |
diff_object_definition | Line diff for a proc/view/function/trigger |
diff_table_structure | Structural diff for a table |
full_drift_report | Inventory + deep compare of all common objects |
# Unit tests (no database required)
uv sync --extra dev
uv run pytest tests/test_differ.py tests/test_readonly.py -v
# Integration tests (requires .env.test with SQLDIFF_CONN_DEV and SQLDIFF_CONN_PROD)
uv run pytest tests/ -m integration -v
Copy .env.test.example to .env.test and fill in credentials. Integration tests are read-only — they never modify the database.
.env.test (gitignored) or Cursor env secretsdb.pyAfter publishing to PyPI:
uvx db-compare-mcp
Or add to Cursor mcp.json:
{
"mcpServers": {
"db-compare": {
"command": "uvx",
"args": ["db-compare-mcp"],
"env": {
"SQLDIFF_CONN_DEV": "...",
"SQLDIFF_CONN_PROD": "..."
}
}
}
}
See PUBLISHING.md for maintainer release steps.
| Item | Value |
|---|---|
| GitHub | https://github.com/yadu-tv/db-compare |
| PyPI package | db-compare-mcp |
| MCP registry name | io.github.yadu-tv/db-compare |
| CLI entry point | db-compare |
FAQs
db-compare: read-only MCP server that diffs SQL Server / Azure SQL schema between named environments.
We found that db-compare-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.