🌐
GitHub
github.com › modelcontextprotocol › typescript-sdk
GitHub - modelcontextprotocol/typescript-sdk: The official TypeScript SDK for Model Context Protocol servers and clients
This repository contains the TypeScript SDK implementation of the MCP specification and ships: MCP server libraries (tools/resources/prompts, Streamable HTTP, stdio, auth helpers) MCP client libraries (transports, high-level helpers, OAuth helpers) ... Both packages have a required peer dependency on zod for schema validation. The SDK internally imports from zod/v4, but remains compatible with projects using Zod v3.25+. ... The runnable examples live under examples/ and are kept in sync with the docs.
Starred by 11.1K users
Forked by 1.5K users
Languages   TypeScript 99.8% | JavaScript 0.2%
🌐
DEV Community
dev.to › shadid12 › how-to-build-mcp-servers-with-typescript-sdk-1c28
How to build MCP servers with TypeScript SDK - DEV Community
April 3, 2025 - Let’s create a new MCP server that can gather data from the CocktailDB API and gives us drinks recipes. Create a new folder and setup a new TypeScript project following the previous steps.
🌐
Hackteam
hackteam.io › blog › build-your-first-mcp-server-with-typescript-in-under-10-minutes
Hackteam - Build Your First MCP Server with TypeScript
In this tutorial, we'll focus on building an MCP server using the TypeScript SDK. We’ll use Claude Desktop as our host for testing. Begin by creating a new project and initializing an npm package. Add the necessary dependencies for the MCP server and TypeScript. Ensure your project includes configuration files like package.json and tsconfig.json: ... { "name": "mcp-server", "version": "0.1.0", "description": "A Model Context Protocol server example", "private": true, "type": "module", "bin": { "mcp-server": "./build/index.js" }, "files": [ "build" ], "scripts": { "build": "tsc && node -e \"r
🌐
Medium
medium.com › @dogukanakkaya › writing-an-mcp-server-with-typescript-b1caf1b2caf1
Writing an MCP Server with Typescript | by Doğukan Akkaya | Medium
March 20, 2025 - Also we do need to be able to call Pulumi API, I already created a very basic Client for it in Typescript will share that at the end of the article in a repository. First thing is that we need to install the protocol SDK. ... import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { z } from "zod"; const pulumiClient = new PulumiClient('token'); // Create an MCP server const server = new McpServer({ name: "Pulumi MCP Server", version: "1.0.0" }); // ...
🌐
freeCodeCamp
freecodecamp.org › news › how-to-build-a-custom-mcp-server-with-typescript-a-handbook-for-developers
How to Build a Custom MCP Server with TypeScript – A Handbook for Developers
June 27, 2025 - So, to build an MCP server, we've landed on the official GitHub repo page for MCP's TypeScript SDK. Now, for those of you who don't know TypeScript, there's nothing to worry about. Because TypeScript is basically a superset of JavaScript. So even if you're not familiar with TypeScript, it's ...
🌐
OpenAI
openai.github.io › openai-agents-js › guides › mcp
Model Context Protocol (MCP) | OpenAI Agents SDK
Fully working samples (Hosted tools/Streamable HTTP/stdio + Streaming, HITL, onApproval) are examples/mcp in our GitHub repository. Section titled “2. Streamable HTTP MCP servers” · When your Agent talks directly to a Streamable HTTP MCP server—local or remote—instantiate MCPServerStreamableHttp with the server url, name, and any optional settings: ... The constructor also accepts additional MCP TypeScript‑SDK options such as authProvider, requestInit, fetch, reconnectionOptions, and sessionId.
🌐
Speakeasy
speakeasy.com › blog › release-model-context-protocol
Model Context Protocol: TypeScript SDKs for the Agentic AI ecosystem | Speakeasy
February 18, 2025 - For each method in the SDK, the MCP server will have a generated tool. The tool represents a discrete action that the AI agent can take. For example, the bluesky-ts SDK has a getFeed method that enables agents to fetch a user’s feed from Bluesky.
🌐
npm
npmjs.com › package › @moinfra › mcp-client-sdk
@moinfra/mcp-client-sdk - npm
Latest version: 1.10.1-dev, last published: 7 months ago. Start using @moinfra/mcp-client-sdk in your project by running `npm i @moinfra/mcp-client-sdk`. There are no other projects ...
      » npm install @moinfra/mcp-client-sdk
    
Published   Apr 20, 2025
Version   1.10.1-dev
Author   Anthropic, PBC
Find elsewhere
🌐
Microsoft Learn
learn.microsoft.com › en-us › samples › azure-samples › remote-mcp-functions-typescript › remote-mcp-functions-typescript
Remote MCP with Azure Functions (Node.js/TypeScript/JavaScript) - Code Samples | Microsoft Learn
Your client will need a key in order to invoke the new hosted SSE endpoint, which will be of the form https://<funcappname>.azurewebsites.net/runtime/webhooks/mcp/sse. The hosted function requires a system key by default which can be obtained ...
🌐
Modelcontextprotocol
modelcontextprotocol.info › docs › tutorials › building-a-client-node
Building MCP clients-Node.js
// Main execution async function main() { if (process.argv.length < 3) { console.log("Usage: ts-node client.ts <path_to_server_script>"); process.exit(1); } const client = new MCPClient(); try { await client.connectToServer(process.argv[2]); await client.chatLoop(); } catch (error) { console.error("Error:", error); await client.cleanup(); process.exit(1); } } // Run main if this is the main module if (import.meta.url === new URL(process.argv[1], "file:").href) { main(); } export default MCPClient; ... # Build the TypeScript code.
🌐
Glama
glama.ai › mcp › servers › mcp server typescript template
MCP Server TypeScript Template | Glama
This template implements a basic MCP server that provides tools for: Example operation: A simple demonstration operation ... The server uses the Model Context Protocol SDK to handle communication between AI models and external tools.
🌐
npm
npmjs.com › package › @modelcontextprotocol › sdk › v › 1.3.0
@modelcontextprotocol/sdk - npm
A more complex example showing database integration: import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import sqlite3 from "sqlite3"; import { promisify } from "util"; import { z } from "zod"; const server = new McpServer({ name: "SQLite Explorer", version: "1.0.0" }); // Helper to create DB connection const getDb = () => { const db = new sqlite3.Database("database.db"); return { all: promisify<string, any[]>(db.all.bind(db)), close: promisify(db.close.bind(db)) }; }; server.resource( "schema", "schema://main", async (uri) => { const db = getDb(); try { const tables = await
      » npm install @modelcontextprotocol/sdk
    
Published   Sep 18, 2025
Version   1.3.0
Author   Anthropic, PBC
🌐
npm
npmjs.com › package › @modelcontextprotocol › sdk › v › 0.6.1
MCP TypeScript SDK NPM Version
This TypeScript SDK implements the full MCP specification, making it easy to: Build MCP clients that can connect to any MCP server · Create MCP servers that expose resources, prompts and tools ... import { Client } from "@modelcontextproto...
      » npm install @modelcontextprotocol/sdk
    
Published   Sep 18, 2025
Version   0.6.1
Author   Anthropic, PBC
🌐
Apidog
apidog.com › blog › mcp-server-connect-claude-desktop
Let's Build TypeScript MCP Server and Connect to Claude Desktop
April 9, 2025 - What Is the Model Context Protocol (MCP)?Why Use MCP?PrerequisitesStep 1: Setting Up Your ProjectStep 2: Creating Your MCP Server in TypeScriptStep 3: Register Your Server with Claude DesktopStep 4: Connecting MCP Server to Claude DesktopUsing Claude Desktop to Test Your MCP ServerMessage Flow Overview1.
🌐
GitHub
github.com › cliffhall › mcp-typescript-sdk
GitHub - cliffhall/mcp-typescript-sdk: The official Typescript SDK for Model Context Protocol servers and clients
This pair of examples demonstrates tools, resources, prompts, sampling, elicitation, tasks and logging. For a guided walkthrough and variations (stateless servers, JSON-only responses, SSE compatibility, OAuth, etc.), see docs/server.md and docs/client.md. An MCP server is typically created with McpServer and connected to a transport such as Streamable HTTP or stdio. The SDK supports:
Author   cliffhall
🌐
Google AI
discuss.ai.google.dev › gemini api › documentation
Gemini + MCP typescript example - Documentation - Google AI Developers Forum
February 24, 2025 - Google AI Developers Forum · Gemini + MCP typescript example · Gemini API · Documentation · model · sigmasd · April 2, 2025, 11:58pm · github.com/sigmaSd/gemini-2-cookbook-deno · gemini-mcp.ts · master
🌐
OptinAmpOut
optinampout.com › blogs › getting-started-with-mcp-servers › mcp-typescript-examples
Implementing MCP Servers with TypeScript | OptinAmpOut
# Create a new directory for your project mkdir mcp-sqlite-server cd mcp-sqlite-server # Initialize your project npm init -y # Install required dependencies npm install @mcp/sdk@latest sqlite3 better-sqlite3 typescript ts-node @types/node # Initialize TypeScript configuration npx tsc --init
🌐
Medium
medium.com › @halilxibrahim › simplifying-ai-integration-with-mcp-a-guide-for-typescript-developers-c6f2b93c1b56
Simplifying AI Integration with MCP: A Guide for TypeScript Developers
March 19, 2025 - The TypeScript SDK (@modelcontextprotocol/sdk) brings this protocol to life, offering a simple yet powerful way to create MCP servers and clients. Whether you’re building a command-line tool or a web service, MCP has you covered with standard transports like stdio and Server-Sent Events (SSE). Let’s jump into a quick example ...