TypeScript SDK

v1.17.1Developer Toolsstable

The official TypeScript SDK for Model Context Protocol servers and clients

modelcontextprotocolmcpclientservermcp-local
Share:
12,489
Stars
0
Downloads
0
Weekly
0/5

What is TypeScript SDK?

TypeScript SDK is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to official typescript sdk for model context protocol servers and clients

The official TypeScript SDK for Model Context Protocol servers and clients

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • The official TypeScript SDK for Model Context Protocol serve

Use Cases

Build MCP servers and clients with official TypeScript SDK.
Integrate MCP with Node.js, Express, and middleware frameworks.
LicenseNOASSERTION
Languagetypescript
Versionv1.17.1
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y @camsoft/mcp-sdk

Manual Installation

npx -y @camsoft/mcp-sdk

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use TypeScript SDK

The Model Context Protocol TypeScript SDK is the official library for building MCP servers and clients in TypeScript and JavaScript. It provides the core server runtime for registering tools, resources, and prompts, along with client transport implementations for stdio and Streamable HTTP, OAuth helpers, and middleware packages for Express, Hono, and Node.js HTTP. Any developer who wants to create a production-grade MCP server or build an application that connects to MCP servers should start here — it is the canonical reference implementation for the protocol in the Node.js ecosystem.

Prerequisites

  • Node.js 18 or higher
  • npm or yarn for package management
  • TypeScript 5.x (for TypeScript projects; the SDK ships type definitions)
  • An MCP-compatible client such as Claude Desktop or Claude Code for testing your server
  • Familiarity with async/await JavaScript and basic TypeScript types
1

Install the SDK packages

Install the core MCP server and/or client packages from npm. Add optional middleware packages for your chosen web framework if you need HTTP transport.

npm install @modelcontextprotocol/sdk
# For HTTP middleware (optional):
npm install @modelcontextprotocol/express   # Express.js
npm install @modelcontextprotocol/hono       # Hono
npm install @modelcontextprotocol/node       # Node.js HTTP
2

Create a minimal MCP server

Write a TypeScript file that creates an McpServer instance, registers tools using registerTool with a Zod input schema, and connects to a StdioServerTransport.

import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import { z } from 'zod';

const server = new McpServer({ name: 'my-server', version: '1.0.0' });

server.registerTool(
  'greet',
  { description: 'Greet someone by name', inputSchema: z.object({ name: z.string() }) },
  async ({ name }) => ({ content: [{ type: 'text', text: `Hello, ${name}!` }] })
);

const transport = new StdioServerTransport();
await server.connect(transport);
3

Add resources and prompts

Beyond tools, you can register resources (static or dynamic data the AI can read) and prompts (reusable prompt templates) using registerResource and registerPrompt on the server object.

4

Build and test the server locally

Compile the TypeScript server and verify it starts without errors. You can use MCP Inspector or connect it directly to Claude Desktop for testing.

npx tsc
node dist/index.js
5

Add the server to your MCP client

Register your compiled server in claude_desktop_config.json to test it with Claude Desktop. Use the absolute path to the compiled entry point.

6

Explore the examples directory

The SDK repository includes complete runnable examples for both servers and clients in the examples/ directory. Clone the repo and run them to see the full API in action.

git clone https://github.com/modelcontextprotocol/typescript-sdk.git
cd typescript-sdk && npm install
npm run build

TypeScript SDK Examples

Client configuration

Add this block to your claude_desktop_config.json to connect Claude Desktop to a locally compiled MCP server built with the TypeScript SDK.

{
  "mcpServers": {
    "my-typescript-mcp-server": {
      "command": "node",
      "args": ["/absolute/path/to/your/dist/index.js"],
      "env": {}
    }
  }
}

Prompts to try

Use these prompts with Claude when testing an MCP server built with the TypeScript SDK.

- "What tools are available on this MCP server?"
- "Call the greet tool with name 'Alice'"
- "List all resources exposed by this server"
- "Use the available prompt templates to generate a response about [topic]"

Troubleshooting TypeScript SDK

Server fails to start with 'Cannot find module' errors

Run `npm install` to install all dependencies, then `npx tsc` to compile TypeScript. Ensure the output path in dist/ matches what is referenced in claude_desktop_config.json. Check your tsconfig.json outDir setting.

Zod validation errors when registering tools

The SDK supports Zod v4, Valibot, and ArkType for input schemas via Standard Schema. Ensure you have `zod@^3` or `zod@^4` installed and that the schema matches the exact input structure your tool handler expects.

Claude Desktop connects but reports no tools

Verify your server calls `server.connect(transport)` and that registerTool calls are made before connect. Restart Claude Desktop after any changes to claude_desktop_config.json. Check the server logs for startup errors.

Frequently Asked Questions about TypeScript SDK

What is TypeScript SDK?

TypeScript SDK is a Model Context Protocol (MCP) server that official typescript sdk for model context protocol servers and clients It connects AI assistants to external tools and data sources through a standardized interface.

How do I install TypeScript SDK?

Install via npm with the command: npx -y @camsoft/mcp-sdk. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with TypeScript SDK?

TypeScript SDK works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is TypeScript SDK free to use?

Yes, TypeScript SDK is open source and available under the NOASSERTION license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "typescript-sdk": { "command": "npx", "args": ["-y", "@camsoft/mcp-sdk"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use TypeScript SDK?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides