cxdb-mcp
Provides read-only access to a PostgreSQL database (cxdb), enabling SQL queries, table listing, and schema description through natural language.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cxdb-mcphow many loads were posted last week?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cxdb-mcp
A Model Context Protocol (MCP) server that gives Claude direct, read-only access to the cxdb PostgreSQL database. This lets you query production data in plain English — no SQL knowledge required — straight from Claude Code or the Claude desktop app.
Why does this exist?
Normally, getting data out of cxdb means opening a database client, writing SQL, and sharing results manually. This tool removes that friction.
With cxdb-mcp connected to Claude, you can ask things like:
"How many loads were posted last week?"
"Give me the details of the user with email x@example.com"
"What tables relate to companies and subscriptions?"
Claude handles the SQL, runs it safely in a read-only transaction, and returns the results directly in your conversation. No write access is possible.
Related MCP server: pg-mcp
Tools available
Tool | What it does |
| Runs a |
| Lists all tables in the database |
| Shows columns and types for a given table |
Prerequisites
Node.js v18 or higher
Claude Code (CLI or desktop app)
Database credentials for
cxdb— ask devops team
Setup
1. Clone the repo
git clone https://github.com/uvan1999/cxdb-mcp.git
cd cxdb-mcp2. Install dependencies
npm install3. Configure your credentials
Copy the example env file and fill in your own database details:
cp .env.example .envOpen .env and set the values:
DB_HOST=your-db-host
DB_PORT=5432
DB_NAME=your-db-name
DB_USER=your-db-user
DB_PASSWORD=your-db-passwordNever commit
.envto git. It is already listed in.gitignore.
4. Register the MCP server with Claude Code
Open your Claude Code settings file at ~/.claude/settings.json and add the following inside the mcpServers object:
"cxdb": {
"command": "node",
"args": ["/absolute/path/to/cxdb-mcp/index.js"],
"env": {
"DB_HOST": "your-db-host",
"DB_PORT": "5432",
"DB_NAME": "your-db-name",
"DB_USER": "your-db-user",
"DB_PASSWORD": "your-db-password"
}
}Replace /absolute/path/to/cxdb-mcp/ with the actual path where you cloned the repo (e.g. /Users/yourname/projects/cxdb-mcp).
The credentials go in
settings.jsonrather than the.envfile when using Claude Code, because Claude Code passes them as environment variables directly to the server process.
5. Restart Claude Code
After saving settings.json, restart Claude Code for the MCP server to be picked up.
Verify it's working
In Claude Code, ask:
"List the tables in cxdb"
Claude should respond with a list of all tables — no SQL required.
Security notes
All queries run inside a read-only transaction (
BEGIN READ ONLY). Writes, deletes, and schema changes are not possible.Only
SELECTandWITHstatements are accepted. Any other statement type is rejected before it reaches the database.Your credentials are never stored in this repository. The
.gitignoreexcludes.envand the source code contains no hardcoded values.
This server cannot be deployed
Maintenance
Related MCP Connectors
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
Related MCP Servers
- FlicenseDqualityDmaintenanceA secure Model Context Protocol server that allows Claude to execute read-only SQL queries against a PostgreSQL database, enabling natural language interaction with database data.1-
- FlicenseNot gradedqualityDmaintenanceEnables natural language querying of PostgreSQL databases through the Model Context Protocol. It translates user questions into validated SQL, executes read-only queries safely, and returns results to MCP-compatible clients like Claude Desktop.-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) Server that allows AI models to securely interact with data hosted in Azure Database for PostgreSQL. It enables natural language querying, schema exploration, and data management through MCP clients like Claude Desktop and Visual Studio Code.MIT
- AlicenseNot gradedqualityDmaintenanceA production-ready MCP server for PostgreSQL — built for Claude Desktop, Claude Code, and any MCP-compatible AI agent.Apache 2.0