Add mcp.types as a permanent alias for mcp_types (#3190)
This commit is contained in:
parent
923341c98a
commit
b7c9a916d6
3 changed files with 467 additions and 364 deletions
|
|
@ -2,12 +2,11 @@
|
|||
|
||||
from typing import Any
|
||||
|
||||
import mcp_types as types
|
||||
from mcp_types import CLIENT_CAPABILITIES_META_KEY, CLIENT_INFO_META_KEY, PROTOCOL_VERSION_META_KEY
|
||||
from mcp_types.version import LATEST_HANDSHAKE_VERSION, LATEST_MODERN_VERSION
|
||||
|
||||
import mcp.types as types
|
||||
from mcp.client import Client
|
||||
from mcp.shared.inbound import MCP_METHOD_HEADER, MCP_PROTOCOL_VERSION_HEADER, InboundLadderRejection
|
||||
from mcp.types import CLIENT_CAPABILITIES_META_KEY, CLIENT_INFO_META_KEY, PROTOCOL_VERSION_META_KEY
|
||||
from mcp.types.version import LATEST_HANDSHAKE_VERSION, LATEST_MODERN_VERSION
|
||||
from stories._harness import TargetFactory, run_client
|
||||
|
||||
from .server import classify_era
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
from collections.abc import Mapping
|
||||
from typing import Any, Literal
|
||||
|
||||
from mcp_types import INVALID_PARAMS
|
||||
from mcp_types.version import MODERN_PROTOCOL_VERSIONS
|
||||
from starlette.applications import Starlette
|
||||
from starlette.middleware.cors import CORSMiddleware
|
||||
|
||||
from mcp.server.mcpserver import Context, MCPServer
|
||||
from mcp.shared.inbound import InboundLadderRejection, InboundModernRoute, classify_inbound_request
|
||||
from mcp.types import INVALID_PARAMS
|
||||
from mcp.types.version import MODERN_PROTOCOL_VERSIONS
|
||||
from stories._hosting import NO_DNS_REBIND, run_app_from_args
|
||||
|
||||
#: Response headers a browser-based MCP client must be able to read.
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
from typing import Any
|
||||
|
||||
import mcp_types as types
|
||||
from mcp_types.version import MODERN_PROTOCOL_VERSIONS
|
||||
from starlette.applications import Starlette
|
||||
from starlette.middleware.cors import CORSMiddleware
|
||||
|
||||
import mcp.types as types
|
||||
from mcp.server.context import ServerRequestContext
|
||||
from mcp.server.lowlevel import Server
|
||||
from mcp.types.version import MODERN_PROTOCOL_VERSIONS
|
||||
from stories._hosting import NO_DNS_REBIND, run_app_from_args
|
||||
|
||||
from .server import MCP_ALLOWED_HEADERS, MCP_ALLOWED_METHODS, MCP_EXPOSED_HEADERS
|
||||
|
|
|
|||
Loading…
Reference in a new issue