Skip to content

Commit 5462727

Browse files
committed
docs: address review feedback (nine small fixes across ten files)
A review pass left 13 comments; nine needed action and each fix is a word or a line. - testing.md over-claimed that every example runs "through exactly this client". Every example file IS exercised by the suite, but two of the 42 docs test modules never construct a Client (the OAuth examples cannot be driven that way), so it now says "almost all of them". - oauth-clients.md's "Every other example in these docs you can check with an in-memory Client(server)" had the same shape (the identity assertion example cannot be either); now "Most examples". - handling-errors.md's new hand-off promised Troubleshooting covers "every error the SDK produces". The Troubleshooting page scopes itself the honest way round, so the hand-off now matches it. - dependencies.md's closing hand-off read "State your server builds once at startup ... is the Lifespan", which garden-paths as an imperative; it gained its determiner and its head noun. - asgi.md's tip said "the next section is what host= actually controls", but this PR moved that explanation to Deploy & scale; the tip now points there. - media.md gains a relative pronoun: "the TextContent that a plain str result becomes". - README's two get-started links still pointed at the old /v2/tutorial/ URL, which this PR turns into a redirect stub; both now point at /v2/get-started/. - docs/hooks/llms_txt.py's docstring example path named the removed tutorial/ directory; it now names the moved page's real path. - RELEASE.md's list of version-pin locations gains the new docs/get-started/real-host.md (which pins the version seven times), and examples/README.md no longer claims the simple-auth pair is linked from docs/advanced/ (this PR moved every page that links it). Two other comments were already addressed by earlier commits on this branch (the chapter-to-page sweep and the branch-coverage fix), and two were declined with evidence. The claimed "sentence fragment" in media.md is a complete sentence (a contact relative clause) read one wrapped line at a time. And gating the deploy example's refund on request_state instead of input_responses would not add a human-confirmation guarantee: input_responses is a wire parameter only the MCP client can send, and that same client authors the elicitation answer on the honest second round; the SDK's own Client documents seeding input_responses on the first call.
1 parent 2996a29 commit 5462727

10 files changed

Lines changed: 13 additions & 13 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
**The documentation lives at <https://py.sdk.modelcontextprotocol.io/v2/>.**
2626

27-
It has a [Get started guide](https://py.sdk.modelcontextprotocol.io/v2/tutorial/), the [API reference](https://py.sdk.modelcontextprotocol.io/v2/api/mcp/), and the [migration guide](https://py.sdk.modelcontextprotocol.io/v2/migration/).
27+
It has a [Get started guide](https://py.sdk.modelcontextprotocol.io/v2/get-started/), the [API reference](https://py.sdk.modelcontextprotocol.io/v2/api/mcp/), and the [migration guide](https://py.sdk.modelcontextprotocol.io/v2/migration/).
2828

2929
## What is MCP?
3030

@@ -82,7 +82,7 @@ Call `add` with `a=1`, `b=2` and you get `3` back.
8282

8383
Notice what you did **not** write: no JSON Schema (`a: int, b: int` _is_ the schema), no request parsing, no validation code, no protocol handling. Two type-hinted Python functions and a docstring.
8484

85-
[Get started](https://py.sdk.modelcontextprotocol.io/v2/tutorial/) takes it from here.
85+
[Get started](https://py.sdk.modelcontextprotocol.io/v2/get-started/) takes it from here.
8686

8787
## A client in 10 lines
8888

RELEASE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ the publish job — `skip-existing` makes it skip whatever already landed. The
3535

3636
1. Update the pre-release version examples in `README.md` and the docs
3737
(grep the outgoing version — the pins live in the README Installation
38-
section, `docs/index.md`, and `docs/get-started/installation.md`) so the tagged
38+
section, `docs/index.md`, `docs/get-started/installation.md`, and `docs/get-started/real-host.md`) so the tagged
3939
commit — and therefore the README PyPI publishes — names the version
4040
being released. When entering a new phase (alpha → beta → rc), update
4141
the banner wording too.

docs/client/oauth-clients.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ You wrote none of it. Three keyword arguments remain (`timeout`, `client_metadat
8787

8888
### Try it
8989

90-
Every other example in these docs you can check with an in-memory `Client(server)`. Not this: the whole point of the flow is an HTTP `401`, and there is no HTTP between an in-memory client and its server.
90+
Most examples in these docs you can check with an in-memory `Client(server)`. Not this: the whole point of the flow is an HTTP `401`, and there is no HTTP between an in-memory client and its server.
9191

9292
The repository ships the live version. `examples/servers/simple-auth/` runs a standalone authorization server and a protected MCP server; `examples/clients/simple-auth-client/` is this page's client grown into a small CLI. Its README has the two commands: start the servers, run the client against them, and you watch the four steps go by.
9393

docs/get-started/testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ Leave it on in tests. It has no meaning in production code.
9999
failure inside the server task instead of in your test.
100100

101101
That one line is also why these docs can promise you that their examples work: every
102-
example file is exercised by the SDK's own test suite through exactly this client. You're using the
103-
same tool the SDK uses on itself.
102+
example file is exercised by the SDK's own test suite, almost all of them through exactly this
103+
client. You're using the same tool the SDK uses on itself.
104104

105105
You have a working, tested server. Putting it inside a real application (Claude Desktop, an
106106
IDE) is **[Connect to a real host](real-host.md)**; every other way to serve it is

docs/handlers/dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,4 @@ That's the right default for a precondition: no answer, no order. When declining
142142
* Bad graphs fail at registration with `InvalidSignature`, not mid-call.
143143
* Return `Elicit(message, Model)` to ask the user, only when you have to. Unwrapped annotations abort on decline; `ElicitationResult[T]` lets the tool branch.
144144

145-
State your server builds once at startup, and how a handler reaches it, is the **[Lifespan](lifespan.md)**.
145+
The state your server builds once at startup, and how a handler reaches it, is the **[Lifespan](lifespan.md)** page.

docs/hooks/llms_txt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- `llms.txt`: a markdown index of the documentation, one link per page,
66
grouped by nav section.
77
- a `.md` rendition of every prose page next to its HTML (e.g.
8-
`tutorial/tools/index.md`), which is what the llms.txt links point at.
8+
`servers/tools/index.md`), which is what the llms.txt links point at.
99
- `llms-full.txt`: every prose page concatenated for single-fetch consumption.
1010
1111
Page markdown is the source markdown with `--8<--` snippet includes resolved

docs/run/asgi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ Run the app on its own (`uvicorn server:app`) and you never think about either.
3030
!!! tip
3131
`streamable_http_app()` takes the same keyword arguments as `mcp.run("streamable-http", ...)`,
3232
minus `port`: the port belongs to whatever serves the app. `host` is still accepted but binds
33-
nothing here; the next section is what it actually controls. **[Running your server](index.md)** covers the
34-
options themselves.
33+
nothing here; **[Deploy & scale](deploy.md)** explains what it actually controls.
34+
**[Running your server](index.md)** covers the options themselves.
3535

3636
`mcp.sse_app()` does the same for the superseded SSE transport.
3737

docs/servers/handling-errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,4 @@ It means a whole class of `raise` statements you don't write: don't re-validate
131131

132132
Errors handled. That is everything a server *exposes*. What every handler can read, and do back to the client while it runs, is the next section: **[Inside your handler](../handlers/index.md)**.
133133

134-
The exact text of every error the SDK produces, what it means, and the one-move fix for each is **[Troubleshooting](../troubleshooting.md)**.
134+
The exact text of the SDK errors you are most likely to meet, what each means, and the one-move fix for each is **[Troubleshooting](../troubleshooting.md)**.

docs/servers/media.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Two things to notice:
3030

3131
!!! info
3232
`ImageContent` and `AudioContent` live in `mcp_types`, right next to the `TextContent`
33-
a plain `str` result becomes (**[Tools](tools.md)**). A tool result is a list of content blocks; `Image` and `Audio` are
33+
that a plain `str` result becomes (**[Tools](tools.md)**). A tool result is a list of content blocks; `Image` and `Audio` are
3434
the shortest way to produce the two binary kinds.
3535

3636
### Try it

examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- [`clients/`](clients/) and the remaining [`servers/`](servers/) directories
1717
(`simple-*`, `sse-polling-demo`, `structured-output-lowlevel`) — standalone
1818
v1-era projects retained pending consolidation into `stories/` (the
19-
`simple-auth` pair is still linked from `docs/advanced/`).
19+
`simple-auth` pair is still linked from `docs/run/authorization.md` and `docs/client/oauth-clients.md`).
2020

2121
For real-world servers see the
2222
[servers repository](https://github.com/modelcontextprotocol/servers).

0 commit comments

Comments
 (0)