Skip to content

Update the README to provide clearer instructions on how to add the l… - #155

Merged
varun06 merged 2 commits into
modelcontextprotocol:mainfrom
akring:main
Oct 24, 2026
Merged

varun06 merged 2 commits into
modelcontextprotocol:mainfrom
akring:main

Conversation

@akring

@akring akring commented Aug 20, 2025

Copy link
Copy Markdown

Made a few updates to the logger examples.

Motivation and Context

Updated the README example for adding the logger. It was a bit abrupt and missing some steps.

How Has This Been Tested?

This is pure paperwork and we can check it directly through the web.

Breaking Changes

No.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@toasterbook88

Copy link
Copy Markdown

Maintainer triage on February 24, 2026: low-risk merge candidate (README-only, mergeable, no failing checks).

@varun06
varun06 requested a review from a team as a code owner October 24, 2026 14:01
@varun06
varun06 merged commit 33a591d into modelcontextprotocol:main Oct 24, 2026
6 checks passed
@varun06 varun06 mentioned this pull request Nov 15, 2026
1 task done
andreyvelich pushed a commit that referenced this pull request Nov 15, 2026
Fixes README examples that don't compile against the current API, and
updates facts that have drifted from the code.

Examples (all Swift snippets now type-check against the library):
- Tool content patterns: `.text`/`.image`/`.audio` have four associated
  values; drop the old `metadata` width/height logic.
- Completion and prompt arguments are `[String: String]`: remove
  `.string(...)` / `.stringValue`.
- Elicitation `requestedSchema` is not optional.
- Cancellation: `callTool`/`send` need `await` from outside the actor,
  and the `RequestContext` overload needs a type annotation.
- Batching: collect tasks in an actor instead of mutating a captured
  `var` in the `@Sendable` closure.
- Replace deprecated `Tool.Content.text(_:)` with
  `.text(text:annotations:_meta:)`.
- Graceful shutdown: `Duration` has no `.days`, and ServiceLifecycle's
  `Service` only requires `run()`. Wait on `server.waitUntilCompleted()`
  and stop the server from `withGracefulShutdownHandler`.
- `Tool` requires `inputSchema`; give the `customer-support` prompt a
  real implementation.

Facts:
- Requirements: Swift 6.1+ (Xcode 16.3+); install from 0.12.0.
- Client stdio: `StdioTransport()` uses the current process's stdio;
  show how to connect to a server subprocess through its pipes.
- Sampling and elicitation are client capabilities: show the client
  declaring them, and remove `sampling:` from `Server` capabilities.
- Batching was removed from the spec in 2025-06-18.
- Transports table: link 2025-11-25 spec, Linux glibc and musl, SSE on
  Apple platforms only, stateless server limits, NetworkTransport is a
  custom transport with heartbeats and reconnection on by default.
- Authentication: CIMD, token refresh and scope step-up; warn about the
  default random-port redirect URI; keep `OriginValidator` and
  `ProtocolVersionValidator` in custom pipelines and show where the
  pipeline is passed.
- Platform availability: list Linux limitations.
- Debugging: log to standard error (stdout carries MCP messages for
  stdio servers), pass the logger to the transport, and give the client
  and the server their own transports (follow-up to #155).
- TOC: add Custom Transport Implementation; fix heading levels.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants