ts-mcp-server-client

baixiaokuang/ts-mcp-server-client

3.1

If you are the rightful owner of ts-mcp-server-client and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This document provides a structured summary of a TypeScript Model Context Protocol (MCP) server and client demo, highlighting its features, tools, resources, and usage.

TypeScript MCP Server and Client Demo

pnpm install
pnpm server:dev
pnpm client:dev
pnpm server:inspect # Debug MCP server with MCP inspector

src/server.ts

  • Tool
  • Resource
  • ResourceTemplate
  • Prompt
  • zod@3 for API scheme

src/client.ts

  • Sampling
  • @inquirer/prompts for CLI interaction
  • ai @ai-sdk/google for LLM integration

.vscode/mcp.json

  • Debug MCP server in VS Code

src/data/users.json

  • Mock datastore