Skip to content

Commit 4181fcc

Browse files
Rewrite docs/client.md as a code-heavy, prose-light how-to guide
Restructure the document: action-oriented H1, Imports section, section-opener concept links to the MCP overview docs (not the specification), inline example-file references instead of `> [!NOTE]` callouts, and a trailing "See also" section with cross-links plus an "Additional examples" table. New sections: Imports, Disconnecting (`terminateSession()` + `close()`), Subscribing to resource changes (`subscribeResource`/`unsubscribeResource`), Roots (`roots/list` handler, `sendRootsListChanged()`), Error handling (tool errors vs protocol errors, connection lifecycle callbacks, timeouts), and `setLoggingLevel()` folded into Notifications. All new code examples are type-checked regions in `clientGuide.examples.ts` and synced via `pnpm sync:snippets`. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d30eef9 commit 4181fcc

4 files changed

Lines changed: 324 additions & 81 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ Next steps:
128128

129129
- Local SDK docs:
130130
- [docs/server.md](docs/server.md) – building MCP servers, transports, tools/resources/prompts, sampling, elicitation, tasks, and deployment patterns.
131-
- [docs/client.md](docs/client.md)using the high-level client, transports, OAuth helpers, handling serverinitiated requests, and tasks.
132-
- [docs/faq.md](docs/faq.md)environment and troubleshooting FAQs (including Node.js Web Crypto support).
131+
- [docs/client.md](docs/client.md)building MCP clients: connecting, tools, resources, prompts, server-initiated requests, and error handling
132+
- [docs/faq.md](docs/faq.md)frequently asked questions and troubleshooting
133133
- External references:
134134
- [SDK API documentation](https://modelcontextprotocol.github.io/typescript-sdk/)
135135
- [Model Context Protocol documentation](https://modelcontextprotocol.io)

0 commit comments

Comments
 (0)