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)

apps/knowledge-base/

A stdio MCP server backed by bun:sqlite, covering tools + resources + a prompt (notes with tags)

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

Knowledge base (apps/knowledge-base/)

Persistent notes-with-tags server backed by bun:sqlite (apps/knowledge-base/src/db.ts, apps/knowledge-base/src/notes.ts). Unlike weather/tax-assistant, this app exercises all three MCP primitives:

  • Tools (actions a client explicitly calls): add-note, get-note, search-notes, list-notes, delete-note, add-tags, list-tags

  • Resources (data a client can pull into context without a tool call): kb://notes (JSON index of every note) and the kb://notes/{id} template (one note as markdown)

  • Prompts (reusable message templates a client can surface as a menu item): summarize-notes-by-tag, which embeds matching notes' content into the generated prompt

The SQLite file (apps/knowledge-base/knowledge-base.sqlite, plus its -wal/-shm sidecars) is created on first run and gitignored — each clone starts with an empty knowledge base.

bun run kb: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.

To switch between this repo's stdio servers without retyping Command/Args each time, use mcp.inspector.json (same mcpServers shape as .mcp.json):

bunx @modelcontextprotocol/inspector --config mcp.inspector.json --server knowledge-base
# or --server weather / --server tax-assistant

There's no in-UI dropdown to swap servers from a config file — picking a different one means relaunching with a different --server value.

Inspecting multiple servers at once

One Inspector instance connects to exactly one server. To inspect two or three at the same time, run separate instances on separate ports (CLIENT_PORT/SERVER_PORT) and open each in its own browser tab:

# terminal 1
CLIENT_PORT=6274 SERVER_PORT=6277 bunx @modelcontextprotocol/inspector --config mcp.inspector.json --server weather

# terminal 2
CLIENT_PORT=6280 SERVER_PORT=6281 bunx @modelcontextprotocol/inspector --config mcp.inspector.json --server tax-assistant

# terminal 3
CLIENT_PORT=6282 SERVER_PORT=6283 bunx @modelcontextprotocol/inspector --config mcp.inspector.json --server knowledge-base

Each opens its UI on its own port (http://localhost:6274, :6280, :6282) — leaving CLIENT_PORT/SERVER_PORT unset on more than one instance will collide on the 6274/6277 defaults.

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
Not graded
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.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A TypeScript-based test implementation for the Model Context Protocol (MCP) with example configurations and Jest test cases. Provides a development foundation for building and testing MCP server functionality.
    9
    MIT
  • F
    license
    B
    quality
    D
    maintenance
    A demonstration TypeScript MCP server that showcases basic MCP concepts with simple tools (greeting, calculator), text resources, and prompt templates for learning the Model Context Protocol.
    2

View all related MCP servers

Related MCP Connectors

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…

  • A Model Context Protocol server for Wix AI tools

View all MCP Connectors

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