smithery-ai-cookbook-ts-smithery-cli
RemoteAbout 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
- 01Compiles the server and launches an interactive playground via @smithery/cli
- 02Handles session configuration passed in through Smithery
- 03Switches between STDIO and HTTP transports with an environment variable
- 04Includes a smithery.yaml deployment configuration
Use cases
- 01Learning how to deploy a TypeScript MCP server on Smithery
- 02Developing locally in HTTP mode and testing tools in the playground
- 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.
https://server.smithery.ai/@smithery-ai/cookbook-ts-smithery-cli/mcpclaude mcp add --transport http ai-smithery-smithery-ai-cookbook-ts-smithery-cli https://server.smithery.ai/@smithery-ai/cookbook-ts-smithery-cli/mcp{"mcpServers":{"ai-smithery-smithery-ai-cookbook-ts-smithery-cli":{"type":"http","url":"https://server.smithery.ai/@smithery-ai/cookbook-ts-smithery-cli/mcp"}}}Open in Cursor{"servers":{"ai-smithery-smithery-ai-cookbook-ts-smithery-cli":{"type":"http","url":"https://server.smithery.ai/@smithery-ai/cookbook-ts-smithery-cli/mcp"}}}Open in VS Code{"mcpServers":{"ai-smithery-smithery-ai-cookbook-ts-smithery-cli":{"type":"http","url":"https://server.smithery.ai/@smithery-ai/cookbook-ts-smithery-cli/mcp"}}}{"mcpServers":{"ai-smithery-smithery-ai-cookbook-ts-smithery-cli":{"serverUrl":"https://server.smithery.ai/@smithery-ai/cookbook-ts-smithery-cli/mcp"}}}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.
https://server.smithery.ai/@smithery-ai/cookbook-ts-smithery-cli/mcpAuth requiredTools
Details
From the project READMETypeScript 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
Features:
- Smithery CLI: Uses
@smithery/clifor 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 configurationpackage.json- Node.js dependencies and scriptssmithery.yaml- Smithery deployment configuration
Quick Start
-
Install dependencies:
npm install -
Run the development server:
HTTP Mode (automatically launches Smithery playground for interactive testing):
npm run dev
Optional - STDIO Mode: If you prefer to run in STDIO mode, you can use:
API_KEY=your-api-key npm run start:stdio -
Deploy your own version: To deploy your own MCP server:
- Connect your repository at https://smithery.ai/new
Comments
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.