inspect_schemaLABSCO SUMMARY
Read-only by construction, which is what makes pointing it at production reasonable.
The combination that matters on an old database is structure plus logic plus real rows in one conversation: read the schema, read the procedure that processes orders, then sample the orders. find_impact answers the question you actually have before a change — what else breaks.
What it is
A Java server for PostgreSQL, SQL Server and Oracle that connects strictly read-only. It retrieves full stored-procedure source, traces dependencies between tables, triggers, procedures and views, analyses execution plans, and generates documentation and JDBC code from the live schema.
What you get
- inspect_schema — tables, columns, types, primary keys and foreign keys
- get_procedure_source — the complete source of stored procedures and functions, including large PL/SQL packages
- data_sampler — sample rows with sensitive columns masked automatically
- query_plan_expert — execution plan analysis with full table scan detection
- dependency_graph and find_impact — foreign key chains, trigger to procedure call chains, view dependencies, and everything that depends on a given table
- generate_mermaid_erd and generate_documentation — an ER diagram and full Markdown docs for the schema
- generate_java_dao — Entity and Repository classes in plain JDBC per table
- An Oracle APEX toolkit: inspect_apex_performance, get_apex_source, inspect_apex_debug, apex_config_audit, apex_sql_runtime_stats and apex_explain_batch
Requirements
A native installer on Windows, Debian or RHEL, or the JAR with Java 21 or newer. Connection details go in a config.json in the install directory: database type, JDBC URL, user and password. Tested against PostgreSQL 11+, SQL Server 2016+ and Oracle 12c+. No Docker, no ORM.
Setup effort
Follow the published steps
USE CASES
Working out what a change would break
Trace everything that depends on the table — foreign keys, triggers, procedures and views — before touching it.
Reading logic nobody has opened in years
Pull the full source of the stored procedure, then sample the rows it operates on to see why it behaves as it does.
Producing documentation for a schema that has none
Generate the Markdown documentation and a Mermaid ER diagram from the live database.
Finding the slow page in an Oracle APEX app
Get the app and page overview with the slowest pages, then batch-explain the SQL behind them and look for full scans.
15 tools
Listed in project docs. Your client may show a different list.
data_samplerget_procedure_sourcequery_plan_expertdependency_graphgenerate_mermaid_erdgenerate_documentationfind_impactgenerate_java_daoinspect_apex_performanceget_apex_sourceinspect_apex_debugapex_config_auditapex_sql_runtime_statsapex_explain_batchBEFORE YOU INSTALL
What to know first
Tools you get
15 tools named in the project's documentation. Six of the 15 are Oracle APEX tools that work only on Oracle, so PostgreSQL and SQL Server users get 9. apex_sql_runtime_stats needs SELECT on V$SQL or returns a warning.
INSTALLATION
Connect your client
Server setup
Windows
Download and run LegacySQLArchitectMCP-1.1.0.exe from GitHub Releases:
https://github.com/tabforgeai/legacy-sql-architect-mcp/releases/download/v1.1.0/LegacySQLArchitectMCP-1.1.0.exeLinux (Debian/Ubuntu)
curl -LO https://github.com/tabforgeai/legacy-sql-architect-mcp/releases/download/v1.1.0/legacy-sql-architect-mcp_1.1.0_amd64.deb
sudo dpkg -i legacy-sql-architect-mcp_1.1.0_amd64.debLinux (RHEL/Fedora)
curl -LO https://github.com/tabforgeai/legacy-sql-architect-mcp/releases/download/v1.1.0/legacy-sql-architect-mcp-1.1.0-1.x86_64.rpm
sudo rpm -i legacy-sql-architect-mcp-1.1.0-1.x86_64.rpmmacOS / JAR — no JAR is published in Releases; build it from source (requires Java 21 and Maven 3.8+)
git clone https://github.com/tabforgeai/legacy-sql-architect-mcp.git
cd legacy-sql-architect-mcp
mvn clean package
java -jar target/legacy-sql-architect-mcp.jarConfigure the database connection
Edit config.json and set your database connection: db_type (postgresql, sqlserver or oracle), db_url (the JDBC URL, e.g. jdbc:postgresql://localhost:5432/<YOUR_DATABASE>), db_user, db_password and db_schema. It lives in C:\Program Files\LegacySQLArchitectMCP\app\ on Windows and /opt/legacy-sql-architect-mcp/lib/app/ on Linux; for the JAR, create it next to the JAR file.
MCP Clients
Claude Desktop — Windows, Cursor — Windows
{
"mcpServers": {
"legacy-sql-architect": {
"command": "C:\\Program Files\\LegacySQLArchitectMCP\\LegacySQLArchitectMCP.exe",
"args": []
}
}
}Claude Desktop — macOS
{
"mcpServers": {
"legacy-sql-architect": {
"command": "java",
"args": [
"-jar",
"<YOUR_PATH_TO_LEGACY_SQL_ARCHITECT_MCP>"
]
}
}
}Claude Desktop — Linux
{
"mcpServers": {
"legacy-sql-architect": {
"command": "/opt/legacy-sql-architect-mcp/bin/legacy-sql-architect-mcp",
"args": []
}
}
}Windsurf
{
"mcpServers": {
"legacy-sql-architect": {
"command": "<YOUR_PATH_TO_LEGACY_SQL_ARCHITECT_MCP>",
"args": [],
"transport": "stdio"
}
}
}<YOUR_PATH_TO_LEGACY_SQL_ARCHITECT_MCP> is the launcher your install put on disk. C:\Program Files\LegacySQLArchitectMCP\LegacySQLArchitectMCP.exe on Windows, or /opt/legacy-sql-architect-mcp/bin/legacy-sql-architect-mcp on Linux (.deb or .rpm). For the JAR you built with mvn clean package, set "command" to "java" and "args" to ["-jar", "/absolute/path/to/target/legacy-sql-architect-mcp.jar"].
Any MCP client
java -jar legacy-sql-architect-mcp.jar