Development Guide
Guide for developers contributing to or extending MCP Gatekeeper.
Getting Started
MCP Gatekeeper is built as a Turborepo monorepo with Python (FastAPI) backend and React (TypeScript) frontend.
Prerequisites
- Node.js 18+ and npm
- Python 3.9+
- Git
Setup Development Environment
# Clone repository
git clone <repository-url>
cd mcp-gatekeeper
# Install dependencies (installs both backend and frontend)
npm install
# Start development servers
npm run dev
This starts:
- Backend at
http://127.0.0.1:8000 - Frontend at
http://localhost:5173 - Backend hot-reloads on file changes
- Frontend hot-reloads with Vite HMR
Project Structure
mcp-gatekeeper/
├── apps/
│ ├── backend/ # FastAPI Python backend
│ ├── frontend/ # React TypeScript frontend
│ └── docs/ # Docusaurus documentation site
├── memory/ # Project documentation and architecture
├── tests/ # Test files
└── turbo.json # Turborepo configuration
Development Workflow
- Create a branch for your feature/fix
- Make changes in relevant workspace
- Test locally using dev servers
- Update docs in
/memorydirectory for architecture changes - Commit and push your changes
- Create PR for review
Available Scripts
# Development
npm run dev # Start both backend and frontend in dev mode
# Backend only
cd apps/backend
source venv/bin/activate
uvicorn app.main:app --reload
# Frontend only
cd apps/frontend
npm run dev
# Docs
cd apps/docs
npm start
Key Technologies
Backend
- FastAPI for REST API
- SQLAlchemy for ORM
- SQLite for database
- Pydantic for validation
- httpx for HTTP client
Frontend
- React 19 with TypeScript
- Material-UI (MUI) v6
- Vite for build tooling
- Axios for HTTP requests
- React Router for navigation
Next Steps
- Project Structure - Detailed file structure
- Testing - Running tests
- Troubleshooting - Common issues
- Contributing - Contribution guidelines