MCP Postgres Server

by MadeByNando

320 downloads
Not rated
GitHub

Description

# MCP Postgres Server Ce serveur implémente le protocole MCP (Model Context Protocol) pour Cursor, permettant d'utiliser une base de données PostgreSQL comme stockage pour les contextes de modèle. ## Prérequis - Docker - Docker Compose ## Installation et démarrage 1. Clonez ce…

About

# MCP Postgres Server Ce serveur implémente le protocole MCP (Model Context Protocol) pour Cursor, permettant d'utiliser une base de données PostgreSQL comme stockage pour les contextes de modèle. ## Prérequis - Docker - Docker Compose ## Installation et démarrage 1. Clonez ce dépôt 2. Démarrez le serveur avec Docker…

Details

Author
MadeByNando
Downloads
320
Categories
Database

- Runs PostgreSQL as MCP storage via Docker.
- Exposes three tools: query, list tables, describe table.
- postgres_query executes read-only SQL queries.
- postgres_list_tables lists all database tables.
- postgres_describe_table returns a table’s schema.
- Enables secure database exploration from Cursor.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Postgres Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository and start the server with Docker Compose (docker-compose up -d). Then configure a new MCP connection in Cursor (Settings > MCP) using the command docker exec -i mcp-postgres-server node dist/index.js.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp postgres server": {
            "mcp-postgres-server-madebynando": {
                "command": "docker",
                "args": [
                    "logs",
                    "mcp-postgres-server"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-postgres-server-madebynando": {
        "command": "docker",
        "args": [
            "logs",
            "mcp-postgres-server"
        ]
    }
}

MCP Postgres Server

Ce serveur implémente le protocole MCP (Model Context Protocol) pour Cursor, permettant d'utiliser une base de données PostgreSQL comme stockage pour les contextes de modèle.

Prérequis

- Docker
- Docker Compose

Installation et démarrage

1. Clonez ce dépôt
2. Démarrez le serveur avec Docker Compose:

docker-compose up -d

Configuration dans Cursor

1. Ouvrez Cursor
2. Allez dans Paramètres > MCP
3. Ajoutez une nouvelle connexion avec les paramètres suivants:
- Nom: MCP Postgres Server
- Type: command
- Commande: docker exec -i mcp-postgres-server node dist/index.js

Résolution des problèmes

Si le serveur ne démarre pas correctement:

1. Vérifiez les logs du conteneur:

   docker logs mcp-postgres-server
   

2. Pour redémarrer le serveur:

   docker-compose restart
   

Fonctionnalités du serveur MCP

Le serveur MCP PostgreSQL expose les outils suivants pour Cursor:

1. postgres_query - Exécuter une requête SQL en lecture seule
2. postgres_list_tables - Lister toutes les tables de la base de données
3. postgres_describe_table - Obtenir le schéma d'une table spécifique

Ces outils permettent à Cursor d'explorer et d'interroger la base de données de manière sécurisée.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.