JUHE API Marketplace
a21071 avatar
MCP Server

MCP PostgreSQL Server

A Model Context Protocol server that enables performing PostgreSQL database operations (create, read, update, delete) on User and Post entities through MCP tools.

0
GitHub Stars
11/22/2025
Last Updated
No Configuration
Please check the documentation below.
  1. Home
  2. MCP Servers
  3. mcp-postgres

README Documentation

MCP PostgreSQL Server

-MCP Postgres Logo

A Model Context Protocol (MCP) server that provides PostgreSQL database operations through MCP tools.

Features

  • CRUD operations for User and Post entities
  • Type-safe database operations using Prisma
  • MCP-compatible tool interface
  • Built with TypeScript for type safety

Installation

  1. Clone the repository
  2. Install dependencies:
git clone https://github.com/a21071/mcp-postgres.git
cd mcp-postgres
npm install
  1. Set up PostgreSQL database:
docker-compose up -d
  1. Run database migrations:
npx prisma migrate dev
  1. Build the project:
npm run build

Usage

Run the server:

npm start

Available MCP Tools

  • getData: Retrieve user data from PostgreSQL

    {
      "tableName": "user"
    }
    
  • addUserData: Add new user to database

    {
      "email": "user@example.com",
      "name": "John Doe",
      "age": 30
    }
    
  • deleteUserData: Delete user by ID, email or name

    {
      "id": "clxyz...",
      "email": "user@example.com",
      "name": "John Doe"
    }
    
  • updateUserData: Update user information

    {
      "id": "clxyz...",
      "email": "new@example.com",
      "name": "New Name"
    }
    

Database Schema

The server uses the following Prisma schema:

model User {
  id        String   @id @default(cuid())
  email     String   @unique
  name      String?
  age       Int?
  createdAt DateTime @default(now())
  posts     Post[]
}

Development

  • Watch mode:
npm run watch

Dependencies

  • @modelcontextprotocol/sdk - MCP server SDK
  • Prisma - Type-safe database client
  • TypeScript - Type checking

License

MIT

Quick Actions

View on GitHubView All Servers

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source

Boost your projects with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.

Enjoy a free trial and save 20%+ compared to official pricing.

Learn More
JUHE API Marketplace

Accelerate development, innovate faster, and transform your business with our comprehensive API ecosystem.

JUHE API VS

  • vs. RapidAPI
  • vs. API Layer
  • API Platforms 2025
  • API Marketplaces 2025
  • Best Alternatives to RapidAPI

For Developers

  • Console
  • Collections
  • Documentation
  • MCP Servers
  • Free APIs
  • Temp Mail Demo

Product

  • Browse APIs
  • Suggest an API
  • Wisdom Gate LLM
  • Global SMS Messaging
  • Temp Mail API

Company

  • What's New
  • Welcome
  • About Us
  • Contact Support
  • Terms of Service
  • Privacy Policy
Featured on Startup FameFeatured on Twelve ToolsFazier badgeJuheAPI Marketplace - Connect smarter, beyond APIs | Product Huntai tools code.marketDang.ai
Copyright © 2025 - All rights reserved