Skip to content

TypeScript SDK

🐍 Looking for Python? See the Python SDK | Looking for Java? See the Java SDK

Build distributed MCP agents with TypeScript and zero boilerplate

Overview

The MCP Mesh TypeScript SDK provides a function-based API for building distributed agent systems:

  • mesh() - Wrap FastMCP with mesh capabilities
  • agent.addTool() - Register tools with capabilities and tags
  • mesh.llm() - Create LLM-powered tools
  • agent.addLlmProvider() - Zero-code LLM providers

Installation

# Install the SDK
npm install @mcpmesh/sdk

# Install the CLI (if not already installed)
npm install -g @mcpmesh/cli

Quick Start

# View the quick start guide
meshctl man quickstart --typescript

# Or scaffold a new agent
meshctl scaffold --name my-agent --lang typescript

Documentation

For comprehensive documentation, use the built-in man pages:

meshctl man --list                      # List all topics
meshctl man <topic> --typescript        # View TypeScript version
meshctl man <topic> --typescript --raw  # Get markdown output

Key Topics

Topic Command Description
Quick Start meshctl man quickstart --typescript Get started in minutes
Mesh Functions meshctl man decorators --typescript mesh(), addTool(), mesh.llm()
Dependency Injection meshctl man di --typescript How DI works
LLM Integration meshctl man llm --typescript Build AI-powered agents
Deployment meshctl man deployment --typescript Local, Docker, Kubernetes

Next Steps

Mesh Functions Reference

Complete API reference

View Reference →

LLM Integration

Build AI-powered agents

Learn More →