Skip to content

Development

Syed Asif edited this page Jun 14, 2026 · 5 revisions

Development Guide

Environment Setup

This project uses uv for fast, reproducible dependency management.

# Install dependencies
uv sync

# Run the server
uv run web-search-mcp

Testing

We use pytest for all tests.

# Run all tests
uv run pytest

# Run with coverage
uv run pytest --cov=web_search_mcp

# Run a specific test file
uv run pytest tests/test_<module>.py

Coding Standards

General

  • Python Version: 3.11+
  • Linting: ruff
  • Type Checking: mypy

Guidelines

  • Imports: Use absolute imports.
  • Naming: snake_case for functions, PascalCase for classes.
  • Type Hints: Use Python 3.11+ union syntax (str | None).
  • Errors: Use web_search_mcp._utils.formatting.format_error() for consistent MCP responses.
  • Testing: Follow AAA pattern (Arrange, Act, Assert). Tests fully independent.

Git Workflow

  • Use Conventional Commits (feat:, fix:, refactor:, test:, chore:).
  • Run uv run ruff check . && uv run pytest before committing.
  • Use feature branches for new functionality.

Home | Architecture | Tools | Configuration

Clone this wiki locally