PHP code example of momodemo333 / php-mcp-postgresql

1. Go to this page and download the library: Download momodemo333/php-mcp-postgresql library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

momodemo333 / php-mcp-postgresql example snippets

bash
git clone https://github.com/momodemo333/php-mcp-postgresql.git
cd php-mcp-postgresql
json
{
  "mcpServers": {
    "postgresql": {
      "command": "php",
      "args": ["/absolute/path/to/php-mcp-postgresql/bin/server.php"],
      "type": "stdio",
      "env": {
        "PGSQL_HOST": "localhost",
        "PGSQL_PORT": "5432",
        "PGSQL_USER": "your_user",
        "PGSQL_PASS": "your_password",
        "PGSQL_DB": "your_database"
      }
    }
  }
}