Legacy SQL Architect MCP
MCP server that gives AI agents deep understanding of contemporary or legacy relational databases.
Legacy SQL Architect MCP
MCP server that gives AI agents deep understanding of legacy databases.
Connect Claude Desktop (or any MCP-compatible AI client) to your PostgreSQL, SQL Server, or Oracle database and let the AI inspect schemas, read stored procedures, analyze query performance, trace dependencies, generate documentation, and produce working Java code — all in a single conversation, without you copying a single line of SQL.
Why Legacy SQL Architect MCP?
Works with legacy databases, not just modern ones. Full stored procedure source retrieval, trigger dependency mapping, and impact analysis designed for databases that have been running for years or decades — including large PL/SQL packages that other tools fail on.
Read-only by design. Connects in strict read-only mode. Physically cannot modify your database — no INSERT, no UPDATE, no DELETE. Safe to point at production.
No framework lock-in. No Docker. Pure Java + JDBC. No Spring, no ORM, no infrastructure to maintain. Runs as a lightweight native installer on Windows, macOS, and Linux.
Combines structure + logic + real data in one conversation. The AI inspects the schema, reads the stored procedure that processes orders, then samples real orders to understand why something is broken — without you copy-pasting anything between tools.
The AI understands relationships, not just tables.
dependency_graph and find_impact trace how tables, triggers, procedures, views, and foreign keys connect — so the AI tells you what breaks before you change anything.
Generates working Java code, not pseudocode.
generate_java_dao produces ready-to-compile Entity + Repository classes (plain JDBC, Java 17+) directly from your live schema.
Supported Databases
| Database | Tested version |
|---|---|
| PostgreSQL | 11+ |
| SQL Server | 2016+ (Express, Standard, Enterprise) |
| Oracle | 12c+ |
Available Tools
| Tool | What it does |
|---|---|
inspect_schema | Tables, columns, types, primary keys, foreign keys |
data_sampler | Sample rows with automatic sensitive-column masking |
get_procedure_source | Full source code of stored procedures and functions |
query_plan_expert | Execution plan analysis, full table scan detection |
dependency_graph | FK chains, trigger→procedure call chains, view dependencies |
generate_mermaid_erd | Entity-Relationship Diagram in Mermaid format |
generate_documentation | Complete Markdown documentation for the entire schema |
find_impact | Everything that depends on a given table |
generate_java_dao | Java Entity + Repository classes (plain JDBC) per table |
Quick Start
1. Install
Windows — download and run legacy-sql-architect-mcp-1.0.0.exe
Linux (Debian/Ubuntu)
sudo dpkg -i legacy-sql-architect-mcp-1.0.0.deb
Linux (RHEL/Fedora)
sudo rpm -i legacy-sql-architect-mcp-1.0.0.rpm
macOS / JAR — requires Java 21+
java -jar legacy-sql-architect-mcp.jar
2. Configure the database connection
Edit config.json in the installation directory:
{
"db_type": "postgresql",
"db_url": "jdbc:postgresql://localhost:5432/your_database",
"db_user": "your_user",
"db_password": "your_password",
"db_schema": "public",
"data_sampler_rows": 10,
"data_sampler_mask_sensitive": true
}
db_type accepts: postgresql, sqlserver, oracle
3. Add to Claude Desktop
Edit %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"legacy-sql-architect": {
"command": "C:\\Program Files\\LegacySQLArchitectMCP\\LegacySQLArchitectMCP.exe"
}
}
}
Restart Claude Desktop. A hammer icon (🔨) confirms the server is active.
4. Try it
"Inspect the schema and give me an overview of the data model."
"Get the source of all stored procedures and summarize the business logic."
"I need to rename a column in the orders table — use find_impact to tell me everything that would break."
Example Prompts
Inspect the schema, generate a Mermaid ERD, sample the orders table,
read all stored procedures, and produce complete Markdown documentation.
Analyze this query with query_plan_expert:
SELECT * FROM orders WHERE status = 'PENDING' AND created_at > '2024-01-01'
Is it using indexes? What would you recommend?
Generate Java DAO classes for all tables using package com.acme.repository,
then write each file into src/main/java/com/acme/repository/.
Build the dependency graph. When a row is inserted into orders,
what triggers fire and what procedures do they call?
Documentation
- Setup Guide — installation, config.json reference, Claude Desktop setup, troubleshooting
- User Guide — all tools with prompt examples, multi-tool workflows, tips
Building from Source
Requires Java 21 and Maven 3.8+.
# Run tests + build JAR
mvn clean package
# Windows installer (run on Windows, requires Java 21 with jpackage)
JAVA_HOME="c:/Java_21" mvn clean package -P windows-exe -Dmaven.test.skip=true
# Linux DEB (run inside Ubuntu/Debian container or system)
mvn clean package -P linux-deb -Dmaven.test.skip=true
# Linux RPM (run inside RHEL/Fedora container or system)
mvn clean package -P linux-rpm -Dmaven.test.skip=true
Integration tests use embedded PostgreSQL — no Docker, no external database required.
Distribution
Legacy SQL Architect MCP is distributed as native installers — not as a Maven library. There is no dependency to add to your pom.xml. Download the installer for your platform from GitHub Releases and follow the Setup Guide.
License
Apache License 2.0 — see LICENSE
관련 서버
SqlAugur
MCP server providing AI assistants with safe, read-only access to SQL Server databases. Built with C#/.NET 10, it uses AST-based query validation (Microsoft's T-SQL parser) to ensure only SELECT statements execute - blocking INSERT/UPDATE/DELETE/DROP/EXEC at the syntax tree level. Features include schema exploration, PlantUML/Mermaid ER diagram generation, rate limiting, and integrated DBA diagnostic toolsets (First Responder Kit, DarlingData, sp_WhoIsActive).
Unofficial Gene Ontology MCP Server
Access Gene Ontology (GO) data for ontology-based analysis, gene annotation research, and functional enrichment studies.
Atlan
Official MCP Server from Atlan which enables you to bring the power of metadata to your AI tools
Adobe Commerce MCP Server by CData
A read-only MCP server for Adobe Commerce, enabling LLMs to query live data using the CData JDBC driver.
Couchbase
Interact with Couchbase databases using natural language. Perform CRUD operations, query buckets, and execute N1QL queries.
BrianKnows
Access BrianKnows' extensive blockchain knowledge base.
CRM MCP Server
A production-ready MCP server for Customer Relationship Management (CRM) functionality, built with TypeScript and SQLite.
Unofficial Human Protein Atlas MCP Server
Access Human Protein Atlas data, including protein expression, localization, and pathology.
Exasol MCP
Exasol MCP server. Provides knowledge about the Exasol database to an LLM through the Model Context Protocol.
PostgreSQL Full Access MCP Server
A full-access PostgreSQL server for MCP with read/write capabilities and enhanced schema metadata.