Codeabien Nest MCP PostgreSQL
Enables interaction with a PostgreSQL database via MCP, using Docker and NestJS for AI-powered database operations.
README
Codeabien Nest.js MCP para PostgreSQL DB
Este es un proyecto de demostración que muestra cómo usar un servidor MCP (Model-driven Co-programming) con una base de datos PostgreSQL en una aplicación NestJS.
MIRA LA IMPLEMENTACIÓN COMPLETA EN NUESTRO CANAL DE YOUTUBE Codea Bien
Prerrequisitos
Asegúrate de tener instaladas las siguientes herramientas en tu sistema:
Empezando
Sigue estos pasos para poner en marcha el proyecto:
1. Clona el repositorio
git clone <URL_DEL_REPOSITORIO>
cd codeabien-nest-mcp-postgresdb
2. Instala las dependencias
Usa pnpm para instalar las dependencias del proyecto:
pnpm install
3. Configuración de la Base de Datos
Este proyecto utiliza Docker para ejecutar una base de datos PostgreSQL.
Ejecutar con Docker Compose
El archivo docker-compose.yml incluido configurará y ejecutará el contenedor de la base de datos.
docker compose up -d
Esto iniciará un servidor PostgreSQL en el puerto 5436.
4. Configuración del Servidor MCP
Para interactuar con la base de datos usando las herramientas de IA en Cursor, necesitas configurar un servidor MCP.
Añade la siguiente configuración a tu archivo .vscode/settings.json en la raíz de tu proyecto:
{
"mcpServers": {
"postgres": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"mcp/postgres",
"postgresql://postgres:P@5tgr3s_Db!2025@host.docker.internal:5436/app_sales_db"
]
}
}
}
Puedes encontrar la imagen de Docker para el servidor MCP de Postgres en Docker Hub.
5. Ejecutar la aplicación
Una vez que la base de datos esté en funcionamiento, puedes iniciar la aplicación NestJS en modo de desarrollo:
pnpm run start:dev
La aplicación estará disponible en http://localhost:3000.
Scripts Disponibles
pnpm run build: Compila la aplicación para producción.pnpm run format: Formatea el código con Prettier.pnpm run start: Inicia la aplicación en modo producción.pnpm run start:dev: Inicia la aplicación en modo de desarrollo con seguimiento de cambios.pnpm run lint: Analiza el código en busca de errores de estilo.pnpm run test: Ejecuta las pruebas unitarias.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.