Skip to main content
Glama
MadeByNando

MCP Postgres Server

by MadeByNando
README.md
# 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:

```bash
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:

   ```bash
   docker logs mcp-postgres-server
   ```

2. Pour redémarrer le serveur:

   ```bash
   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.

TDQS

B3.4/5.0

Scored across 10 tools

Disambiguation5/5

Each tool has a clearly distinct purpose targeting specific database metadata or operations, with no overlap. For example, list_tables enumerates tables, describe_table provides table structure, and query executes SQL, making them easily distinguishable.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern using snake_case, such as list_tables, describe_table, and get_constraints. This uniformity makes the tool set predictable and easy to navigate.

Tool Count5/5

With 10 tools, the server is well-scoped for database introspection and querying, covering essential metadata operations without being overwhelming. Each tool serves a clear, necessary function in the domain.

Completeness4/5

The tool set provides comprehensive coverage for database metadata exploration and query execution, including listing, describing, and analyzing tables, schemas, and functions. A minor gap is the lack of tools for modifying database structures (e.g., creating or altering tables), but core read operations are complete.

Maintenance

ActivityInactive
ResponsivenessNo issues