MCP TypeScript SDK
by modelcontextprotocol
The Model Context Protocol allows applications to provide context for LLMs in a standardized way, separating the concerns of providing context from the actual LLM interaction. This TypeScript SDK implements the full MCP specification.
Last updated: N/A
What is MCP TypeScript SDK?
The Model Context Protocol (MCP) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. Think of it like a web API, but specifically designed for LLM interactions.
How to use MCP TypeScript SDK?
Use the SDK to build MCP clients that connect to any MCP server, create MCP servers that expose resources, prompts, and tools, utilize standard transports like stdio and SSE, and handle all MCP protocol messages and lifecycle events. Start by installing the package with npm install @modelcontextprotocol/sdk
and follow the quickstart guide to create a simple MCP server.
Key features of MCP TypeScript SDK
Build MCP clients
Create MCP servers
Expose resources, prompts, and tools
Use stdio and SSE transports
Use cases of MCP TypeScript SDK
Contextualizing LLM prompts with external data
Providing tools for LLMs to interact with systems
Creating standardized interfaces for LLM interactions
Building LLM-powered applications with external data access
FAQ from MCP TypeScript SDK
What is MCP?
What is MCP?
MCP is the Model Context Protocol, which allows servers to serve data and functions to LLMs.
What are Resources?
What are Resources?
Resources are like GET endpoints; they provide data to load information into the LLM's context
What are Tools?
What are Tools?
Tools are like POST endpoints; they are used to execute code or produce a side effect.
What are Prompts?
What are Prompts?
Prompts are reusable templates for LLM interactions.
How do I connect to an MCP Server?
How do I connect to an MCP Server?
With client and with the transport protocol!