How rishikeshl0510/typescript-sdk works
Project type and purpose
• From the file tree and README we see this is a single-package TypeScript SDK implementing the Model Context Protocol (MCP). It provides both:
• A high-level Client library (in src/client) for connecting to any MCP server.
• A high-level Server library (in src/server) for defining Resources, Tools and Prompts.
• Shared modules (in src/shared) that implement the core MCP wire-protocol, types, transport abstractions, serialization, etc.
• CLI entrypoint (src/cli.ts) exposing both client and server command-line tools.
File structure
• Top-level configuration and metadata: package.json, tsconfig.*, eslint.config.mjs, jest.config.js.
• src/
• client/ — high-level Client API, transports (stdio, websocket, SSE), tests and mocks.
• server/ — McpServer and low-level Server implementations, auth middleware, handlers, transports (stdio, SSE), tests.
• shared/ — protocol definitions, transport interface, URI templates, stdio helper, transport dispatch logic.
• __mocks__, integration-tests, unit tests sprinkled throughout client and server directories.
• README defines usage patterns: instantiating McpServer, adding resources/tools/prompts, wiring transports (StdioServerTransport, SSEServerTransport), creating Client with StdioClientTransport.
README for additional insights
• The “Overview” and “Core Concepts” sections describe a layered architecture:
• Transport layer (stdio, SSE, websocket)
• MCP protocol core (Shared)
• High-level API layers (Client vs. Server)
• Application code that wires in user-defined Resources/Tools/Prompts