Registry / database / postgres-mcp-runner

postgres-mcp-runner

JSON →
library1.0.7jsnpmunverified

Node.js-based Postgres Model Context Protocol (MCP) worker application. Current stable version is 1.0.7. Release cadence is not specified. Key differentiator: it serves as a Postgres MCP worker running in Streamable HTTP mode, enabling AI agents to interact with PostgreSQL databases via the MCP protocol. It is published on npm for easy integration.

npm install postgres-mcp-runner
INSTALL
IMPORT
SIG · POSTGRES-MCP-RUNNE
P
postgres-mcp-runner
databasejavascriptv1.0.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
✓ import postgresMcpRunner from 'postgres-mcp-runner'
✗ const postgresMcpRunner = require('postgres-mcp-runner')
ESM module; require() may not work without transpilation.
PostgresMcpRunner
✓ import { PostgresMcpRunner } from 'postgres-mcp-runner'
✗ const { PostgresMcpRunner } = require('postgres-mcp-runner')
Named export; use ESM import for consistency.
runWorker
✓ import { runWorker } from 'postgres-mcp-runner'
Utility function to start the MCP worker.

Shows how to install dependencies, build the project, and run the Postgres MCP worker locally.

npm install npm run build node main.js
Debug
Known issues
gotchaThe package name 'postgres-mcp-runner' may be confused with other MCP-related packages.
fix
Ensure you are using the correct package and check the README.
affects: >=1.0.0
deprecatedDeprecated: The package may have breaking changes in future versions.
fix
Monitor changelog for updates.
affects: >=1.0.0
breakingBreaking: The main entry point changed from index.js to main.js in version 1.0.0.
fix
Use 'node main.js' instead of 'node index.js'.
affects: >=1.0.0
gotchaEnvironment variables for database connection must be set before running.
fix
Set POSTGRES_HOST, POSTGRES_PORT, POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB.
affects: >=1.0.0
gotchaThe application requires Node.js version 18 or higher.
fix
Use nvm to switch to Node 18+.
affects: >=1.0.0
deprecatedThe 'npm run build' step may be removed in future versions; consider using a prebuilt binary.
fix
Watch for updates in the README.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'postgres-mcp-runner'
Package not installed or not in node_modules.
fix
Run 'npm install postgres-mcp-runner'.
Error: listen EADDRINUSE :::3000
Default port 3000 is already in use.
fix
Set PORT environment variable to a different port, e.g., PORT=3001 node main.js.
TypeError: postgresMcpRunner is not a function
Importing the module incorrectly (e.g., using require on an ESM default export).
fix
Use 'import postgresMcpRunner from "postgres-mcp-runner"' or enable ESM in package.json.
Error: Connect to PostgreSQL failed: Connection refused
PostgreSQL server is not running or connection parameters are incorrect.
fix
Verify PostgreSQL is running and environment variables are set correctly.
Upgrade
Version history
1.0.7latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
3 hits · last 30 days
node
2
Resources
postgres-mcp-runner — npm install postgres-mcp-runner · libregistry