Add mcp.types as a permanent alias for mcp_types (#3190)
This commit is contained in:
parent
923341c98a
commit
b7c9a916d6
2 changed files with 467 additions and 364 deletions
|
|
@ -6,15 +6,15 @@ asserts the response is a single ``application/json`` body with no session id.
|
|||
"""
|
||||
|
||||
import httpx2
|
||||
from mcp_types import TextContent
|
||||
from mcp_types.version import LATEST_MODERN_VERSION
|
||||
|
||||
from mcp.client import Client
|
||||
from mcp.types import TextContent
|
||||
from mcp.types.version import LATEST_MODERN_VERSION
|
||||
from stories._harness import Target, run_client
|
||||
|
||||
# The raw 2026-07-28 POST envelope: per-request `_meta` replaces the initialize handshake.
|
||||
# The key/header strings are spelled out on purpose — this is the raw-wire story. In code
|
||||
# use the named constants instead: `mcp_types.PROTOCOL_VERSION_META_KEY` /
|
||||
# use the named constants instead: `mcp.types.PROTOCOL_VERSION_META_KEY` /
|
||||
# `CLIENT_INFO_META_KEY` / `CLIENT_CAPABILITIES_META_KEY` and
|
||||
# `mcp.shared.inbound.MCP_PROTOCOL_VERSION_HEADER` (`legacy_routing/` shows that form).
|
||||
RAW_ENVELOPE_BODY: dict[str, object] = {
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
from typing import Any
|
||||
|
||||
import mcp_types as types
|
||||
from starlette.applications import Starlette
|
||||
|
||||
import mcp.types as types
|
||||
from mcp.server.context import ServerRequestContext
|
||||
from mcp.server.lowlevel import Server
|
||||
from stories._hosting import NO_DNS_REBIND, run_app_from_args
|
||||
|
|
|
|||
Loading…
Reference in a new issue