"""
Pytest conftest for MCP tests.

Removes project root from sys.path so the installed mcp SDK package is found
instead of the project directory (mcp/) which would shadow it. Run tests with
`pip install -e ".[dev]"` from the mcp directory first.
"""

import os
import sys

_mcp_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
_repo_root = os.path.dirname(_mcp_root)
for path in (_mcp_root, _repo_root):
    while path in sys.path:
        sys.path.remove(path)
sys.path.insert(0, os.path.join(_mcp_root, "src"))
