Skip to main content
This page provides complete, runnable examples of SDK-embedded MCP servers for various use cases.

Calculator Server

A complete calculator with multiple operations.
calculator.ts

Weather API Server

Fetch real weather data using an external API.
weather.ts

File Storage Server

Manage files with create, read, and list operations.
file-storage.ts

Data Processing Server

Process and analyze data with multiple tools.
data-processing.ts

Multi-Server Application

Combine multiple specialized servers in one application.
multi-server.ts

Environment Configuration Server

Manage environment variables and configuration.
env-config.ts

Running the Examples

All examples can be run with:
Make sure to set any required environment variables (like OPENWEATHER_API_KEY for the weather example).

Next Steps

tool() Function

Learn how to create tools

createSdkMcpServer()

Create server instances

MCP Overview

Understand MCP integration

SDK Examples

More SDK examples