Skip to content

Commit a6693d9

Browse files
committed
Fix typos found by codespell: requestor -> requester, Implementors -> Implementers
1 parent 616476f commit a6693d9

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/mcp/server/auth/provider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class OAuthAuthorizationServerProvider(Protocol, Generic[AuthorizationCodeT, Ref
111111
async def get_client(self, client_id: str) -> OAuthClientInformationFull | None:
112112
"""Retrieves client information by client ID.
113113
114-
Implementors MAY raise NotImplementedError if dynamic client registration is
114+
Implementers MAY raise NotImplementedError if dynamic client registration is
115115
disabled in ClientRegistrationOptions.
116116
117117
Args:
@@ -124,7 +124,7 @@ async def get_client(self, client_id: str) -> OAuthClientInformationFull | None:
124124
async def register_client(self, client_info: OAuthClientInformationFull) -> None:
125125
"""Saves client information as part of registering it.
126126
127-
Implementors MAY raise NotImplementedError if dynamic client registration is
127+
Implementers MAY raise NotImplementedError if dynamic client registration is
128128
disabled in ClientRegistrationOptions.
129129
130130
Args:

src/mcp/server/sse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ async def handle_post_message(self, scope: Scope, receive: Receive, send: Send)
232232
return await response(scope, receive, send)
233233

234234
user = scope.get("user")
235-
requestor = authorization_context(user) if isinstance(user, AuthenticatedUser) else None
236-
if requestor != self._session_owners.get(session_id):
235+
requester = authorization_context(user) if isinstance(user, AuthenticatedUser) else None
236+
if requester != self._session_owners.get(session_id):
237237
# A session can only be used with the credential that created it.
238238
# Respond exactly as if the session did not exist.
239239
logger.warning("Rejecting message for session %s: credential does not match", session_id)

src/mcp/server/streamable_http_manager.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,12 @@ async def _handle_stateful_request(self, scope: Scope, receive: Receive, send: S
197197
request_mcp_session_id = request.headers.get(MCP_SESSION_ID_HEADER)
198198

199199
user = scope.get("user")
200-
requestor = authorization_context(user) if isinstance(user, AuthenticatedUser) else None
200+
requester = authorization_context(user) if isinstance(user, AuthenticatedUser) else None
201201

202202
# Existing session case
203203
if request_mcp_session_id is not None and request_mcp_session_id in self._server_instances:
204204
transport = self._server_instances[request_mcp_session_id]
205-
if requestor != self._session_owners.get(request_mcp_session_id):
205+
if requester != self._session_owners.get(request_mcp_session_id):
206206
# A session can only be used with the credential that created
207207
# it. Respond exactly as if the session did not exist.
208208
logger.warning(
@@ -240,8 +240,8 @@ async def _handle_stateful_request(self, scope: Scope, receive: Receive, send: S
240240
)
241241

242242
assert http_transport.mcp_session_id is not None
243-
if requestor is not None:
244-
self._session_owners[http_transport.mcp_session_id] = requestor
243+
if requester is not None:
244+
self._session_owners[http_transport.mcp_session_id] = requester
245245
self._server_instances[http_transport.mcp_session_id] = http_transport
246246
logger.info(f"Created new transport with session ID: {new_session_id}")
247247

src/mcp/types/_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ class TaskStatusNotificationParams(NotificationParams, Task):
534534

535535

536536
class TaskStatusNotification(Notification[TaskStatusNotificationParams, Literal["notifications/tasks/status"]]):
537-
"""An optional notification from the receiver to the requestor, informing them that a task's status has changed.
537+
"""An optional notification from the receiver to the requester, informing them that a task's status has changed.
538538
Receivers are not required to send these notifications.
539539
"""
540540

0 commit comments

Comments
 (0)