mcp-database-server

mcp-database-server

40

The MCP Database Server allows access to SQLite, SQL Server, and PostgreSQL databases using the Model Context Protocol. It provides tools for executing queries, managing tables, and configuring Claude Desktop for database interactions.

MCP Database Server

This MCP (Model Context Protocol) server enables database access for Claude, supporting SQLite, SQL Server, and PostgreSQL databases.

Installation

  • Clone the repository and install dependencies.
  • Build the project using the recommended commands.

Usage Options

  1. Direct usage: Install the package globally.
  2. Local development: Run from your local environment.

Configuration

Configure Claude Desktop with the global package or local development setup for different databases (SQLite, SQL Server, PostgreSQL).

Available Database Tools

  • read_query: Execute SELECT queries.
  • write_query: Execute INSERT, UPDATE, DELETE queries.
  • create_table: Create new tables.
  • alter_table: Modify table schema.
  • drop_table: Remove tables.
  • list_tables: List all tables.
  • describe_table: View table schema.
  • export_query: Export results as CSV/JSON.
  • append_insight: Add a business insight to memo.
  • list_insights: List all insights.

Development

  • Run the server in development mode and watch for changes.

Requirements

  • Node.js 18+
  • SQL Server 2012+
  • PostgreSQL 9.5+

License

  • MIT