# File: src/mcp/server/stdio.py
# Purpose: Provide async context managers for stdio-based MCP server tests.
# Context: Used by lightweight MCP runners that only need stubbed stdio
#          resources during integration and contract testing.

"""Async stdio helpers for lightweight MCP server scenarios.

Purpose:
    Expose stubbed async context managers that mimic stdio handles.
Context:
    Imported by tests that require a predictable stdio interface without
    spawning subprocesses or touching real file descriptors.
Side Effects:
    None.
"""

from __future__ import annotations

from collections.abc import AsyncIterator
from contextlib import asynccontextmanager


@asynccontextmanager
async def stdio_server() -> AsyncIterator[tuple[None, None]]:
    """Yield placeholder stdio handles for MCP server tests.

    Purpose:
        Provide deterministic stdio stand-ins for integration tests.

    Yields:
        tuple: A pair of `None` objects representing read and write streams.
    Side Effects:
        None.
    """

    yield (None, None)
