Overview
This guide provides step-by-step instructions for setting up a complete development environment for the MCP Server with LangGraph project. Whether you’re on macOS, Linux, or Windows, this guide will get you up and running.This setup is optimized for productivity with hot reload, debugging support, code formatting, and comprehensive testing tools.
System Requirements
Minimum Requirements
- CPU: 2 cores
- RAM: 8 GB
- Disk: 20 GB free space
- OS: macOS 11+, Ubuntu 20.04+, Windows 10+ with WSL2
Recommended Requirements
- CPU: 4+ cores
- RAM: 16 GB
- Disk: 50 GB SSD
- OS: macOS 12+, Ubuntu 22.04+
Prerequisites
Install Core Tools
macOS:Verify Installation
Clone Repository
Python Environment
Create Virtual Environment and Install Dependencies
With uv, virtual environment creation and dependency installation happen in one command!
uv sync automatically:- Creates
.venvif it doesn’t exist - Installs all dependencies from
pyproject.toml - Uses
uv.lockfor reproducible builds
Manual Virtual Environment (Optional)
If you need manual control:Development Dependencies
Thepyproject.toml [dependency-groups] section includes:
pyproject.toml and installed via uv sync --group dev.
IDE Setup
Visual Studio Code
Install Extensions:.vscode/settings.json):
.vscode/launch.json):
PyCharm
Configure Interpreter:- File → Settings → Project → Python Interpreter
- Add Interpreter → Existing Environment
- Select
.venv/bin/python
- Settings → Tools → Python Integrated Tools
- Default test runner: pytest
- Docstring format: Google
- Settings → Editor → Code Style → Python
- Set line length to 100
- Enable “Reformat code” on save
Environment Configuration
Create .env File
Development .env
Using direnv (Optional but Recommended)
Pre-commit Hooks
Install Pre-commit
Pre-commit Configuration
Already configured in.pre-commit-config.yaml:
Docker Development
Start Services
Docker Compose for Development
docker-compose.dev.yml:Running the Application
Development Server
Run with Docker
Testing
Run Tests
Debugging Tests
Code Quality
Format Code
Lint Code
Auto-fix Issues
Database Migrations
Using Alembic
Debugging
Debug with VSCode
- Set breakpoint in code (click left margin)
- Press F5 or Run → Start Debugging
- Select “Python: FastAPI” configuration
- Debug controls appear at top
Debug with ipdb
Remote Debugging
Makefile Commands
Common Commands
Troubleshooting
Common Issues
Port Already in Use
Port Already in Use
Import Errors
Import Errors
Database Connection Failed
Database Connection Failed
Tests Failing
Tests Failing
Performance Tips
Speed Up Development
Optimize VSCode
Next Steps
Contributing
Contribution guidelines
Testing
Testing strategies
Architecture
System architecture
Deployment
Deploy to production
Development Environment Ready: Start building amazing AI applications!