Skip to main content

Development Setup

Set up your environment for developing and testing the Arch MCP Server.
This guide is for developers who want to contribute to the project. For end users, use the simple uvx installation instead.

Prerequisites

  • Python 3.11+ - Check version: python --version
  • uv - Modern Python package manager
  • Git - Version control

Install uv

sudo pacman -S uv

Clone Repository

git clone https://github.com/nihalxkumar/arch-mcp.git
cd arch-mcp

Install Development Dependencies

uv sync
This installs all dependencies including development tools.

Testing

Run Test Suite

Verify all functionality is working:
uv run python test_server.py
Expected output:
✓ PASS: Wiki Search
✓ PASS: AUR Search
✓ PASS: Official Package Info
✓ PASS: PKGBUILD Fetch

Total: 4/4 tests passed

Test with MCP Inspector

Interactive browser-based testing - essential for development:
./test_inspector.sh
This opens a web interface where you can:
  • Test tools interactively - Call any tool with custom parameters
  • Try resources - Test URI schemes with different inputs
  • Explore prompts - See prompt workflows in action
  • Debug responses - Inspect JSON responses and errors
Use MCP Inspector during development to quickly test changes without restarting your MCP client.

Testing Checklist

Before submitting code, verify:
  • Test suite passes - uv run python test_server.py
  • MCP Inspector works - All tools return expected results
  • Arch Linux testing - Test on Arch if available
  • Non-Arch testing - Verify remote API fallbacks work
  • Error logs clean - No unexpected errors in stderr
  • Error handling - Test failure scenarios
  • Documentation updated - User-facing docs reflect changes
  • Pylance (type checking)
  • Ruff (linting)

Type Checking

# Install mypy for type checking
uv pip install mypy

# Run type checks
mypy arch_ops_server.py

Next Steps