mcpField
S
smithery-ai-cookbook-ts-smithery-cli

smithery-ai-cookbook-ts-smithery-cli

Remote
github.com/smithery-aiDeveloper Tools20Updated 57w ago
Repository

About smithery-ai-cookbook-ts-smithery-cli

A simple TypeScript MCP server built with the official MCP TypeScript SDK and @smithery/cli. It is aimed at developers who want to host streamable HTTP servers on Smithery while keeping STDIO support for compatibility.

Key features

  1. 01Compiles the server and launches an interactive playground via @smithery/cli
  2. 02Handles session configuration passed in through Smithery
  3. 03Switches between STDIO and HTTP transports with an environment variable
  4. 04Includes a smithery.yaml deployment configuration

Use cases

  1. 01Learning how to deploy a TypeScript MCP server on Smithery
  2. 02Developing locally in HTTP mode and testing tools in the playground
  3. 03Running the server in STDIO mode for existing clients

MCP support

This project is an MCP server that exposes MCP tools from src/index.ts and handles session configuration passed in by Smithery.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://server.smithery.ai/@smithery-ai/cookbook-ts-smithery-cli/mcp
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

All endpoints
Streamable HTTPhttps://server.smithery.ai/@smithery-ai/cookbook-ts-smithery-cli/mcpAuth required

Tools

Details

From the project README

TypeScript MCP Server with Smithery CLI

A simple Typescript MCP server built using the official MCP Typescript SDK and smithery/cli. This example demonstrates how you can host streamable HTTP servers on Smithery using smithery/cli, with STDIO support for backwards compatibility.

See the complete guide: https://smithery.ai/docs/migrations/typescript-with-smithery-cli

Try it live on Smithery

Features:

  • Smithery CLI: Uses @smithery/cli for compiling your server and launching interactive playground
  • Smithery Session Configuration: handles user's session configuration passed via Smithery
  • HTTP Transport: Can run with both STDIO and HTTP transports using TRANSPORT env variable

Prerequisites

  • Node.js 22 or higher
  • npm package manager

Project Structure

  • src/index.ts - Main server implementation with MCP tools and session configuration
  • package.json - Node.js dependencies and scripts
  • smithery.yaml - Smithery deployment configuration

Quick Start

  1. Install dependencies:

    npm install
    
  2. Run the development server:

    HTTP Mode (automatically launches Smithery playground for interactive testing):

    npm run dev
    
    Smithery Playground

    Optional - STDIO Mode: If you prefer to run in STDIO mode, you can use:

    API_KEY=your-api-key npm run start:stdio
    
  3. Deploy your own version: To deploy your own MCP server:

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.