Skip to main content

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
  • CPU: 4+ cores
  • RAM: 16 GB
  • Disk: 50 GB SSD
  • OS: macOS 12+, Ubuntu 22.04+

Prerequisites

Install Core Tools

macOS:
Ubuntu/Debian:
Windows (WSL2):

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 .venv if it doesn’t exist
  • Installs all dependencies from pyproject.toml
  • Uses uv.lock for reproducible builds
No need to manually create or activate virtual environments! Use uv run <command> to run commands in the virtual environment without activation.

Manual Virtual Environment (Optional)

Most developers don’t need this section. uv sync handles everything automatically.Only use manual uv venv if you need:
  • A specific Python version different from your default
  • A custom virtual environment location
  • Fine-grained control over the environment
If you need manual control:

Development Dependencies

The pyproject.toml [dependency-groups] section includes:
All development dependencies are managed through pyproject.toml and installed via uv sync --group dev.

IDE Setup

Visual Studio Code

Install Extensions:
Workspace Settings (.vscode/settings.json):
Launch Configuration (.vscode/launch.json):

PyCharm

Configure Interpreter:
  1. File → Settings → Project → Python Interpreter
  2. Add Interpreter → Existing Environment
  3. Select .venv/bin/python
Enable Tools:
  1. Settings → Tools → Python Integrated Tools
  2. Default test runner: pytest
  3. Docstring format: Google
Code Style:
  1. Settings → Editor → Code Style → Python
  2. Set line length to 100
  3. Enable “Reformat code” on save

Environment Configuration

Create .env File

Development .env

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

  1. Set breakpoint in code (click left margin)
  2. Press F5 or Run → Start Debugging
  3. Select “Python: FastAPI” configuration
  4. Debug controls appear at top

Debug with ipdb

Remote Debugging

Makefile Commands

Common Commands

Usage:

Troubleshooting

Common Issues

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!