postgresql-server-mcp
If you are the rightful owner of postgresql-server-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
An MCP server designed to connect to local PostgreSQL instances for development and prototyping.
postgreSQL-mcp-server MCP Server
An mcp server that connects to local postgreSQL instances - this is intended as a local development/prototyping aid
Development
Install dependencies:
npm install
Build the server:
npm run build
Run integration test:
npm test
Capabilities
This MCP server provides the following PostgreSQL tools:
Tool | Description |
---|---|
list_tables | List tables in a specified database |
execute_query | Execute an arbitrary SQL query |
create_database | Create a new database |
drop_database | Drop an existing database |
create_table | Create a new table with specified columns and constraints |
drop_table | Drop a table from a database |
create_index | Create an index on specified table columns |
drop_index | Drop an index from a table |
Installation
To use with Claude Desktop, add the server config:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"postgresql-tools": {
"command": "node",
"args": ["/pathtoyourlocalfolder/build/index.js"],
"env": {
"POSTGRESQL_HOST": "localhost",
"POSTGRESQL_PORT": "5432",
"POSTGRESQL_USER": "adamjackson",
"POSTGRESQL_PASSWORD": "",
"POSTGRESQL_DATABASE": "seoanalysis"
}
}
}
}