Repository navigation
Conversation
All clients now take the server as a command plus its arguments, and identify themselves and report usage errors the same way. - Launching: pass the command that starts the server and its arguments, as Go and Rust already did. TypeScript and Ruby no longer start .py servers with bare python3, which failed for the uv-managed Python server - Client info: every client sends mcp-client-<lang> / 1.0.0 - Usage errors: printed to stderr, exit status 1 - Tools: listed once at connect time in every client (Python listed them again on each query) - Python: import sys at the top, drop the unused pathlib import - .env.example: add the missing Rust one, empty Go placeholder - Tests: the mock server rejects clients that don't send the expected client info, the smoke test launches it as a command and checks the usage error - READMEs: run commands updated for the command-plus-args form
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the changes standardizing launch commands, client identity, and usage-error handling across the five tutorial clients.
No open issues 🎉
What changed in this PR
This PR advances #269 by aligning launch commands, client identification, and usage-error handling across the five tutorial clients. Ctrl+C cleanup remains outside this PR’s scope.
Changes:
- Standardizes command-plus-arguments launching, client names and versions, and usage errors.
- Caches Python and Ruby tool lists at connection time and aligns environment-file placeholders.
- Updates launch documentation and extends smoke checks to validate usage errors and client identity.
| File | Description |
|---|---|
| weather-server-typescript/README.md | Adds the explicit server interpreter to the launch example. |
| weather-server-ruby/README.md | Adds the explicit Ruby command to the launch example. |
| weather-server-python/README.md | Documents launching the server through uv. |
| weather-server-go/README.md | Uses go run . for the client. |
| tests/smoke-test.sh | Checks usage errors and passes explicit mock-server commands. |
| tests/README.md | Updates the tool-loop test invocation. |
| tests/helpers/mock-mcp-server.ts | Validates client names and version. |
| README.md | Documents uniform command-plus-arguments launching. |
| mcp-client-typescript/README.md | Updates server launch instructions. |
| mcp-client-typescript/index.ts | Aligns launching, client identity, and usage-error handling. |
| mcp-client-rust/src/main.rs | Aligns usage text and documents existing tool caching. |
| mcp-client-rust/.env.example | Adds an empty API-key placeholder. |
| mcp-client-ruby/README.md | Updates server launch instructions. |
| mcp-client-ruby/client.rb | Aligns launching and identity, caches tools, and sends errors to stderr. |
| mcp-client-python/README.md | Updates Python and TypeScript server launch examples. |
| mcp-client-python/client.py | Aligns launching and identity, caches tools, and updates usage handling. |
| mcp-client-go/README.md | Uses go run . in launch examples. |
| mcp-client-go/main.go | Aligns client version and usage text; documents existing tool caching. |
| mcp-client-go/.env.example | Clears the API-key placeholder value. |
Review effort: Balanced
8 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Partially closing #269 (except for Ctrl+C)
All clients now take the server as a command plus its arguments, and identify themselves and report usage errors the same way.
How Has This Been Tested?
Locally.
Breaking Changes
N/a
Types of changes
Checklist
Additional context
Co-Authored-By: Claude Opus 5.5