Mirror of https://github.com/modelcontextprotocol/quickstart-resources — A repository of servers and clients from the Model Context Protocol tutorials
  • JavaScript 19.6%
  • Rust 17.3%
  • Go 16.6%
  • TypeScript 13.2%
  • Ruby 11.8%
  • Other 21.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
olaservo 65d1a92cf8 Add structured output to the Rust weather server and client
Both tools declare an output_schema and return structured_content alongside
the text.

get_alerts declares Vec<Alert>, so it 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.

Error paths return a tool-level error: a tool declaring an output_schema MUST
return conforming structured content, so a path with no data has to fail.

The client compiles every declared outputSchema at connect time and validates
results against it. rmcp does not do this; its docs point at the jsonschema
crate, which is the one new dependency here. 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. A missing .env is no longer fatal, and the
API key is checked after connecting rather than before.

This supersedes #143, which bumped rmcp 0.3 -> 1.4 and failed CI because the
0.3 #[tool] macro API does not survive the jump. The rewrite was required
either way, so the bump is folded in and taken to 3.0.0-beta.2, the first
version with the 2026-07-28 model.

list_tools is hand-written. #[tool_handler] generates one hardcoding
ttl_ms: None, cache_scope: None, but both are required on a paginated result
at 2026-07-28 (SEP-2549) and a strict client rejects the response outright.
get_info does not pin ProtocolVersion::V_2026_07_28 either: rmcp's server
never implements server/discover, so pinning would overstate support.

Model identifier moves to claude-sonnet-5, replacing claude-sonnet-4-20250514,
which is past end of life.

Note that rmcp sends an array-rooted schema as written on every connection
rather than projecting it down, so an older client rejects the tool list.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 15:36:38 -07:00
.github/workflows Assert on structured output in the smoke tests and update to v2 (#163) 2026-08-03 19:42:57 +02:00
mcp-client-go Update quickstart URLs (#140) 2026-05-16 08:59:02 -07:00
mcp-client-python Add structured content to the Python weather server and client and update to v2 (#164) 2026-08-09 14:46:03 +02:00
mcp-client-ruby Update quickstart URLs (#140) 2026-05-16 08:59:02 -07:00
mcp-client-rust Add structured output to the Rust weather server and client 2026-08-09 15:36:38 -07:00
mcp-client-typescript Bump the npm_and_yarn group across 3 directories with 2 updates 2026-07-23 15:14:04 +00:00
tests Assert on structured output in the smoke tests and update to v2 (#163) 2026-08-03 19:42:57 +02:00
weather-server-go Update quickstart URLs (#140) 2026-05-16 08:59:02 -07:00
weather-server-python Add structured content to the Python weather server and client and update to v2 (#164) 2026-08-09 14:46:03 +02:00
weather-server-ruby Update quickstart URLs (#140) 2026-05-16 08:59:02 -07:00
weather-server-rust Add structured output to the Rust weather server and client 2026-08-09 15:36:38 -07:00
weather-server-typescript Bump the npm_and_yarn group across 3 directories with 2 updates 2026-07-23 15:14:04 +00:00
.gitattributes Add .gitattributes to mark lock files as generated 2025-12-12 09:52:25 -06:00
.gitignore Assert on structured output in the smoke tests and update to v2 (#163) 2026-08-03 19:42:57 +02:00
LICENSE chore: update licensing to Apache 2.0 for new contributions 2026-01-12 22:49:32 +00:00
README.md Update quickstart URLs (#140) 2026-05-16 08:59:02 -07:00
SECURITY.md docs: add security notes for network-exposed MCP servers 2026-02-07 12:55:02 +01:00

Quickstart Resources

A repository of servers and clients from the following Model Context Protocol tutorials:

Security Note

These examples are intentionally minimal. If you expose an MCP server over a network (HTTP/SSE/WebSocket), add authentication and basic hardening (CORS allowlist, request size limits, timeouts, rate limits, and log redaction). See SECURITY.md.