mcp-server
0
The Database Schema MCP Server is designed to interface with multiple database systems, providing tools to expose and read database schemas. It supports PostgreSQL, MySQL, and SQLite, offering features like table listing and schema details extraction.
Database Schema MCP Server
A powerful MCP server that provides tools to read and expose database schemas from various database types (PostgreSQL, MySQL, SQLite, etc.).
🌟 Features
- Connect to different types of databases
- List all tables in a database
- Get detailed schema information for specific tables
- Get complete database schema including tables, views, and indexes
- Support for multiple database types (PostgreSQL, MySQL, SQLite)
🚀 Installation
Prerequisites
- Python 3.x
- Virtual environment (recommended)
Basic Installation
-
Create and activate a virtual environment:
-
Install dependencies:
Windows MCP Installation
-
Install Node.js
-
Update System Path
-
If Node.js is not recognized, manually add to Path
-
Install MCP
MCP Configuration Example
Create a .cursor/mcp.json
file in your project root with the following structure:
Replace YOUR_USERNAME
with your Windows username and ensure the paths match your Node.js module installation location.
💻 Usage
Starting the Server
Available Tools
1. Connect to Database
2. List Tables
3. Get Table Schema
4. Get Database Schema
🔒 Security Best Practices
- Never expose sensitive database credentials in client-side code
- Use environment variables or secure configuration management for credentials
- Implement proper access controls and authentication
- Use SSL/TLS for database connections when possible