Installation
This guide will help you install and set up MCP Gatekeeper on your local machine.
Prerequisites
Before installing MCP Gatekeeper, ensure you have the following installed:
- Node.js: >= 18.0.0
- npm: >= 9.0.0
- Python: >= 3.9
- pip: Latest version
Verify Prerequisites
Check your installed versions:
node --version # Should be >= 18.0.0
npm --version # Should be >= 9.0.0
python3 --version # Should be >= 3.9
pip3 --version
Installation Steps
1. Clone the Repository
git clone https://github.com/your-org/mcp-gatekeeper.git
cd mcp-gatekeeper
2. Install Root Dependencies
npm install
This will install dependencies for all workspaces (frontend, backend, docs) using Turborepo.
3. Install Backend Dependencies
cd apps/backend
pip install -r requirements.txt
cd ../..
Alternatively, if you're using a virtual environment:
cd apps/backend
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
cd ../..
4. Configure Environment Variables
Create .env files for backend and frontend:
Backend Configuration
Create apps/backend/.env:
# Database
DATABASE_URL=sqlite:///./gatekeeper.db
# Server
HOST=127.0.0.1
PORT=8000
# Authentication
AUTH_TOKEN=your-secret-token-here
AUTH_TOKEN_HEADER_NAME=X-MCPGK-Token
# CORS
CORS_ORIGINS=http://localhost:5173,http://127.0.0.1:5173
Frontend Configuration
Create apps/frontend/.env:
VITE_API_URL=http://127.0.0.1:8000
Verification
Run in Development Mode
Test your installation by running both backend and frontend:
# Run all services
npm run dev
Or run individually:
# Run backend only
npm run backend:dev
# Run frontend only (in another terminal)
npm run frontend:dev
Access the Application
Once running, access:
- Frontend: http://localhost:5173
- Backend API: http://127.0.0.1:8000
- API Documentation: http://127.0.0.1:8000/docs
Troubleshooting
Port Already in Use
If ports 8000 or 5173 are already in use, you can change them in the configuration files:
- Backend: Update
PORTinapps/backend/.env - Frontend: Update the dev server port in
apps/frontend/vite.config.ts
Python Module Not Found
Ensure you've installed the backend dependencies:
cd apps/backend
pip install -r requirements.txt
Node Modules Issues
Try clearing and reinstalling:
npm run clean
npm install
Next Steps
- Quick Start Guide - Learn the basics
- Configuration Guide - Detailed configuration options
- Authentication Setup - Set up authentication