Surface skipped conformance scenarios as baselined known failures (#3030)

This commit is contained in:
Max 2026-06-30 13:07:05 +01:00 • committed by GitHub
commit 0b200ef03b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,7 +11,7 @@ import hashlib
import hmac
import json
import logging
from typing import Any
from typing import Annotated, Any
import click
from mcp.server import ServerRequestContext
@ -327,6 +327,24 @@ def test_error_handling() -> str:
raise RuntimeError("This tool intentionally returns an error for testing")
@mcp.tool()
def test_x_mcp_header(
region: Annotated[
str,
Field(
description="Mirrored into the Mcp-Param-Region header",
json_schema_extra={"x-mcp-header": "Region"},
),
] = "<none>",
) -> str:
"""Tests SEP-2243 Mcp-Param-* server-side validation.
Arms the http-custom-header-server-validation conformance scenario, which
skips when no tool with an `x-mcp-header` annotation is found.
"""
return f"region={region}"
@mcp.tool()
async def test_missing_capability(ctx: Context) -> str:
"""Tests that a handler-raised MISSING_REQUIRED_CLIENT_CAPABILITY surfaces as a top-level JSON-RPC error.