Provides tools for exploring and querying a PostgreSQL database, including executing read-only SQL queries, listing tables, and obtaining schema information for specific tables.
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
- Clonez ce dépôt
- Démarrez le serveur avec Docker Compose:
Configuration dans Cursor
- Ouvrez Cursor
- Allez dans Paramètres > MCP
- 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:
- Vérifiez les logs du conteneur:
- Pour redémarrer le serveur:
Fonctionnalités du serveur MCP
Le serveur MCP PostgreSQL expose les outils suivants pour Cursor:
postgres_query
- Exécuter une requête SQL en lecture seulepostgres_list_tables
- Lister toutes les tables de la base de donnéespostgres_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.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
A server implementing the Model Context Protocol (MCP) for Cursor that allows using a PostgreSQL database as storage for model contexts, enabling secure database exploration and querying.
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA powerful Model Context Protocol (MCP) tool for exploring and managing different types of databases including PostgreSQL, MySQL, and Firestore.Last updated -95MIT License
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server for Cursor IDE that simplifies the installation and configuration of other MCP servers.Last updated -38068MIT License
- -securityAlicense-qualityA Model Context Protocol server that enables interaction with PostgreSQL databases to list tables, retrieve schemas, and execute read-only SQL queries.Last updated -24MIT License
- -securityAlicense-qualityA template project for building custom MCP servers that enables direct access to PostgreSQL databases, allowing SQL query execution and schema information retrieval through the Model Context Protocol.Last updated -30MIT License