Skip to content

Commit cc3b552

Browse files
committed
chore: merge upstream main
2 parents 7ba3a82 + 239d682 commit cc3b552

File tree

27 files changed

+363
-174
lines changed

27 files changed

+363
-174
lines changed

.github/actions/conformance/client.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,27 @@ async def run_client_credentials_basic(server_url: str) -> None:
275275
async def run_auth_code_client(server_url: str) -> None:
276276
"""Authorization code flow (default for auth/* scenarios)."""
277277
callback_handler = ConformanceOAuthCallbackHandler()
278+
storage = InMemoryTokenStorage()
279+
280+
# Check for pre-registered client credentials from context
281+
context_json = os.environ.get("MCP_CONFORMANCE_CONTEXT")
282+
if context_json:
283+
try:
284+
context = json.loads(context_json)
285+
client_id = context.get("client_id")
286+
client_secret = context.get("client_secret")
287+
if client_id:
288+
await storage.set_client_info(
289+
OAuthClientInformationFull(
290+
client_id=client_id,
291+
client_secret=client_secret,
292+
redirect_uris=[AnyUrl("http://localhost:3000/callback")],
293+
token_endpoint_auth_method="client_secret_basic" if client_secret else "none",
294+
)
295+
)
296+
logger.debug(f"Pre-loaded client credentials: client_id={client_id}")
297+
except json.JSONDecodeError:
298+
logger.exception("Failed to parse MCP_CONFORMANCE_CONTEXT")
278299

279300
oauth_auth = OAuthClientProvider(
280301
server_url=server_url,
@@ -284,7 +305,7 @@ async def run_auth_code_client(server_url: str) -> None:
284305
grant_types=["authorization_code", "refresh_token"],
285306
response_types=["code"],
286307
),
287-
storage=InMemoryTokenStorage(),
308+
storage=storage,
288309
redirect_handler=callback_handler.handle_redirect,
289310
callback_handler=callback_handler.handle_callback,
290311
client_metadata_url="https://conformance-test.local/client-metadata.json",

.github/workflows/conformance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ jobs:
4242
with:
4343
node-version: 24
4444
- run: uv sync --frozen --all-extras --package mcp
45-
- run: npx @modelcontextprotocol/conformance@0.1.10 client --command 'uv run --frozen python .github/actions/conformance/client.py' --suite all
45+
- run: npx @modelcontextprotocol/conformance@0.1.13 client --command 'uv run --frozen python .github/actions/conformance/client.py' --suite all

CLAUDE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ This document contains critical information about working with this codebase. Fo
2929
- IMPORTANT: The `tests/client/test_client.py` is the most well designed test file. Follow its patterns.
3030
- IMPORTANT: Be minimal, and focus on E2E tests: Use the `mcp.client.Client` whenever possible.
3131

32+
Test files mirror the source tree: `src/mcp/client/streamable_http.py``tests/client/test_streamable_http.py`
33+
Add tests to the existing file for that module.
34+
3235
- For commits fixing bugs or adding features based on user reports add:
3336

3437
```bash

examples/clients/simple-auth-client/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
description = "A simple OAuth client for the MCP simple-auth server"
55
readme = "README.md"
66
requires-python = ">=3.10"
7-
authors = [{ name = "Anthropic" }]
7+
authors = [{ name = "Model Context Protocol a Series of LF Projects, LLC." }]
88
keywords = ["mcp", "oauth", "client", "auth"]
99
license = { text = "MIT" }
1010
classifiers = [

examples/clients/simple-chatbot/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
description = "A simple CLI chatbot using the Model Context Protocol (MCP)"
55
readme = "README.md"
66
requires-python = ">=3.10"
7-
authors = [{ name = "Edoardo Cilia" }]
7+
authors = [{ name = "Model Context Protocol a Series of LF Projects, LLC." }]
88
keywords = ["mcp", "llm", "chatbot", "cli"]
99
license = { text = "MIT" }
1010
classifiers = [

examples/clients/simple-task-client/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
description = "A simple MCP client demonstrating task polling"
55
readme = "README.md"
66
requires-python = ">=3.10"
7-
authors = [{ name = "Anthropic, PBC." }]
7+
authors = [{ name = "Model Context Protocol a Series of LF Projects, LLC." }]
88
keywords = ["mcp", "llm", "tasks", "client"]
99
license = { text = "MIT" }
1010
classifiers = [

examples/clients/simple-task-interactive-client/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
description = "A simple MCP client demonstrating interactive task responses"
55
readme = "README.md"
66
requires-python = ">=3.10"
7-
authors = [{ name = "Anthropic, PBC." }]
7+
authors = [{ name = "Model Context Protocol a Series of LF Projects, LLC." }]
88
keywords = ["mcp", "llm", "tasks", "client", "elicitation", "sampling"]
99
license = { text = "MIT" }
1010
classifiers = [

examples/clients/sse-polling-client/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
description = "Demo client for SSE polling with auto-reconnect"
55
readme = "README.md"
66
requires-python = ">=3.10"
7-
authors = [{ name = "Anthropic, PBC." }]
7+
authors = [{ name = "Model Context Protocol a Series of LF Projects, LLC." }]
88
keywords = ["mcp", "sse", "polling", "client"]
99
license = { text = "MIT" }
1010
dependencies = ["click>=8.2.0", "mcp"]

examples/servers/everything-server/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
description = "Comprehensive MCP server implementing all protocol features for conformance testing"
55
readme = "README.md"
66
requires-python = ">=3.10"
7-
authors = [{ name = "Anthropic, PBC." }]
7+
authors = [{ name = "Model Context Protocol a Series of LF Projects, LLC." }]
88
keywords = ["mcp", "llm", "automation", "conformance", "testing"]
99
license = { text = "MIT" }
1010
dependencies = ["anyio>=4.5", "click>=8.2.0", "httpx>=0.27", "mcp", "starlette", "uvicorn"]

examples/servers/simple-auth/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
description = "A simple MCP server demonstrating OAuth authentication"
55
readme = "README.md"
66
requires-python = ">=3.10"
7-
authors = [{ name = "Anthropic, PBC." }]
7+
authors = [{ name = "Model Context Protocol a Series of LF Projects, LLC." }]
88
license = { text = "MIT" }
99
dependencies = [
1010
"anyio>=4.5",

0 commit comments

Comments
 (0)