Skip to main content

Prerequisites

Before installing MCPHub, ensure you have the following prerequisites:
  • Node.js 18+ (for local development)
  • Docker (recommended for production)
  • pnpm (for local development)
Optional for Smart Routing:
  • PostgreSQL with pgvector extension
  • OpenAI API Key or compatible embedding service

Installation Methods

Smart Routing Setup (Optional)

Smart Routing provides AI-powered tool discovery using vector semantic search.

Prerequisites

  1. PostgreSQL with pgvector
  2. OpenAI API Key (or compatible embedding service)

Database Setup

  • Docker PostgreSQL
  • Existing PostgreSQL
  • Cloud PostgreSQL
# Run PostgreSQL with pgvector
docker run -d \
  --name mcphub-postgres \
  -e POSTGRES_DB=mcphub \
  -e POSTGRES_USER=mcphub \
  -e POSTGRES_PASSWORD=your_password \
  -p 5432:5432 \
  pgvector/pgvector:pg16

Verification

After installation, verify MCPHub is working:

Dashboard Access

Open your browser and navigate to:
http://localhost:3000

Troubleshooting

Port already in use:
# Check what's using port 3000
lsof -i :3000

# Use a different port
docker run -p 8080:3000 samanhappy/mcphub
Container won’t start:
# Check container logs
docker logs mcphub

# Run interactively for debugging
docker run -it --rm samanhappy/mcphub /bin/bash
Permission errors:
# Use npx instead of global install
npx @samanhappy/mcphub

# Or fix npm permissions
npm config set prefix ~/.npm-global
export PATH=~/.npm-global/bin:$PATH
Node version issues:
# Check Node version
node --version

# Install Node 18+ using nvm
nvm install 18
nvm use 18
Can’t access dashboard:
  • Check if MCPHub is running: ps aux | grep mcphub
  • Verify port binding: netstat -tlnp | grep 3000
  • Check firewall settings
  • Try accessing via 127.0.0.1:3000 instead of localhost:3000
AI clients can’t connect:
  • Ensure the endpoint URL is correct
  • Check if MCPHub is behind a proxy
  • Verify network policies in Kubernetes/Docker environments
Database connection failed:
# Test database connection
psql $DATABASE_URL -c "SELECT 1;"

# Check if pgvector is installed
psql $DATABASE_URL -c "CREATE EXTENSION IF NOT EXISTS vector;"
Embedding service errors:
  • Verify OpenAI API key is valid
  • Check internet connectivity
  • Monitor rate limits

Next Steps

I