Skip to main content
Glama
Suchanon

learn-typescript-mcp

by Suchanon

learn TypeScript MCP

Learning monorepo for the Model Context Protocol TypeScript SDK, built on Bun workspaces. Each learning topic lives in its own app under apps/ — new topics get a new apps/<topic> workspace.

App

What it is

apps/weather/

The MCP weather tutorial, restructured as a NestJS application (running on the Bun runtime)

apps/tax-assistant/

A minimal plain-TypeScript stdio MCP server (VAT calculator)

To install dependencies for all workspaces:

bun install

Weather app (apps/weather/) — NestJS + MCP

Follows the official MCP TypeScript SDK "Build your first server" / "Build your first client" tutorials, using the real NWS weather API — hosted inside a NestJS app.

Both tools declare default values in their input schemas for development convenience — Inspector pre-fills its form with them (state: CA, latitude/longitude: San Francisco), so you can hit "Run Tool" without typing. Callers that pass their own arguments override them; the defaults only apply when an argument is omitted.

Run the stdio server

Each client that connects (Claude Code, Inspector, client.ts) spawns its own private copy of this process — it's not a shared server.

bun run weather:stdio

Run the HTTP server

One shared process that clients connect to over the network. Kill this terminal and every connected client loses the connection immediately.

bun run weather:http

Run the example client

bun run weather:client

Run the tests / typecheck

bun test          # from apps/weather/ (or the repo root)
bun run typecheck # from the repo root — tsc over both apps

Related MCP server: MCP Test Server

Tax assistant (apps/tax-assistant/)

Minimal stdio MCP server with a single calculate-vat tool (Thai VAT 7%):

bun run tax:stdio

Inspect/test with MCP Inspector

bunx @modelcontextprotocol/inspector

Opens a browser UI (proxy on port 6277, UI on port 6274). In the sidebar, connect it either way:

  • stdio: Transport Type STDIO, Command bun, Args apps/weather/src/stdio.ts

  • HTTP: Transport Type Streamable HTTP, URL http://localhost:3000/mcp — requires the HTTP server (bun run weather:http) to already be running

Inspector remembers your last-used connection in the browser and auto-reconnects with it on load/refresh — always check the sidebar's Transport Type/URL before assuming what it's actually connected to.

If you get PORT IS IN USE on 6274/6277, a previous Inspector instance didn't shut down cleanly (it can leave its proxy process orphaned even after reporting failure). Find and kill it before retrying:

lsof -nP -iTCP:6274,6277 -sTCP:LISTEN
kill <PID>

Connect to Claude Code

.mcp.json registers the weather server, pointed at the HTTP transport — start the Nest server (bun run weather:http) yourself before opening a Claude Code session here, or /mcp will show it disconnected.

NestJS-on-Bun notes

  • No nest-cli/webpack build step — Bun runs the TypeScript entrypoints directly (bun src/main.ts).

  • tsconfig.json enables experimentalDecorators + emitDecoratorMetadata; Bun's transpiler honors both, which is what makes Nest constructor injection work.

  • Nest still uses its Express adapter internally; only the runtime and package manager are Bun.

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Suchanon/learn-typescript-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server