PostgreSQL MCP Server with LLM Chat Example on Clever Cloud
@CleverCloud
About PostgreSQL MCP Server with LLM Chat Example on Clever Cloud
A Node.js application on Clever Cloud that uses an MCP server for PostgreSQL along with a language model to enable natural language querying of a PostgreSQL database
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-pg-example": {
"command": "node",
"args": [
"scripts/initializeDb.js"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is PostgreSQL MCP Server with LLM Chat Example on Clever Cloud?
This repository demonstrates how to deploy a Node.js application on Clever Cloud that uses the Model Context Protocol (MCP) server for PostgreSQL along with a language model to enable natural language querying of a PostgreSQL database. It is intended for developers who want to combine MCP, LLMs, and PostgreSQL in a cloud‑deployed chat interface.
How to use PostgreSQL MCP Server with LLM Chat Example on Clever Cloud?
Clone the repo, run npm install, copy .env.example to .env, fill in your PostgreSQL connection URI, LLM API key, and optional model/URL settings. Initialize the database with node scripts/initializeDb.js. Test the integration with node scripts/testMCP.js. Start the development server with npm run dev. Deploy to Clever Cloud using the CLI (clever create, clever addon create, clever deploy) or via the Clever Cloud Console.
Key features of PostgreSQL MCP Server with LLM Chat Example on Clever Cloud
- Natural language querying of PostgreSQL databases
- MCP server integration with the official PostgreSQL implementation
- LangChain.js for LLM interactions
- Simple web‑based chat interface
- Express.js backend with API endpoints
- Sample RAGmonsters dataset for testing
Use cases of PostgreSQL MCP Server with LLM Chat Example on Clever Cloud
- Allow non‑technical users to query a database using plain English
- Prototype and test MCP + LLM workflows on a cloud platform
- Learn how to deploy a Node.js + PostgreSQL + MCP application on Clever Cloud
- Explore a structured database schema via a conversational interface
FAQ from PostgreSQL MCP Server with LLM Chat Example on Clever Cloud
What are the prerequisites to run this application?
A Clever Cloud account, Clever Tools CLI installed, Node.js 23 or later, a PostgreSQL database, and access to an LLM API (e.g., OpenAI).
How do I deploy this application to Clever Cloud?
Use the CLI commands clever create --type node <APP_NAME>, clever addon create <APP_NAME>-pg --plan dev, then set required environment variables (LLM_API_KEY, etc.) and run clever deploy. You can also deploy from the Clever Cloud Console via Git or GitHub.
Which environment variables are required and which are optional?
Required: POSTGRESQL_ADDON_URI (auto‑set by Clever Cloud when linking a PostgreSQL add‑on) and LLM_API_KEY. Optional: PORT (default 8080), LLM_API_MODEL (default gpt-4o-mini), LLM_API_URL (default OpenAI’s base URL).
What should I do if the application doesn’t work?
Check the logs with clever logs, verify all environment variables are correctly set with clever env, and ensure the application is running with clever status.
Does the application work locally without Clever Cloud?
Yes. Set up a local PostgreSQL database, configure the .env file with your local connection URI, and run the development server or test script.
More Databases MCP servers
MotherDuck's DuckDB MCP Server
motherduckdbLocal MCP server for DuckDB and MotherDuck
MongoDB MCP Server
mongodb-jsA Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters.
mcp-server-qdrant: A Qdrant MCP server
qdrantAn official Qdrant Model Context Protocol (MCP) server implementation
Sail MCP Server for Spark SQL
lakehqDrop-in Apache Spark replacement written in Rust, unifying batch processing, stream processing, and compute-intensive AI workloads.
mcp_mysql_server
xwb602625136Model Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Comments