GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — docs: stop presenting the in-memory client as the way to connect by maxisbey · Pull Request #3443 · modelcontextprotocol/python-sdk Conversation
|
📚 Documentation preview
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Client(server_object) connects in-process, which is a testing technique, but much of the documentation led with it: the client page's first example, the transports page's first section, several "what Client accepts" lists, and a number of feature pages whose snippets connect that way so they can run as-is. This reframes all of that around URL and stdio as the normal ways to connect. The client page now starts a small server over HTTP and connects to it by URL, then says once that the remaining snippets build their server inline the way a test would. The transports page leads with Streamable HTTP and stdio and moves the in-memory section down, scoped to tests and embedding. Enumerations put the server object last, "in tests". Feature pages whose snippets connect in-process get one sentence saying so instead of a rewrite, and fences that define a server are no longer titled client.py. The progress page, the prior_discover example and the low-level Try-it now use real connections, since their point depends on one. A few stale statements found along the way are corrected (the callbacks page's "first argument is a transport object", the testing page's "In-process by default" heading, the Client docstring example).
52230cc to
af72034
Compare
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Review completed against the latest diff
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
No new blocking issues. Nothing in this review needs a push before merging.
1 further finding on code this push did not change was outside the scope of this re-review and not posted.
One verified lower-impact observation (a convention, logging or cleanup point) was not posted.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The previous commit left most feature pages' snippets connecting to the server object in-process and explained that away with a sentence per page. That was a disclaimer, not a fix. This replaces it: each affected page now shows its server once as server.py with the command that serves it, and every client snippet is its own client.py that connects to http://localhost:8000/mcp. Where a client has logic worth testing (the pagination loop, the caching demo) it is a function the tests drive in-process against the server module, the pattern the subscriptions page already used. Pages: the client page (one Bookshop server, six clients), protocol versions (four clients against that same server), extensions and MCP Apps (server/client pairs), pagination and caching (uvicorn-served low-level servers, the caching handler prints each real fetch), serving legacy clients (both eras from one client program over HTTP), and the inline fragments on the troubleshooting page. The framing sentences are gone.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
All reported issues were addressed across 44 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Code review found no issues
No high-confidence issues detected in this change.
2 verified lower-impact observations (convention, logging or cleanup points) were not posted.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
No-Verification-Needed: doc-only wording change in docs/troubleshooting.md
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
All reported issues were addressed across 1 file (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Code review found no issues
No high-confidence issues detected in this change.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The reader's first Client in the docs was still an inline Client(mcp) against the imported server object. Serve server.py over HTTP and connect by URL from a docs_src client file instead, like the rest of the docs now do, and move the in-memory mention into the pointer to Testing.
The entry linked down to a section whose first server.py is the ctx.elicit variant, which produces a different error. Include the resolver-based Bistro directly so the entry has its own server.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Code review found no issues
No high-confidence issues detected in this change.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.