Skip to content

Development

Syed Asif edited this page Jun 8, 2026 · 6 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 source-specific test suites
uv run pytest tests/test_ddg_functional.py
uv run pytest tests/test_reddit.py
uv run pytest tests/test_hackernews.py
uv run pytest tests/test_github.py
uv run pytest tests/test_polymarket.py
uv run pytest tests/test_server.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 utils.format_error() for consistent MCP responses.

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