Skip to content

Faxziah/mcp-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCP-database

Database connection for executing queries. To operate the MCP server, PostgreSQL must be installed.

Installation

  1. git clone https://github.com/Faxziah/mcp-database.git
  2. npm install
  3. npm run build
  4. Adding the MCP server. You need to specify your own database connection details:
"mcp-database": {
  "command": "node",
  "args": [
    "/Users/USERNAME/path_to_mcp_folder/build/index.js"
  ],
  "env": {
    "DB_HOST": "localhost",
    "DB_USER": "my_db_username",
    "DB_NAME": "my_db_name",
    "DB_PASSWORD": "my_db_password",
    "ALLOW_INSERT": "false",
    "ALLOW_UPDATE": "false",
    "ALLOW_DELETE": "false"
  }
}
  1. Adding the "schema" resource to the prompt via the "query" tool.
  2. Parameters to allow or prohibit insertion, updating, and deletion in the database:
"ALLOW_INSERT": "false",
"ALLOW_UPDATE": "false",
"ALLOW_DELETE": "false"

Prompt Examples

  1. "Get all contracts"
  2. "Display all fields from the users table"

Running Tests

DB_HOST=localhost DB_USER=my_db_username DB_NAME=my_db_name DB_PASSWORD=my_db_password jest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors