Skip to content

Import "Build a weather server" quickstart guide#1549

Merged
jonathanhefner merged 1 commit intomodelcontextprotocol:mainfrom
jonathanhefner:server-quickstart
Feb 18, 2026
Merged

Import "Build a weather server" quickstart guide#1549
jonathanhefner merged 1 commit intomodelcontextprotocol:mainfrom
jonathanhefner:server-quickstart

Conversation

@jonathanhefner
Copy link
Member

@jonathanhefner jonathanhefner commented Feb 17, 2026

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

@changeset-bot
Copy link

changeset-bot bot commented Feb 17, 2026

⚠️ No Changeset found

Latest commit: 7731e62

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 17, 2026

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/client@1549

@modelcontextprotocol/server

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/server@1549

@modelcontextprotocol/express

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/express@1549

@modelcontextprotocol/hono

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/hono@1549

@modelcontextprotocol/node

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/node@1549

commit: 7731e62

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>
@jonathanhefner jonathanhefner marked this pull request as ready for review February 17, 2026 23:41
@jonathanhefner jonathanhefner requested a review from a team as a code owner February 17, 2026 23:42
@jonathanhefner jonathanhefner enabled auto-merge (squash) February 17, 2026 23:43
Copy link
Contributor

@felixweinberger felixweinberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto, not sure why this needs to have its own tsconfig and can't just go in examples/server

@jonathanhefner
Copy link
Member Author

Can we make this part of server/examples? Is there a particular reason it needs to be its own package?

@felixweinberger A separate package allows new users to inspect the directory structure without added noise, and copy / run with minimal modification. (The package.json does need a small modification due to using npm workspaces.)

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 examples/server/src though, I can do that.

@jonathanhefner jonathanhefner merged commit 6cd75c6 into modelcontextprotocol:main Feb 18, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants