Thank you for your interest in contributing to Local MCP Gateway! This document provides guidelines and information for contributors.
- Node.js: >=22.0.0 (check
.nvmrcfor exact version) - pnpm: >=9.0.0 (specified in
packageManagerfield)
# Clone the repository
git clone https://github.com/DXHeroes/local-mcp-gateway.git
cd local-mcp-gateway
# Install dependencies
pnpm install
# Initialize database
pnpm db:seed
# Start development
pnpm devThis starts:
- Backend: http://localhost:3001 (NestJS)
- Frontend: http://localhost:3000 (React 19 + Vite)
This is a pnpm workspace + Turborepo monorepo:
local-mcp-gateway/
├── apps/
│ ├── backend/ # NestJS 11.x backend
│ └── frontend/ # React 19 + Vite frontend
├── packages/
│ ├── core/ # Core types and abstractions
│ ├── database/ # Prisma ORM + SQLite
│ ├── config/ # Shared configuration
│ └── ui/ # Shared UI components
├── mcp-servers/ # MCP server packages (auto-discovered)
└── docs/ # Documentation
We use Biome for linting and formatting:
# Lint code
pnpm lint
# Format code
pnpm format
# Check formatting without changes
pnpm format:checkStyle Rules:
- Single quotes for strings
- Semicolons required
- 2-space indentation
- 100 character line width
pnpm typecheck# Run all tests
pnpm test
# Unit tests
pnpm test:unit
# Integration tests
pnpm test:integration
# E2E tests
pnpm test:e2e
# Coverage report
pnpm test:coverageBefore submitting a PR, run:
pnpm checkThis runs lint, typecheck, tests, and build.
main- Production-ready code- Feature branches -
feature/your-feature-name - Bug fixes -
fix/bug-description
We follow conventional commits:
feat:- New featurefix:- Bug fixdocs:- Documentation changesrefactor:- Code refactoringtest:- Test additions/changeschore:- Maintenance tasks
- Fork the repository
- Create a feature branch from
main - Make your changes
- Run
pnpm checkto ensure everything passes - Submit a pull request
PR Guidelines:
- Keep PRs focused and small
- Include tests for new functionality
- Update documentation if needed
- Link related issues
To create a new MCP server in mcp-servers/:
pnpm create-custom-mcpOr manually:
- Create folder in
mcp-servers/your-mcp-name/ - Add
package.jsonwith"mcpPackage": true - Export
McpPackageinterface fromsrc/index.ts - Run
pnpm install
See mcp-servers/gemini-deep-research/ for reference.
When modifying the Prisma schema:
cd packages/database
# Create migration
pnpm prisma:migrate:dev --name your_migration_name
# Generate client
pnpm prisma generate- Open an issue for bugs or feature requests
- Check existing issues before creating new ones
- See AGENTS.md for detailed technical documentation
By contributing, you agree that your contributions will be licensed under the Elastic License 2.0.