mcp-server-db-ts
0
This project is a Model Context Protocol (MCP) database server written in TypeScript, allowing secure interactions with MySQL and PostgreSQL databases. It supports listing tables, reading table structures, and performing read-only queries.
MCP Database Server (TypeScript)
This is a database query server based on the Model Context Protocol (MCP) implemented in TypeScript. It allows AI models to securely query relational databases like MySQL and PostgreSQL.
Features
- Supports MySQL and PostgreSQL databases
- Provides table structure information as a resource
- Executes read-only SQL queries
- Uses transactions to ensure query security
Installation
Use cnpm for installation.
Configuration
Copy and edit the .env
file to set your database connection information.
Usage
Use cnpm run build
to build and cnpm start
to run the server.
Supported MCP Features
- Resources: List and read table information
- Tools: Execute read-only SQL queries