Import "Build a weather server" quickstart guide#1549
Import "Build a weather server" quickstart guide#1549jonathanhefner merged 1 commit intomodelcontextprotocol:mainfrom
Conversation
|
@modelcontextprotocol/client
@modelcontextprotocol/server
@modelcontextprotocol/express
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
Import and adapt the server quickstart tutorial from modelcontextprotocol.io and the companion `weather-server-typescript` example from `modelcontextprotocol/quickstart-resources` into this repo. `docs/server-quickstart.md` uses code fences with `source=` attributes so code snippets are type-checked and kept in in sync with the full runnable example in `examples/server-quickstart/`. Supporting changes: - `docs/documents.md`: list the new doc - `typedoc.config.mjs`: add `powershell` syntax highlighting - `.prettierignore`: exclude `examples/server-quickstart/` (2-space indent to match ecosystem conventions) - `scripts/sync-snippets.ts`: fix `dedent()` short-circuit on empty `baseIndent`; move `.trim()` so region extraction sees full file Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
725c3fe to
7731e62
Compare
felixweinberger
left a comment
There was a problem hiding this comment.
Can we make this part of server/examples? Is there a particular reason it needs to be its own package?
| @@ -0,0 +1,21 @@ | |||
| { | |||
| "name": "@modelcontextprotocol/examples-server-quickstart", | |||
There was a problem hiding this comment.
Any reason this needs to be its own package rather than adding to examples/server?
I don't think we want to proliferate additional examples packages beyond what we already have with server, client and shared
| @@ -0,0 +1,22 @@ | |||
| { | |||
| "compilerOptions": { | |||
There was a problem hiding this comment.
ditto, not sure why this needs to have its own tsconfig and can't just go in examples/server
@felixweinberger A separate package allows new users to inspect the directory structure without added noise, and copy / run with minimal modification. (The I did it specifically because it's a quickstart, and wouldn't recommend doing it for other examples. That said, if you prefer keeping everything in |
6cd75c6
into
modelcontextprotocol:main
Import and adapt the server quickstart tutorial from modelcontextprotocol.io and the companion
weather-server-typescriptexample frommodelcontextprotocol/quickstart-resourcesinto this repo.docs/server-quickstart.mduses code fences withsource=attributes so code snippets are type-checked and kept in in sync with the full runnable example inexamples/server-quickstart/.Supporting changes:
docs/documents.md: list the new doctypedoc.config.mjs: addpowershellsyntax highlighting.prettierignore: excludeexamples/server-quickstart/(2-space indent to match ecosystem conventions)scripts/sync-snippets.ts: fixdedent()short-circuit on emptybaseIndent; move.trim()so region extraction sees full file