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%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Both tools declare an OutputSchema and return StructuredContent alongside the text. get_alerts returns []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. The declared schema narrows the inferred ["null","array"] root to "array": jsonschema-go infers the nullable form because a nil slice is valid Go, but the handler always builds a slice. Error paths return an error: a tool declaring an OutputSchema 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, using jsonschema-go - already an SDK dependency, so no new one. Each channel goes to its stated reader: Content is forwarded to the model, StructuredContent is used as data, reporting how many items came back. The client no longer treats a missing .env as fatal and checks for ANTHROPIC_API_KEY after connecting rather than before, matching the Python and TypeScript clients, so the connection can be exercised without credentials. Requires go-sdk v1.7.0-pre.3: non-object output schema support (SEP-2106) landed after v1.6.1 and is in no stable release. Model identifier moves to claude-sonnet-5; the second call in the tool loop used a hardcoded ModelClaude3_7SonnetLatest while the first used the package variable, so both now use the same one. Note that the SDK 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> |
||
| .github/workflows | ||
| mcp-client-go | ||
| mcp-client-python | ||
| mcp-client-ruby | ||
| mcp-client-rust | ||
| mcp-client-typescript | ||
| tests | ||
| weather-server-go | ||
| weather-server-python | ||
| weather-server-ruby | ||
| weather-server-rust | ||
| weather-server-typescript | ||
| .gitattributes | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
| SECURITY.md | ||
Quickstart Resources
A repository of servers and clients from the following Model Context Protocol tutorials:
- Build an MCP server – a simple MCP weather server
- Build an MCP client – an LLM-powered chatbot MCP client
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.