Build an MCP server that exposes custom tools and data sources to AI models like Claude or GPT
Create an MCP client application that connects to MCP servers and calls their tools inside a chatbot
Wire an existing Express or Hono web server into the MCP protocol using the provided adapter packages
Prototype a weather data server or AI chatbot following the SDK quickstart examples
Version 2 is pre-release, use v1 for production. Server and client roles require separate package imports.
This repository contains the official TypeScript SDK for the Model Context Protocol, commonly abbreviated as MCP. MCP is a standard that lets AI applications pass context, tools, and resources to large language models in a consistent way. Rather than each AI app inventing its own approach for connecting external data or actions to a model, MCP defines a shared format so different pieces of software can work together predictably. This SDK implements that standard for developers writing TypeScript or JavaScript. The SDK is split into two main packages. One is for building MCP servers, which are the pieces of software that expose tools, resources, or prompts to an AI model. The other is for building MCP clients, which are the applications that connect to those servers and use what they offer. Both packages run on Node.js, Bun, and Deno. There are also optional thin adapter packages for wiring MCP servers into popular web frameworks like Express or Hono, if you are already using one of those. A simple MCP server created with this SDK registers named tools with defined input shapes, then listens for requests over a transport such as standard input/output or HTTP. The README includes a short working example of a greeting server to illustrate the pattern, as well as pointers to quickstart tutorials for building a weather server and an AI-powered chatbot client. The main branch at this time contains version 2 of the SDK, which is still in pre-release development. Version 1 remains the recommended choice for production use and will continue receiving bug fixes for at least six months after version 2 reaches a stable release. Documentation for both versions is hosted separately, with the v1 source living on a dedicated branch. The project is open to contributions via GitHub issues and pull requests. Existing code is licensed under MIT, new contributions fall under the Apache License 2.0.
← modelcontextprotocol on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.