This guide will help you test the Phase 1 implementation to ensure all core components are working correctly.
Before testing, ensure you have:
- Node.js 20+ installed
- Docker and Docker Compose installed
- npm or pnpm package manager
- A terminal/command line interface
npm installCopy the example environment file and configure it:
cp .env.example .envEdit .env with your preferred values:
# Database
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/pipe_dev"
# Redis
REDIS_URL="redis://localhost:6379"
# Neo4j
NEO4J_URI="bolt://localhost:7687"
NEO4J_USER="neo4j"
NEO4J_PASSWORD="password"
# Security
JWT_SECRET="your-secret-key-here"
JWT_REFRESH_SECRET="your-refresh-secret-here"
ENCRYPTION_KEY="your-32-character-encryption-key"
# Server
PORT=3000
NODE_ENV=developmentnpm run docker:upThis starts PostgreSQL, Redis, and Neo4j. Verify they're running:
docker psYou should see three containers running.
npm run db:generatenpm run db:migrate:devnpm run db:seednpm run devYou should see output like:
🚀 Pipe MCP Server listening on port 3000
📡 WebSocket server initialized
🔐 Auth strategies registered
💾 Database connections established
curl http://localhost:3000/healthExpected response:
{
"status": "ok",
"timestamp": "2025-01-17T12:00:00.000Z"
}curl http://localhost:3000/health/detailedExpected response should show all services as healthy:
{
"status": "ok",
"services": {
"database": "healthy",
"redis": "healthy",
"neo4j": "healthy"
},
"timestamp": "2025-01-17T12:00:00.000Z"
}curl -X POST http://localhost:3000/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "test@example.com",
"password": "TestPassword123!",
"name": "Test User"
}'Expected response:
{
"accessToken": "eyJhbGciOiJIUzI1NiIs...",
"refreshToken": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"id": "uuid",
"email": "test@example.com",
"name": "Test User"
}
}curl -X POST http://localhost:3000/api/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "test@example.com",
"password": "TestPassword123!"
}'Use the access token from registration/login:
curl http://localhost:3000/api/auth/me \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Create a test WebSocket client file:
cat > test-websocket.js << 'EOF'
const WebSocket = require('ws');
const token = process.argv[2];
if (!token) {
console.error('Usage: node test-websocket.js <access_token>');
process.exit(1);
}
const ws = new WebSocket(`ws://localhost:3000?token=${token}`);
ws.on('open', () => {
console.log('✅ WebSocket connected');
// Send MCP initialize request
const initRequest = {
jsonrpc: '2.0',
method: 'initialize',
params: {
protocolVersion: '1.0',
capabilities: {}
},
id: 1
};
console.log('📤 Sending initialize request');
ws.send(JSON.stringify(initRequest));
});
ws.on('message', (data) => {
const message = JSON.parse(data.toString());
console.log('📥 Received:', JSON.stringify(message, null, 2));
// If we received initialize response, list tools
if (message.id === 1 && message.result) {
const listToolsRequest = {
jsonrpc: '2.0',
method: 'tools/list',
params: {},
id: 2
};
console.log('📤 Sending tools/list request');
ws.send(JSON.stringify(listToolsRequest));
}
});
ws.on('close', (code, reason) => {
console.log(`❌ WebSocket closed: ${code} - ${reason}`);
});
ws.on('error', (error) => {
console.error('❌ WebSocket error:', error);
});
// Send heartbeat every 30 seconds
setInterval(() => {
if (ws.readyState === WebSocket.OPEN) {
ws.ping();
}
}, 30000);
EOFRun the WebSocket test:
node test-websocket.js YOUR_ACCESS_TOKENExpected output:
✅ WebSocket connected
📤 Sending initialize request
📥 Received: {
"jsonrpc": "2.0",
"result": {
"protocolVersion": "1.0",
"capabilities": {},
"serverInfo": {
"name": "pipe-mcp-server",
"version": "1.0.0"
}
},
"id": 1
}
📤 Sending tools/list request
📥 Received: {
"jsonrpc": "2.0",
"result": {
"tools": [
{
"name": "search_context",
"description": "Search across all connected platform data"
},
{
"name": "get_team_context",
"description": "Get comprehensive team context"
}
]
},
"id": 2
}
Connect to PostgreSQL to verify schema:
docker exec -it pipe_postgres psql -U postgres -d pipe_devCheck tables:
\dtYou should see:
- User
- Team
- TeamMember
- Session
- RefreshToken
- PlatformConnection
- SyncStatus
- WebhookEvent
- AuditLog
Exit psql:
\qdocker exec -it pipe_redis redis-cliTest basic operations:
PING
# Should return: PONG
INFO server
# Should show Redis server info
Exit Redis CLI:
exit
Open Neo4j Browser at http://localhost:7474
Login with:
- Username: neo4j
- Password: password
Run a test query:
CREATE (n:TestNode {name: 'Test'}) RETURN nnpm run lintAll files should pass without errors.
npm run typecheckShould complete without type errors.
npm test# Stop all services
npm run docker:down
# Remove volumes and restart
docker-compose down -v
npm run docker:up- Check DATABASE_URL in .env
- Ensure PostgreSQL container is running
- Try connecting directly:
docker exec -it pipe_postgres psql -U postgres- Check that the server is running
- Verify the access token is valid
- Check browser console for CORS issues
# Find process using port 3000
lsof -i :3000
# Kill the process
kill -9 <PID>- All Docker services start successfully
- Database migrations run without errors
- Health endpoints return positive status
- User registration and login work
- Access tokens properly authenticate requests
- WebSocket connections establish with valid tokens
- MCP protocol initialization succeeds
- Database contains expected tables
- Redis is accessible and responsive
- Neo4j is accessible via browser
- No TypeScript or linting errors
Once all Phase 1 components are verified:
- Review application logs for any warnings
- Test edge cases (invalid tokens, malformed requests)
- Monitor resource usage (CPU, memory)
- Prepare for Phase 2 platform integrations
If you encounter issues not covered in this guide:
- Check application logs:
npm run dev - Review Docker logs:
npm run docker:logs - Verify all environment variables are set correctly
- Ensure all dependencies are installed:
npm install
Last updated: July 2025