Skip to content

Commit bf7ab5f

Browse files
Apply ruff formatting
1 parent 992df59 commit bf7ab5f

File tree

3 files changed

+3
-2
lines changed
  • examples/servers
    • simple-streamablehttp-stateless/mcp_simple_streamablehttp_stateless
    • simple-streamablehttp/mcp_simple_streamablehttp

3 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,7 @@ starlette_app = CORSMiddleware(
734734
```
735735

736736
This configuration is necessary because:
737+
737738
- The MCP streamable HTTP transport uses the `Mcp-Session-Id` header for session management
738739
- Browsers restrict access to response headers unless explicitly exposed via CORS
739740
- Without this configuration, browser-based clients won't be able to read the session ID from initialization responses

examples/servers/simple-streamablehttp-stateless/mcp_simple_streamablehttp_stateless/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ async def lifespan(app: Starlette) -> AsyncIterator[None]:
132132
],
133133
lifespan=lifespan,
134134
)
135-
135+
136136
# Wrap ASGI application with CORS middleware to expose Mcp-Session-Id header
137137
# for browser-based clients (ensures 500 errors get proper CORS headers)
138138
starlette_app = CORSMiddleware(

examples/servers/simple-streamablehttp/mcp_simple_streamablehttp/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ async def lifespan(app: Starlette) -> AsyncIterator[None]:
160160
],
161161
lifespan=lifespan,
162162
)
163-
163+
164164
# Wrap ASGI application with CORS middleware to expose Mcp-Session-Id header
165165
# for browser-based clients (ensures 500 errors get proper CORS headers)
166166
starlette_app = CORSMiddleware(

0 commit comments

Comments
 (0)