tuhaihe commented on PR #1285:
URL: https://github.com/apache/cloudberry/pull/1285#issuecomment-3301550180

   I have built and run the Cloudberry MCP server under the Cloudberry demo 
environment. It would be better to add the following guide to the README.md for 
a quick demo.
   
   
   If something is wrong, please correct me. Thanks!
   
   ~~~~
   
   ## Quick Start with Cloudberry Demo Cluster
   
   This section shows how to quickly set up and test the Cloudberry MCP Server 
using a local Cloudberry demo cluster. This is ideal for development and 
testing purposes. 
   
   Assume you already have a running [Cloudberry demo 
cluster](https://cloudberry.apache.org/docs/deployment/set-demo-cluster) and 
install & build MCP server as described above.
   
   1. Configure local connections in `pg_hba.conf`
   
   **Note**: This configuration is for demo purposes only. Do not use `trust` 
authentication in production environments.
   
   ```bash
   [gpadmin@cdw]$ vi 
~/cloudberry/gpAux/gpdemo/datadirs/qddir/demoDataDir-1/pg_hba.conf
   ```
   
   Add the following lines to the end of the pg_hba.conf:
   
   ```
   # IPv4 local connections
   host    all     all     127.0.0.1/32    trust
   # IPv6 local connections
   host    all     all     ::1/128         trust
   ```
   
   After modifying `pg_hba.conf`, reload the configuration parameters:
   ```bash
   [gpadmin@cdw]$ gpstop -u
   ```
   
   2. Create environment configuration
   
   Create a `.env` in the project root directory:
   
   ```
   # Database Configuration (Demo cluster defaults)
   DB_HOST=localhost
   DB_PORT=7000
   DB_NAME=postgres
   DB_USER=gpadmin
   # No password required for demo cluster
   
   # Server Configuration
   MCP_HOST=localhost
   MCP_PORT=8000
   MCP_DEBUG=false
   ```
   
   3. Start the MCP server
   
   ```bash
   MCP_HOST=0.0.0.0 MCP_PORT=8000 python -m cbmcp.server
   ```
   
   You should see output indicating the server is running:
   ```
   [09/17/25 14:07:50] INFO     Starting MCP server 'Apache Cloudberry MCP 
Server' with transport        server.py:1572
                                'streamable-http' on http://0.0.0.0:8000/mcp/
   ```
   
   4. Configure your MCP client.
   
   Add the following server configuration to your MCP client:
   
   - Server Type: Streamable-HTTP
   - URL: http://[YOUR_HOST_IP]:8000/mcp
   
   Replace `[YOUR_HOST_IP]` with your actual host IP address.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to