This guide will help you test the TRUF.NETWORK MCP server natively on Windows with reverse proxy configuration, connecting to your AWS database.
You already have:
- ✅ TRUF.NETWORK node running on AWS
- ✅ Windows machine
- ✅ Claude Desktop installed on Windows
- ✅ Database with TRUF.NETWORK data populated
- Python 3.12+ - Download from https://www.python.org/downloads/
- pipx - For isolated Python package installation
- Git - For cloning the repository
- Caddy - For reverse proxy testing (https://caddyserver.com/download)
# Install Python 3.12+ (or download from python.org)
winget install Python.Python.3.12
# Install pipx
python -m pip install --user pipx
python -m pipx ensurepath
# Install Git (if not already installed)
winget install Git.Git
# Download Caddy from https://caddyserver.com/downloadKeep this running throughout the entire test!
ssh -i ~/.ssh/<your-key.pem> -L 5432:localhost:5432 <username>@<aws-node-ip>✅ Test the tunnel works:
# In another PowerShell window
Test-NetConnection -ComputerName localhost -Port 5432
# Should return: TcpTestSucceeded: True# Navigate to your development directory
cd C:\Users\$env:USERNAME
# Clone the postgres-mcp repository
git clone https://github.com/trufnetwork/postgres-mcp.git
cd postgres-mcp
# Run the install script
./install.shDuring installation, you'll be prompted for:
- Host:
localhost(default) - Port:
5432(default) - Database:
kwild(default) - Username:
kwild(default) - Password: (leave empty - uses trust authentication)
✅ Expected Results:
- MCP server installed with pipx
- Claude Desktop config created/updated at
%APPDATA%\Claude\claude_desktop_config.json - Database connection tested successfully
# Test the installed postgres-mcp command
$env:DATABASE_URI = "postgresql://kwild@localhost:5432/kwild"
postgres-mcp --help- Restart Claude Desktop completely
- Open a new conversation
- Test basic functionality:
Can you list the available MCP tools?
Can you show me what schemas are available in the database?
✅ Expected Results:
- Claude shows MCP tools available
- Can query main schema and TRUF.NETWORK tables
- Database queries return real data
# Start MCP server with SSE transport using IPv4 addressing (keep this running!)
$env:DATABASE_URI = "postgresql://kwild@127.0.0.1:5432/kwild"
postgres-mcp --access-mode=restricted --transport=sse --sse-host=127.0.0.1 --sse-port=8000✅ Expected Output:
Starting PostgreSQL MCP Server in RESTRICTED mode
Successfully connected to database and initialized connection pool
Starting SSE server on 127.0.0.1:8000
❌ If you see database timeouts:
- Ensure SSH tunnel is running
- Use IPv4 (127.0.0.1) instead of localhost
- Verify with
Test-NetConnection -ComputerName localhost -Port 5432
Create Caddyfile:
# Create Caddyfile in current directory
@"
:8080 {
reverse_proxy /sse* 127.0.0.1:8000 {
flush_interval -1
header_up Host {http.reverse_proxy.upstream.hostport}
header_up Connection {>Connection}
header_up Cache-Control {>Cache-Control}
}
}
"@ | Out-File -FilePath "Caddyfile" -Encoding UTF8Start Caddy:
# Start Caddy (keep this running!)
caddy run✅ Expected Output:
- Caddy starts without errors
- Serving HTTP on :8080
curl.exe or Invoke-WebRequest to avoid PowerShell's curl alias issues.
# Test direct connection to MCP server
curl.exe -H "Accept: text/event-stream" http://127.0.0.1:8000/sse
# Test through Caddy reverse proxy
curl.exe -H "Accept: text/event-stream" http://127.0.0.1:8080/sse
# Alternative using PowerShell native command
Invoke-WebRequest -Uri "http://127.0.0.1:8000/sse" -Headers @{"Accept"="text/event-stream"}
Invoke-WebRequest -Uri "http://127.0.0.1:8080/sse" -Headers @{"Accept"="text/event-stream"}✅ Expected Results:
- Both endpoints should respond with SSE headers
- No buffering or delays
- Similar response format
Edit: %APPDATA%\Claude\claude_desktop_config.json
mcp-remote proxy tool.
Replace with this configuration to test the reverse proxy:
{
"mcpServers": {
"truf-proxy": {
"command": "npx",
"args": [
"mcp-remote",
"http://127.0.0.1:8080/sse"
]
}
}
}🔄 Optional: Test Direct Connection To compare performance, you can also test the direct connection separately:
{
"mcpServers": {
"truf-direct": {
"command": "npx",
"args": [
"mcp-remote",
"http://127.0.0.1:8000/sse"
]
}
}
}Save the file and completely restart Claude Desktop!
- Close Claude Desktop completely
- Start Claude Desktop again
- Open a new conversation
- Test connection:
Can you list the available MCP tools?
✅ Expected Results:
- Claude should show MCP tools from the configured server
- Database queries work through the reverse proxy
- Performance should be similar to direct connection
Windows PowerShell Windows:
- PowerShell 1: SSH tunnel to AWS (keep running)
- PowerShell 2: Installation and testing (can close after setup)
- PowerShell 3: Basic stdio testing (can close after testing)
- PowerShell 4: MCP server with SSE transport (keep running)
- PowerShell 5: Caddy reverse proxy (keep running)
- PowerShell 6: Testing endpoints (can close after testing)
Windows Applications:
- Claude Desktop: Configured for SSE transport testing
1. Python/pipx not found:
# Add Python to PATH
$env:PATH += ";C:\Users\$env:USERNAME\AppData\Local\Programs\Python\Python312"
refreshenv2. postgres-mcp command not found:
# Add pipx binaries to PATH
$env:PATH += ";C:\Users\$env:USERNAME\AppData\Roaming\Python\Python312\Scripts"
refreshenv3. SSH tunnel disconnected:
# Check if tunnel is still active
netstat -an | findstr :54324. Database connection timeouts:
# Force IPv4 addressing - most common fix
$env:DATABASE_URI = "postgresql://kwild@127.0.0.1:5432/kwild"
# Check connectivity
Test-NetConnection -ComputerName localhost -Port 5432
# Should return: TcpTestSucceeded: True5. PowerShell curl header errors:
# Wrong (PowerShell alias issue):
curl -H "Accept: text/event-stream" http://localhost:8000/sse
# Correct options:
curl.exe -H "Accept: text/event-stream" http://127.0.0.1:8000/sse
Invoke-WebRequest -Uri "http://127.0.0.1:8000/sse" -Headers @{"Accept"="text/event-stream"}6. Caddy port conflict:
# Check what's using port 8080
netstat -ano | findstr :80807. Claude Desktop SSE connection issues:
- Verify both MCP server (port 8000) and Caddy (port 8080) are running
- Check Windows Firewall isn't blocking connections
- Test direct connection first to ensure MCP server works
- Don't enable both direct and proxy connections simultaneously
- Use
npx mcp-remoteinstead of direct SSE configuration
8. Claude Desktop "command" field Required errors:
- Claude Desktop requires the
commandfield for all MCP server configurations - Direct SSE configuration is not supported - must use
mcp-remoteproxy
# Check running processes
Get-Process | Where-Object {$_.ProcessName -match "postgres-mcp|caddy"}
# Test port connectivity
Test-NetConnection -ComputerName 127.0.0.1 -Port 8000
Test-NetConnection -ComputerName 127.0.0.1 -Port 8080
# Check services listening
netstat -an | findstr :8000
netstat -an | findstr :8080✅ Success indicators:
- MCP server installs natively on Windows with pipx
- Basic stdio transport works with Claude Desktop
- SSE transport starts on port 8000 with IPv4 addressing
- Caddy reverse proxy runs on port 8080
- Proxied endpoint (8080) responds correctly
- Claude Desktop connects via SSE transport through mcp-remote proxy
- Database queries work through the reverse proxy connection
- No performance degradation through reverse proxy
- Streaming behavior works properly (no buffering)
❌ Failure indicators:
- Installation errors with pipx or Python
- Claude Desktop shows no MCP tools
- SSE endpoints return errors or timeouts
- Database connection timeout errors (usually IPv6/IPv4 issue)
- Reverse proxy buffering causes delays
- PowerShell curl header syntax errors
-
IPv4/IPv6 Addressing: Windows may default to IPv6 (
::1) while SSH tunnels work on IPv4 (127.0.0.1). Always use explicit IPv4 addresses. -
PowerShell curl Alias: Use
curl.exeorInvoke-WebRequestinstead of PowerShell'scurlalias to avoid header parameter issues. -
PATH Management: Python and pipx binaries may need manual PATH configuration.
-
Claude Desktop Config Location:
%APPDATA%\Claude\claude_desktop_config.jsonon Windows vs~/Library/Application Support/Claude/claude_desktop_config.jsonon macOS. -
mcp-remote Requirement: Claude Desktop requires
npx mcp-remoteproxy for SSE connections - direct SSE configuration is not supported.
Once Windows testing works:
- Deploy to production server with proper domain names
- Add HTTPS certificates
- Test with multiple Claude Desktop clients simultaneously
- Benchmark performance under load
- Document production deployment procedures
This testing validates the complete TRUF.NETWORK MCP server reverse proxy functionality on Windows!