Skip to content

Commit d54b216

Browse files
docs(auth): replace section symbol with ASCII in RFC 9728 comments
The README code snippet at L1024-1028 is run through ruff via pytest_examples. On Windows the ruff subprocess pipe defaults to cp1252 and fails to decode the \xc2\xa7 byte sequence, breaking the 10 Windows CI jobs with 'stream did not contain valid UTF-8'. Linux and macOS pipes default to UTF-8 so they passed. Replace \xc2\xa7 with the word 'section' across the four files I introduced it in. Pre-existing \xc2\xa7 references elsewhere in the tree are unaffected.
1 parent 6c0ebb5 commit d54b216

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

README.v2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,8 +1024,8 @@ mcp = MCPServer(
10241024
# Auth settings for RFC 9728 Protected Resource Metadata.
10251025
# `resource_server_url` MUST be the full public URL of the MCP endpoint, including
10261026
# the transport path (e.g. `/mcp` for streamable-http, `/sse` for sse). RFC 9728
1027-
# §3.3 requires strict equality between the client's resource identifier and the
1028-
# `resource` value advertised in the protected resource metadata.
1027+
# section 3.3 requires strict equality between the client's resource identifier and
1028+
# the `resource` value advertised in the protected resource metadata.
10291029
auth=AuthSettings(
10301030
issuer_url=AnyHttpUrl("https://auth.example.com"), # Authorization Server URL
10311031
resource_server_url=AnyHttpUrl("http://localhost:3001/mcp"), # Public MCP endpoint URL

examples/servers/simple-auth/mcp_simple_auth/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def main(port: int, auth_server: str, transport: Literal["sse", "streamable-http
128128

129129
# Create settings. server_url is the public URL of the MCP endpoint and must
130130
# include the transport path so it matches the URL the client used to reach
131-
# the server (RFC 9728 §3.3 strict equality).
131+
# the server (RFC 9728 section 3.3 strict equality).
132132
host = "localhost"
133133
transport_path = "/sse" if transport == "sse" else "/mcp"
134134
server_url = f"http://{host}:{port}{transport_path}"

examples/snippets/servers/oauth_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ async def verify_token(self, token: str) -> AccessToken | None:
2424
# Auth settings for RFC 9728 Protected Resource Metadata.
2525
# `resource_server_url` MUST be the full public URL of the MCP endpoint, including
2626
# the transport path (e.g. `/mcp` for streamable-http, `/sse` for sse). RFC 9728
27-
# §3.3 requires strict equality between the client's resource identifier and the
28-
# `resource` value advertised in the protected resource metadata.
27+
# section 3.3 requires strict equality between the client's resource identifier and
28+
# the `resource` value advertised in the protected resource metadata.
2929
auth=AuthSettings(
3030
issuer_url=AnyHttpUrl("https://auth.example.com"), # Authorization Server URL
3131
resource_server_url=AnyHttpUrl("http://localhost:3001/mcp"), # Public MCP endpoint URL

src/mcp/server/auth/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class AuthSettings(BaseModel):
3131
"Must include the transport path (e.g. https://example.com/mcp for "
3232
"streamable-http, https://example.com/sse for sse) so that the value "
3333
"advertised in protected resource metadata exactly matches the URL the "
34-
"client used to reach the server. RFC 9728 §3.3 requires strict equality "
35-
"between the client's resource identifier and this value."
34+
"client used to reach the server. RFC 9728 section 3.3 requires strict "
35+
"equality between the client's resource identifier and this value."
3636
),
3737
)

0 commit comments

Comments
 (0)