Ola Hungerford
8e373f0f2e
Add structured content to the Python weather server and client and update to v2 ( #164 )
...
* Add structured output to the Python weather server and client
Both tools declare an output schema - the return type annotation - and return
structured_content alongside the text.
get_alerts answers with a top-level JSON array rather than an array nested in
an object, which protocol revision 2026-07-28 is the first to allow. "No
alerts" is simply []. get_forecast returns an object, for contrast.
The detail worth reading the source for: Alerts is a RootModel[list[Alert]],
not a plain list[Alert]. A list is not a JSON object, so the SDK wraps it as
{"result": [...]} and advertises an object-rooted schema to match, with no
opt-out. A RootModel is a BaseModel, so it is taken as the schema exactly as
written, and a RootModel over a list serializes as the bare list.
Error paths raise: a tool declaring an output schema MUST return conforming
structured content, so a path with no data has to fail.
The client moves to the 2.0 Client API with mode="auto" and prints the
negotiated version on connect. call_tool already revalidates every non-error
result against the declared schema, so the client-side SHOULD needs no code.
Each channel goes to its stated reader: content is forwarded to the model,
structured_content is used as data, reporting how many items came back.
This clears the staleness modelcontextprotocol#3124 flags against this
repository - weather.py imported mcp.server.fastmcp, client.py held the
ClientSession version - and matches that PR's idioms: the short
"from mcp.server import MCPServer" spelling, httpx2 with httpx dropped from
the dependencies since httpx2>=2.5.0 is a hard dependency of mcp,
result.content narrowed to TextContent, and input() on a worker thread.
Requires mcp 2.0.0b2; pyproject.toml sets [tool.uv] prerelease = "allow" so
plain uv run and uv sync work without flags. Model identifier moves to
claude-sonnet-5.
Note that an array-rooted schema only works on a 2026-07-28 connection. This
SDK does not project it down for older clients; it raises server-side instead.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Update to mcp 2.0.0
The SDK left beta on 2026-07-28, so the pins move off 2.0.0b2 and both
projects drop `[tool.uv] prerelease = allow` — plain `uv run` works now.
Also from review: declare the imports rather than lean on transitive
resolution. weather.py imports httpx2 and client.py imports mcp_types, so
both are listed explicitly. The client README no longer implies every
structured result is counted — only array-rooted ones are.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Fix get_alerts failing when NWS sends a null field
`dict.get(key, default)` returns the default only when the key is absent. The
NWS API sends these fields as explicit nulls instead of omitting them, so
`props.get(instruction, ...)` passed None straight into a `str` field and
Pydantic rejected the whole result.
One alert in eight for TX is a Special Weather Statement with a null
instruction, which was enough to fail the entire call:
Error executing tool get_alerts: 1 validation error for Alert
instructions
Input should be a valid string [type=string_type, input_value=None]
The smoke test missed it twice over: it calls get_alerts with CA, whose
alerts happen to have no nulls today, and it reports an isError result as a
skip rather than a failure.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Say "structured content", not "structured output"
The spec never uses the phrase "structured output". It defines two separate
things under Tool Result: "Structured Content" (the `structuredContent` field)
and "Output Schema" (the `outputSchema` field). Collapsing them into
"structured output" conflates the two.
It is also actively confusing here. In LLM tooling "structured output" means
constrained decoding — making the *model* emit conforming JSON. These clients
call a model API, so a reader could reasonably take the phrase to mean the
tool constrains the model's response, which is the opposite of what is going
on: the tool describes the shape of its own result.
Headings and prose now say "structured content". References to real
identifiers are left alone: the Python SDK's own docs page is called
Structured Output and lives at docs/servers/structured-output.md, and its
decorator parameter is `structured_output`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 14:46:03 +02:00
Ola Hungerford
f587167452
Assert on structured output in the smoke tests and update to v2 ( #163 )
...
* Assert on structured output in the smoke tests
The smoke tests connected to each server, listed its tools and stopped there,
so they could not catch a broken structured result.
mcp-test-client now calls every tool that declares an outputSchema and checks
the answer against it: the result must carry structuredContent, and a tool
with an array-rooted schema must return a top-level JSON array rather than an
object wrapping one. Tools with no output schema are left alone, so this is
not a new requirement on any example. The client negotiates with mode "auto",
so it exercises servers of either protocol era. Tool calls reach the live NWS
API; an error result is reported as a skip rather than a failure.
mock-mcp-server moves to the low-level Server and advertises one array-rooted
and one object-rooted tool, with the schemas written out literally. A client
that compiles every declared outputSchema at connect time fails against the
array-rooted one if it assumes output schemas are always objects.
utils.sh no longer swallows build output. A failed build left no binary behind
and the test reported a downstream spawn ENOENT instead of the compiler error,
which is what makes a broken build hard to diagnose from CI logs; #143 is the
current example. check_dependency returns instead of exiting, so a missing
toolchain fails its own test and the suite still prints its summary. Binaries
resolve through a helper that accounts for the .exe suffix.
The test helpers move to the 2.0 MCP SDK packages, where the 2026-07-28
support lives; the examples themselves are untouched. Those require Node 20 or
newer, so CI moves off Node 18 to Node 24, the Active LTS - Node 20 reached
end of life in April 2026.
The Go examples and the Rust client stay uncovered here. Both clients abort
when no .env file is present, so that coverage lands with those examples.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Update to the stable 2.0 SDK packages and address review feedback
@modelcontextprotocol/{client,server} 2.0.0 shipped on 2026-07-27, so the
helpers move off 2.0.0-beta.5.
Review fixes:
- strip the UTF-8 BOM that preceded smoke-test.sh's shebang
- ensure_built and ensure_helpers_built return rather than exit, so one
project failing to build no longer aborts the suite before the summary
- engines.node and the documented Node requirement go to 20, matching what
the 2.0 SDK packages actually require
- close the client on the failure path, so a failing test cannot leave the
spawned server running
- the README claimed Go and Rust client coverage that did not exist
Adds the Go weather server to the smoke test, with the Go toolchain CI was
missing. The Go and Rust clients stay uncovered: on main both abort without
a .env, so credential-free startup has to land in their own directories.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-03 19:42:57 +02:00
Alex Akimov
7b7f81e4c8
Merge pull request #162 from modelcontextprotocol/dependabot/npm_and_yarn/mcp-client-typescript/npm_and_yarn-841e2b793f
...
Bump the npm_and_yarn group across 3 directories with 2 updates
2026-07-23 23:07:01 +02:00
dependabot[bot]
43e8923a2f
Bump the npm_and_yarn group across 3 directories with 2 updates
...
Bumps the npm_and_yarn group with 2 updates in the /mcp-client-typescript directory: [fast-uri](https://github.com/fastify/fast-uri ) and [hono](https://github.com/honojs/hono ).
Bumps the npm_and_yarn group with 2 updates in the /tests/helpers directory: [fast-uri](https://github.com/fastify/fast-uri ) and [hono](https://github.com/honojs/hono ).
Bumps the npm_and_yarn group with 2 updates in the /weather-server-typescript directory: [fast-uri](https://github.com/fastify/fast-uri ) and [hono](https://github.com/honojs/hono ).
Updates `fast-uri` from 3.1.2 to 3.1.4
- [Release notes](https://github.com/fastify/fast-uri/releases )
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.2...v3.1.4 )
Updates `hono` from 4.12.25 to 4.12.31
- [Release notes](https://github.com/honojs/hono/releases )
- [Commits](https://github.com/honojs/hono/compare/v4.12.25...v4.12.31 )
Updates `fast-uri` from 3.1.2 to 3.1.4
- [Release notes](https://github.com/fastify/fast-uri/releases )
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.2...v3.1.4 )
Updates `hono` from 4.12.25 to 4.12.31
- [Release notes](https://github.com/honojs/hono/releases )
- [Commits](https://github.com/honojs/hono/compare/v4.12.25...v4.12.31 )
Updates `fast-uri` from 3.1.2 to 3.1.4
- [Release notes](https://github.com/fastify/fast-uri/releases )
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.2...v3.1.4 )
Updates `hono` from 4.12.25 to 4.12.31
- [Release notes](https://github.com/honojs/hono/releases )
- [Commits](https://github.com/honojs/hono/compare/v4.12.25...v4.12.31 )
---
updated-dependencies:
- dependency-name: fast-uri
dependency-version: 3.1.4
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: hono
dependency-version: 4.12.31
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: fast-uri
dependency-version: 3.1.4
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: hono
dependency-version: 4.12.31
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: fast-uri
dependency-version: 3.1.4
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: hono
dependency-version: 4.12.31
dependency-type: indirect
dependency-group: npm_and_yarn
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-07-23 15:14:04 +00:00
Alex Akimov
08d99ed34c
Merge pull request #161 from modelcontextprotocol/dependabot/npm_and_yarn/mcp-client-typescript/npm_and_yarn-7e3c182b7c
...
Bump the npm_and_yarn group across 3 directories with 1 update
2026-07-23 17:11:48 +02:00
dependabot[bot]
4cd6e3cfac
Bump the npm_and_yarn group across 3 directories with 1 update
...
Bumps the npm_and_yarn group with 1 update in the /mcp-client-typescript directory: [body-parser](https://github.com/expressjs/body-parser ).
Bumps the npm_and_yarn group with 1 update in the /tests/helpers directory: [body-parser](https://github.com/expressjs/body-parser ).
Bumps the npm_and_yarn group with 1 update in the /weather-server-typescript directory: [body-parser](https://github.com/expressjs/body-parser ).
Updates `body-parser` from 2.2.2 to 2.3.0
- [Release notes](https://github.com/expressjs/body-parser/releases )
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md )
- [Commits](https://github.com/expressjs/body-parser/compare/v2.2.2...v2.3.0 )
Updates `body-parser` from 2.2.2 to 2.3.0
- [Release notes](https://github.com/expressjs/body-parser/releases )
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md )
- [Commits](https://github.com/expressjs/body-parser/compare/v2.2.2...v2.3.0 )
Updates `body-parser` from 2.2.2 to 2.3.0
- [Release notes](https://github.com/expressjs/body-parser/releases )
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md )
- [Commits](https://github.com/expressjs/body-parser/compare/v2.2.2...v2.3.0 )
---
updated-dependencies:
- dependency-name: body-parser
dependency-version: 2.3.0
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: body-parser
dependency-version: 2.3.0
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: body-parser
dependency-version: 2.3.0
dependency-type: indirect
dependency-group: npm_and_yarn
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-07-21 22:10:09 +00:00
Alex Akimov
206ddfe774
Merge pull request #160 from modelcontextprotocol/dependabot/uv/mcp-client-python/uv-9fe5b90e09
...
Bump the uv group across 2 directories with 1 update
2026-07-18 20:00:38 +02:00
dependabot[bot]
b14bf6ee71
Bump the uv group across 2 directories with 1 update
...
Bumps the uv group with 1 update in the /mcp-client-python directory: [mcp](https://github.com/modelcontextprotocol/python-sdk ).
Bumps the uv group with 1 update in the /weather-server-python directory: [mcp](https://github.com/modelcontextprotocol/python-sdk ).
Updates `mcp` from 1.27.2 to 1.28.1
- [Release notes](https://github.com/modelcontextprotocol/python-sdk/releases )
- [Changelog](https://github.com/modelcontextprotocol/python-sdk/blob/main/RELEASE.md )
- [Commits](https://github.com/modelcontextprotocol/python-sdk/compare/v1.27.2...v1.28.1 )
Updates `mcp` from 1.27.2 to 1.28.1
- [Release notes](https://github.com/modelcontextprotocol/python-sdk/releases )
- [Changelog](https://github.com/modelcontextprotocol/python-sdk/blob/main/RELEASE.md )
- [Commits](https://github.com/modelcontextprotocol/python-sdk/compare/v1.27.2...v1.28.1 )
---
updated-dependencies:
- dependency-name: mcp
dependency-version: 1.28.1
dependency-type: direct:production
dependency-group: uv
- dependency-name: mcp
dependency-version: 1.28.1
dependency-type: indirect
dependency-group: uv
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-07-18 17:44:14 +00:00
Alex Akimov
1908637b47
Merge pull request #159 from modelcontextprotocol/dependabot/uv/mcp-client-python/uv-ca46f69960
...
Bump the uv group across 2 directories with 1 update
2026-07-18 19:42:04 +02:00
dependabot[bot]
95643d21c4
Bump the uv group across 2 directories with 1 update
...
Bumps the uv group with 1 update in the /mcp-client-python directory: [mcp](https://github.com/modelcontextprotocol/python-sdk ).
Bumps the uv group with 1 update in the /weather-server-python directory: [mcp](https://github.com/modelcontextprotocol/python-sdk ).
Updates `mcp` from 1.26.0 to 1.27.2
- [Release notes](https://github.com/modelcontextprotocol/python-sdk/releases )
- [Changelog](https://github.com/modelcontextprotocol/python-sdk/blob/main/RELEASE.md )
- [Commits](https://github.com/modelcontextprotocol/python-sdk/compare/v1.26.0...v1.27.2 )
Updates `mcp` from 1.26.0 to 1.27.2
- [Release notes](https://github.com/modelcontextprotocol/python-sdk/releases )
- [Changelog](https://github.com/modelcontextprotocol/python-sdk/blob/main/RELEASE.md )
- [Commits](https://github.com/modelcontextprotocol/python-sdk/compare/v1.26.0...v1.27.2 )
---
updated-dependencies:
- dependency-name: mcp
dependency-version: 1.27.2
dependency-type: direct:production
dependency-group: uv
- dependency-name: mcp
dependency-version: 1.27.2
dependency-type: indirect
dependency-group: uv
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-07-16 20:11:59 +00:00
Alex Akimov
537f4f4ab7
Merge pull request #156 from modelcontextprotocol/dependabot/uv/mcp-client-python/uv-f91fb4a500
...
Bump the uv group across 2 directories with 1 update
2026-07-08 08:08:18 +02:00
dependabot[bot]
e93a3a26ba
Bump the uv group across 2 directories with 1 update
...
Bumps the uv group with 1 update in the /mcp-client-python directory: [pydantic-settings](https://github.com/pydantic/pydantic-settings ).
Bumps the uv group with 1 update in the /weather-server-python directory: [pydantic-settings](https://github.com/pydantic/pydantic-settings ).
Updates `pydantic-settings` from 2.13.1 to 2.14.2
- [Release notes](https://github.com/pydantic/pydantic-settings/releases )
- [Commits](https://github.com/pydantic/pydantic-settings/compare/v2.13.1...v2.14.2 )
Updates `pydantic-settings` from 2.13.1 to 2.14.2
- [Release notes](https://github.com/pydantic/pydantic-settings/releases )
- [Commits](https://github.com/pydantic/pydantic-settings/compare/v2.13.1...v2.14.2 )
---
updated-dependencies:
- dependency-name: pydantic-settings
dependency-version: 2.14.2
dependency-type: indirect
dependency-group: uv
- dependency-name: pydantic-settings
dependency-version: 2.14.2
dependency-type: indirect
dependency-group: uv
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-07-06 14:16:25 +00:00
Alex Akimov
d236f40498
Merge pull request #155 from modelcontextprotocol/dependabot/npm_and_yarn/mcp-client-typescript/npm_and_yarn-16bb2eed6a
...
Bump the npm_and_yarn group across 3 directories with 2 updates
2026-07-06 16:15:23 +02:00
Alex Akimov
512fde725b
Merge pull request #154 from modelcontextprotocol/dependabot/uv/mcp-client-python/uv-131a5f6976
...
Bump the uv group across 2 directories with 3 updates
2026-07-06 16:14:03 +02:00
dependabot[bot]
ecd35dab97
Bump the npm_and_yarn group across 3 directories with 2 updates
...
Bumps the npm_and_yarn group with 2 updates in the /mcp-client-typescript directory: [form-data](https://github.com/form-data/form-data ) and [hono](https://github.com/honojs/hono ).
Bumps the npm_and_yarn group with 1 update in the /tests/helpers directory: [hono](https://github.com/honojs/hono ).
Bumps the npm_and_yarn group with 1 update in the /weather-server-typescript directory: [hono](https://github.com/honojs/hono ).
Updates `form-data` from 4.0.4 to 4.0.6
- [Release notes](https://github.com/form-data/form-data/releases )
- [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md )
- [Commits](https://github.com/form-data/form-data/compare/v4.0.4...v4.0.6 )
Updates `hono` from 4.12.23 to 4.12.25
- [Release notes](https://github.com/honojs/hono/releases )
- [Commits](https://github.com/honojs/hono/compare/v4.12.23...v4.12.25 )
Updates `hono` from 4.12.23 to 4.12.25
- [Release notes](https://github.com/honojs/hono/releases )
- [Commits](https://github.com/honojs/hono/compare/v4.12.23...v4.12.25 )
Updates `hono` from 4.12.23 to 4.12.25
- [Release notes](https://github.com/honojs/hono/releases )
- [Commits](https://github.com/honojs/hono/compare/v4.12.23...v4.12.25 )
---
updated-dependencies:
- dependency-name: form-data
dependency-version: 4.0.6
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: hono
dependency-version: 4.12.25
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: hono
dependency-version: 4.12.25
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: hono
dependency-version: 4.12.25
dependency-type: indirect
dependency-group: npm_and_yarn
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-06-16 17:49:19 +00:00
dependabot[bot]
b879b483ab
Bump the uv group across 2 directories with 3 updates
...
Bumps the uv group with 3 updates in the /mcp-client-python directory: [cryptography](https://github.com/pyca/cryptography ), [python-multipart](https://github.com/Kludex/python-multipart ) and [starlette](https://github.com/Kludex/starlette ).
Bumps the uv group with 3 updates in the /weather-server-python directory: [cryptography](https://github.com/pyca/cryptography ), [python-multipart](https://github.com/Kludex/python-multipart ) and [starlette](https://github.com/Kludex/starlette ).
Updates `cryptography` from 46.0.7 to 48.0.1
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst )
- [Commits](https://github.com/pyca/cryptography/compare/46.0.7...48.0.1 )
Updates `python-multipart` from 0.0.27 to 0.0.31
- [Release notes](https://github.com/Kludex/python-multipart/releases )
- [Changelog](https://github.com/Kludex/python-multipart/blob/main/CHANGELOG.md )
- [Commits](https://github.com/Kludex/python-multipart/compare/0.0.27...0.0.31 )
Updates `starlette` from 1.0.1 to 1.3.1
- [Release notes](https://github.com/Kludex/starlette/releases )
- [Changelog](https://github.com/Kludex/starlette/blob/main/docs/release-notes.md )
- [Commits](https://github.com/Kludex/starlette/compare/1.0.1...1.3.1 )
Updates `cryptography` from 46.0.7 to 48.0.1
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst )
- [Commits](https://github.com/pyca/cryptography/compare/46.0.7...48.0.1 )
Updates `python-multipart` from 0.0.27 to 0.0.31
- [Release notes](https://github.com/Kludex/python-multipart/releases )
- [Changelog](https://github.com/Kludex/python-multipart/blob/main/CHANGELOG.md )
- [Commits](https://github.com/Kludex/python-multipart/compare/0.0.27...0.0.31 )
Updates `starlette` from 1.0.1 to 1.3.1
- [Release notes](https://github.com/Kludex/starlette/releases )
- [Changelog](https://github.com/Kludex/starlette/blob/main/docs/release-notes.md )
- [Commits](https://github.com/Kludex/starlette/compare/1.0.1...1.3.1 )
---
updated-dependencies:
- dependency-name: cryptography
dependency-version: 48.0.1
dependency-type: indirect
dependency-group: uv
- dependency-name: python-multipart
dependency-version: 0.0.31
dependency-type: indirect
dependency-group: uv
- dependency-name: starlette
dependency-version: 1.3.1
dependency-type: indirect
dependency-group: uv
- dependency-name: cryptography
dependency-version: 48.0.1
dependency-type: indirect
dependency-group: uv
- dependency-name: python-multipart
dependency-version: 0.0.31
dependency-type: indirect
dependency-group: uv
- dependency-name: starlette
dependency-version: 1.3.1
dependency-type: indirect
dependency-group: uv
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-06-16 17:47:55 +00:00
Alex Akimov
2497b1d5de
Merge pull request #152 from modelcontextprotocol/dependabot/uv/mcp-client-python/uv-1074aaa37a
...
Bump the uv group across 2 directories with 1 update
2026-06-16 19:42:19 +02:00
dependabot[bot]
848831dceb
Bump the uv group across 2 directories with 1 update
...
Bumps the uv group with 1 update in the /mcp-client-python directory: [pyjwt](https://github.com/jpadilla/pyjwt ).
Bumps the uv group with 1 update in the /weather-server-python directory: [pyjwt](https://github.com/jpadilla/pyjwt ).
Updates `pyjwt` from 2.12.1 to 2.13.0
- [Release notes](https://github.com/jpadilla/pyjwt/releases )
- [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst )
- [Commits](https://github.com/jpadilla/pyjwt/compare/2.12.1...2.13.0 )
Updates `pyjwt` from 2.12.1 to 2.13.0
- [Release notes](https://github.com/jpadilla/pyjwt/releases )
- [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst )
- [Commits](https://github.com/jpadilla/pyjwt/compare/2.12.1...2.13.0 )
---
updated-dependencies:
- dependency-name: pyjwt
dependency-version: 2.13.0
dependency-type: indirect
dependency-group: uv
- dependency-name: pyjwt
dependency-version: 2.13.0
dependency-type: indirect
dependency-group: uv
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-06-16 03:51:21 +00:00
Alex Akimov
d33e8c922e
Merge pull request #149 from modelcontextprotocol/dependabot/npm_and_yarn/mcp-client-typescript/npm_and_yarn-6ec0fba70c
...
Bump the npm_and_yarn group across 3 directories with 1 update
2026-06-04 22:10:58 +02:00
Alex Akimov
dfb3794104
Merge pull request #148 from modelcontextprotocol/dependabot/uv/mcp-client-python/uv-884d536faf
...
Bump the uv group across 2 directories with 1 update
2026-06-04 22:10:27 +02:00
dependabot[bot]
5992870551
Bump the npm_and_yarn group across 3 directories with 1 update
...
Bumps the npm_and_yarn group with 1 update in the /mcp-client-typescript directory: [hono](https://github.com/honojs/hono ).
Bumps the npm_and_yarn group with 1 update in the /tests/helpers directory: [hono](https://github.com/honojs/hono ).
Bumps the npm_and_yarn group with 1 update in the /weather-server-typescript directory: [hono](https://github.com/honojs/hono ).
Updates `hono` from 4.12.18 to 4.12.23
- [Release notes](https://github.com/honojs/hono/releases )
- [Commits](https://github.com/honojs/hono/compare/v4.12.18...v4.12.23 )
Updates `hono` from 4.12.18 to 4.12.23
- [Release notes](https://github.com/honojs/hono/releases )
- [Commits](https://github.com/honojs/hono/compare/v4.12.18...v4.12.23 )
Updates `hono` from 4.12.18 to 4.12.23
- [Release notes](https://github.com/honojs/hono/releases )
- [Commits](https://github.com/honojs/hono/compare/v4.12.18...v4.12.23 )
---
updated-dependencies:
- dependency-name: hono
dependency-version: 4.12.23
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: hono
dependency-version: 4.12.23
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: hono
dependency-version: 4.12.23
dependency-type: indirect
dependency-group: npm_and_yarn
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-06-04 18:40:16 +00:00
dependabot[bot]
28af746e9b
Bump the uv group across 2 directories with 1 update
...
Bumps the uv group with 1 update in the /mcp-client-python directory: [starlette](https://github.com/Kludex/starlette ).
Bumps the uv group with 1 update in the /weather-server-python directory: [starlette](https://github.com/Kludex/starlette ).
Updates `starlette` from 1.0.0 to 1.0.1
- [Release notes](https://github.com/Kludex/starlette/releases )
- [Changelog](https://github.com/Kludex/starlette/blob/main/docs/release-notes.md )
- [Commits](https://github.com/Kludex/starlette/compare/1.0.0...1.0.1 )
Updates `starlette` from 1.0.0 to 1.0.1
- [Release notes](https://github.com/Kludex/starlette/releases )
- [Changelog](https://github.com/Kludex/starlette/blob/main/docs/release-notes.md )
- [Commits](https://github.com/Kludex/starlette/compare/1.0.0...1.0.1 )
---
updated-dependencies:
- dependency-name: starlette
dependency-version: 1.0.1
dependency-type: indirect
dependency-group: uv
- dependency-name: starlette
dependency-version: 1.0.1
dependency-type: indirect
dependency-group: uv
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-06-04 17:35:02 +00:00
Alex Akimov
eafc692b88
Merge pull request #147 from olaservo/fix-ts-client-tool-use
...
Fix tool use in TypeScript client, mirroring #141
2026-06-01 22:39:52 +02:00
Ola Hungerford
bea3d53731
Merge branch 'main' into fix-ts-client-tool-use
2026-05-30 18:30:34 -07:00
olaservo
1a0ad1cc80
Fix tool use in TypeScript client, mirroring #141
...
Apply the same Messages API tool-use fixes that #141 made to the Python
client (mcp-client-python/client.py) to mcp-client-typescript/index.ts:
- Reply to each tool_use with a proper tool_result block carrying
tool_use_id, and append the assistant's full content (preserving the
tool_use block) instead of sending the result as a plain user string.
- Restructure processQuery into a turn-level loop so parallel tool calls
in one response and chained tool calls across turns both work; pass
tools on every follow-up request.
- Add MAX_TOOL_TURNS = 10 cap with a "[Stopped after N tool-use turns]"
notice to prevent unbounded tool-use loops.
- Fix chatLoop to exit cleanly on EOF (Ctrl-D) and SIGINT (Ctrl-C) via
an AbortController wired to readline close, instead of hanging or
throwing on stdin EOF.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 11:47:53 -07:00
Alex Akimov
887105360b
Fix issue 28 with tool use and improve the logic overall ( #141 )
...
* Fix issue #28 regarding the tool use
* Fix `chat_loop` to exit cleanly
2026-05-27 05:08:18 -07:00
Alex Akimov
e665ba082a
Merge pull request #142 from modelcontextprotocol/dependabot/uv/mcp-client-python/uv-152f3bd593
...
Bump the uv group across 2 directories with 1 update
2026-05-23 15:05:14 +02:00
Alex Akimov
f799f95d6b
Merge pull request #144 from modelcontextprotocol/dependabot/npm_and_yarn/mcp-client-typescript/npm_and_yarn-ad722d421a
...
Bump the npm_and_yarn group across 3 directories with 1 update
2026-05-23 15:04:35 +02:00
dependabot[bot]
75edc24a7e
Bump the npm_and_yarn group across 3 directories with 1 update
...
Bumps the npm_and_yarn group with 1 update in the /mcp-client-typescript directory: [qs](https://github.com/ljharb/qs ).
Bumps the npm_and_yarn group with 1 update in the /tests/helpers directory: [qs](https://github.com/ljharb/qs ).
Bumps the npm_and_yarn group with 1 update in the /weather-server-typescript directory: [qs](https://github.com/ljharb/qs ).
Updates `qs` from 6.14.2 to 6.15.2
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/ljharb/qs/compare/v6.14.2...v6.15.2 )
Updates `qs` from 6.14.2 to 6.15.2
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/ljharb/qs/compare/v6.14.2...v6.15.2 )
Updates `qs` from 6.14.2 to 6.15.2
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/ljharb/qs/compare/v6.14.2...v6.15.2 )
---
updated-dependencies:
- dependency-name: qs
dependency-version: 6.15.2
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: qs
dependency-version: 6.15.2
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: qs
dependency-version: 6.15.2
dependency-type: indirect
dependency-group: npm_and_yarn
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-05-23 12:40:48 +00:00
dependabot[bot]
e749a0e950
Bump the uv group across 2 directories with 1 update
...
Bumps the uv group with 1 update in the /mcp-client-python directory: [idna](https://github.com/kjd/idna ).
Bumps the uv group with 1 update in the /weather-server-python directory: [idna](https://github.com/kjd/idna ).
Updates `idna` from 3.11 to 3.15
- [Release notes](https://github.com/kjd/idna/releases )
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.md )
- [Commits](https://github.com/kjd/idna/compare/v3.11...v3.15 )
Updates `idna` from 3.11 to 3.15
- [Release notes](https://github.com/kjd/idna/releases )
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.md )
- [Commits](https://github.com/kjd/idna/compare/v3.11...v3.15 )
---
updated-dependencies:
- dependency-name: idna
dependency-version: '3.15'
dependency-type: indirect
dependency-group: uv
- dependency-name: idna
dependency-version: '3.15'
dependency-type: indirect
dependency-group: uv
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-05-19 21:34:22 +00:00
Alex Akimov
36b6ca4070
Update quickstart URLs ( #140 )
2026-05-16 08:59:02 -07:00
Alex Akimov
9f75603459
Merge pull request #139 from modelcontextprotocol/dependabot/npm_and_yarn/mcp-client-typescript/npm_and_yarn-955df13191
...
Bump the npm_and_yarn group across 3 directories with 1 update
2026-05-09 14:13:16 +02:00
dependabot[bot]
4fb282b85b
Bump the npm_and_yarn group across 3 directories with 1 update
...
Bumps the npm_and_yarn group with 1 update in the /mcp-client-typescript directory: [fast-uri](https://github.com/fastify/fast-uri ).
Bumps the npm_and_yarn group with 1 update in the /tests/helpers directory: [fast-uri](https://github.com/fastify/fast-uri ).
Bumps the npm_and_yarn group with 1 update in the /weather-server-typescript directory: [fast-uri](https://github.com/fastify/fast-uri ).
Updates `fast-uri` from 3.1.0 to 3.1.2
- [Release notes](https://github.com/fastify/fast-uri/releases )
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.0...v3.1.2 )
Updates `fast-uri` from 3.1.0 to 3.1.2
- [Release notes](https://github.com/fastify/fast-uri/releases )
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.0...v3.1.2 )
Updates `fast-uri` from 3.1.0 to 3.1.2
- [Release notes](https://github.com/fastify/fast-uri/releases )
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.0...v3.1.2 )
---
updated-dependencies:
- dependency-name: fast-uri
dependency-version: 3.1.2
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: fast-uri
dependency-version: 3.1.2
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: fast-uri
dependency-version: 3.1.2
dependency-type: indirect
dependency-group: npm_and_yarn
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-05-09 00:13:49 +00:00
Alex Akimov
166e6d0101
Merge pull request #136 from modelcontextprotocol/dependabot/uv/mcp-client-python/uv-469856924f
...
Bump the uv group across 2 directories with 1 update
2026-05-08 17:35:18 +02:00
Alex Akimov
f8b2b11807
Merge pull request #138 from modelcontextprotocol/dependabot/npm_and_yarn/mcp-client-typescript/npm_and_yarn-8fd24077b3
...
Bump the npm_and_yarn group across 3 directories with 1 update
2026-05-08 17:33:55 +02:00
dependabot[bot]
7aef786971
Bump the npm_and_yarn group across 3 directories with 1 update
...
Bumps the npm_and_yarn group with 1 update in the /mcp-client-typescript directory: [hono](https://github.com/honojs/hono ).
Bumps the npm_and_yarn group with 1 update in the /tests/helpers directory: [hono](https://github.com/honojs/hono ).
Bumps the npm_and_yarn group with 1 update in the /weather-server-typescript directory: [hono](https://github.com/honojs/hono ).
Updates `hono` from 4.12.14 to 4.12.18
- [Release notes](https://github.com/honojs/hono/releases )
- [Commits](https://github.com/honojs/hono/compare/v4.12.14...v4.12.18 )
Updates `hono` from 4.12.14 to 4.12.18
- [Release notes](https://github.com/honojs/hono/releases )
- [Commits](https://github.com/honojs/hono/compare/v4.12.14...v4.12.18 )
Updates `hono` from 4.12.14 to 4.12.18
- [Release notes](https://github.com/honojs/hono/releases )
- [Commits](https://github.com/honojs/hono/compare/v4.12.14...v4.12.18 )
---
updated-dependencies:
- dependency-name: hono
dependency-version: 4.12.18
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: hono
dependency-version: 4.12.18
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: hono
dependency-version: 4.12.18
dependency-type: indirect
dependency-group: npm_and_yarn
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-05-08 14:38:16 +00:00
dependabot[bot]
e6711da7a5
Bump the uv group across 2 directories with 1 update
...
Bumps the uv group with 1 update in the /mcp-client-python directory: [python-multipart](https://github.com/Kludex/python-multipart ).
Bumps the uv group with 1 update in the /weather-server-python directory: [python-multipart](https://github.com/Kludex/python-multipart ).
Updates `python-multipart` from 0.0.26 to 0.0.27
- [Release notes](https://github.com/Kludex/python-multipart/releases )
- [Changelog](https://github.com/Kludex/python-multipart/blob/main/CHANGELOG.md )
- [Commits](https://github.com/Kludex/python-multipart/compare/0.0.26...0.0.27 )
Updates `python-multipart` from 0.0.26 to 0.0.27
- [Release notes](https://github.com/Kludex/python-multipart/releases )
- [Changelog](https://github.com/Kludex/python-multipart/blob/main/CHANGELOG.md )
- [Commits](https://github.com/Kludex/python-multipart/compare/0.0.26...0.0.27 )
---
updated-dependencies:
- dependency-name: python-multipart
dependency-version: 0.0.27
dependency-type: indirect
dependency-group: uv
- dependency-name: python-multipart
dependency-version: 0.0.27
dependency-type: indirect
dependency-group: uv
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-05-08 12:16:56 +00:00
Alex Akimov
d7c4867e35
Merge pull request #135 from modelcontextprotocol/dependabot/npm_and_yarn/mcp-client-typescript/npm_and_yarn-19916f891b
...
Bump the npm_and_yarn group across 3 directories with 1 update
2026-05-06 23:03:26 +02:00
Alex Akimov
7ce3b10829
Merge pull request #133 from koic/add_connect_to_stdio_client
...
Add client-level connect handshake to stdio transport
2026-05-06 23:02:16 +02:00
dependabot[bot]
16dfbbd17d
Bump the npm_and_yarn group across 3 directories with 1 update
...
Bumps the npm_and_yarn group with 1 update in the /mcp-client-typescript directory: [ip-address](https://github.com/beaugunderson/ip-address ).
Bumps the npm_and_yarn group with 1 update in the /tests/helpers directory: [ip-address](https://github.com/beaugunderson/ip-address ).
Bumps the npm_and_yarn group with 1 update in the /weather-server-typescript directory: [ip-address](https://github.com/beaugunderson/ip-address ).
Updates `ip-address` from 10.1.0 to 10.2.0
- [Commits](https://github.com/beaugunderson/ip-address/commits )
Updates `ip-address` from 10.1.0 to 10.2.0
- [Commits](https://github.com/beaugunderson/ip-address/commits )
Updates `ip-address` from 10.1.0 to 10.2.0
- [Commits](https://github.com/beaugunderson/ip-address/commits )
---
updated-dependencies:
- dependency-name: ip-address
dependency-version: 10.2.0
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: ip-address
dependency-version: 10.2.0
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: ip-address
dependency-version: 10.2.0
dependency-type: indirect
dependency-group: npm_and_yarn
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-05-06 20:59:36 +00:00
Alex Akimov
7fab8d503a
Merge pull request #134 from modelcontextprotocol/dependabot/cargo/mcp-client-rust/cargo-bbb5091bec
...
Bump the cargo group across 2 directories with 1 update
2026-05-06 22:58:21 +02:00
dependabot[bot]
85319be2d0
Bump the cargo group across 2 directories with 1 update
...
Bumps the cargo group with 1 update in the /mcp-client-rust directory: [openssl](https://github.com/rust-openssl/rust-openssl ).
Bumps the cargo group with 1 update in the /weather-server-rust directory: [openssl](https://github.com/rust-openssl/rust-openssl ).
Updates `openssl` from 0.10.78 to 0.10.79
- [Release notes](https://github.com/rust-openssl/rust-openssl/releases )
- [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.78...openssl-v0.10.79 )
Updates `openssl` from 0.10.78 to 0.10.79
- [Release notes](https://github.com/rust-openssl/rust-openssl/releases )
- [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.78...openssl-v0.10.79 )
---
updated-dependencies:
- dependency-name: openssl
dependency-version: 0.10.79
dependency-type: indirect
dependency-group: cargo
- dependency-name: openssl
dependency-version: 0.10.79
dependency-type: indirect
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-05-06 19:25:48 +00:00
Koichi ITO
a1838e965a
Add client-level connect handshake to stdio transport
...
## Motivation and Context
Follow-up to https://github.com/modelcontextprotocol/ruby-sdk/pull/336
mcp gem 0.15.0 introduced an explicit `MCP::Client#connect` method for the stdio transport,
aligning with the Python and TypeScript SDKs which require explicit handshake calls regardless
of transport type:
- Python SDK: `ClientSession.initialize()`
https://github.com/modelcontextprotocol/python-sdk
- TypeScript SDK: `Client.connect(transport)`
https://github.com/modelcontextprotocol/typescript-sdk
This sample is updated to call `@mcp_client.connect` explicitly after creating the client,
demonstrating the recommended initialization pattern. The Gemfile constraint is bumped to `>= 0.15.0`
to require the new API.
## How Has This Been Tested?
Ran the sample against `weather-server-ruby` and confirmed the connection, tool listing,
and chat loop continue to work as expected.
## Breaking Changes
None. The change updates the sample to use the new explicit `connect` API,
which was added as a non-breaking addition in mcp gem 0.15.0.
2026-05-06 09:27:15 +09:00
Alex Akimov
0d2295e464
Merge pull request #131 from modelcontextprotocol/dependabot/cargo/mcp-client-rust/cargo-986b759182
...
Bump the cargo group across 2 directories with 1 update
2026-04-24 20:27:26 +02:00
dependabot[bot]
c5d87e1290
Bump the cargo group across 2 directories with 1 update
...
Bumps the cargo group with 1 update in the /mcp-client-rust directory: [openssl](https://github.com/rust-openssl/rust-openssl ).
Bumps the cargo group with 1 update in the /weather-server-rust directory: [openssl](https://github.com/rust-openssl/rust-openssl ).
Updates `openssl` from 0.10.73 to 0.10.78
- [Release notes](https://github.com/rust-openssl/rust-openssl/releases )
- [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.73...openssl-v0.10.78 )
Updates `openssl` from 0.10.73 to 0.10.78
- [Release notes](https://github.com/rust-openssl/rust-openssl/releases )
- [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.73...openssl-v0.10.78 )
---
updated-dependencies:
- dependency-name: openssl
dependency-version: 0.10.78
dependency-type: indirect
dependency-group: cargo
- dependency-name: openssl
dependency-version: 0.10.78
dependency-type: indirect
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-04-23 00:37:47 +00:00
Alex Akimov
fb5ed31d0a
Merge pull request #130 from modelcontextprotocol/dependabot/cargo/mcp-client-rust/cargo-b5d7f51020
...
Bump the cargo group across 2 directories with 2 updates
2026-04-21 13:32:46 +02:00
Alex Akimov
99e3af1970
Merge pull request #128 from modelcontextprotocol/dependabot/uv/mcp-client-python/uv-086a20107d
...
Bump the uv group across 2 directories with 1 update
2026-04-21 13:32:10 +02:00
dependabot[bot]
0d2105f7ef
Bump the cargo group across 2 directories with 2 updates
...
Bumps the cargo group with 2 updates in the /mcp-client-rust directory: [rand](https://github.com/rust-random/rand ) and [rustls-webpki](https://github.com/rustls/webpki ).
Bumps the cargo group with 1 update in the /weather-server-rust directory: [rustls-webpki](https://github.com/rustls/webpki ).
Updates `rand` from 0.9.2 to 0.9.4
- [Release notes](https://github.com/rust-random/rand/releases )
- [Changelog](https://github.com/rust-random/rand/blob/0.9.4/CHANGELOG.md )
- [Commits](https://github.com/rust-random/rand/compare/rand_core-0.9.2...0.9.4 )
Updates `rustls-webpki` from 0.103.10 to 0.103.13
- [Release notes](https://github.com/rustls/webpki/releases )
- [Commits](https://github.com/rustls/webpki/compare/v/0.103.10...v/0.103.13 )
Updates `rustls-webpki` from 0.103.10 to 0.103.13
- [Release notes](https://github.com/rustls/webpki/releases )
- [Commits](https://github.com/rustls/webpki/compare/v/0.103.10...v/0.103.13 )
---
updated-dependencies:
- dependency-name: rand
dependency-version: 0.9.4
dependency-type: indirect
dependency-group: cargo
- dependency-name: rustls-webpki
dependency-version: 0.103.13
dependency-type: indirect
dependency-group: cargo
- dependency-name: rustls-webpki
dependency-version: 0.103.13
dependency-type: indirect
dependency-group: cargo
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-04-21 11:30:05 +00:00
Alex Akimov
5cc853066f
Merge pull request #129 from modelcontextprotocol/dependabot/npm_and_yarn/mcp-client-typescript/npm_and_yarn-b50c96e7f0
...
Bump the npm_and_yarn group across 3 directories with 1 update
2026-04-21 13:28:55 +02:00
dependabot[bot]
f1f93e56e8
Bump the npm_and_yarn group across 3 directories with 1 update
...
Bumps the npm_and_yarn group with 1 update in the /mcp-client-typescript directory: [hono](https://github.com/honojs/hono ).
Bumps the npm_and_yarn group with 1 update in the /tests/helpers directory: [hono](https://github.com/honojs/hono ).
Bumps the npm_and_yarn group with 1 update in the /weather-server-typescript directory: [hono](https://github.com/honojs/hono ).
Updates `hono` from 4.12.12 to 4.12.14
- [Release notes](https://github.com/honojs/hono/releases )
- [Commits](https://github.com/honojs/hono/compare/v4.12.12...v4.12.14 )
Updates `hono` from 4.12.12 to 4.12.14
- [Release notes](https://github.com/honojs/hono/releases )
- [Commits](https://github.com/honojs/hono/compare/v4.12.12...v4.12.14 )
Updates `hono` from 4.12.12 to 4.12.14
- [Release notes](https://github.com/honojs/hono/releases )
- [Commits](https://github.com/honojs/hono/compare/v4.12.12...v4.12.14 )
---
updated-dependencies:
- dependency-name: hono
dependency-version: 4.12.14
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: hono
dependency-version: 4.12.14
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: hono
dependency-version: 4.12.14
dependency-type: indirect
dependency-group: npm_and_yarn
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-04-16 03:01:09 +00:00