SM

sammorrowdrums/mcp-typescript-starter

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

8 stars 19 forks Качество 78 Тренд 36MIT

A minimal Model Context Protocol (MCP) server in TypeScript with hello tool, markdown resource, and prompt. Includes VS Code/devcontainer setup and documentation.

Обзор

A feature-complete Model Context Protocol (MCP) server template in TypeScript. This starter demonstrates all major MCP features with clean, production-ready code. - Model Context Protocol - TypeScript SDK - Building MCP Servers This project includes VS Code configuration for seamless development: 1. Open the project in VS Code 2. The MCP configuration is in .vscode/mcp.json 3. Build with Ctrl+Shift+B (or Cmd+Shift+B on Mac) 4. Test the server using VS Code's MCP tools 1. Install the Dev Containers extension 2. Open command palette: "Dev Containers: Reopen in Container" 3. Everything is pre-configured and ready to use! The npm run dev command uses tsx watch for instant reloads during development. Changes to any .ts file will automatically restart the server. The MCP Inspector is an essential development tool for testing and debugging MCP servers.

README

Показан фрагмент оригинального README. Открыть оригинал.

MCP TypeScript Starter

A feature-complete Model Context Protocol (MCP) server template in TypeScript. This starter demonstrates all major MCP features with clean, production-ready code.

📚 Documentation

✨ Features

Category Feature Description
Tools hello Basic tool with annotations
get_weather Tool with structured output schema
ask_llm Tool that invokes LLM sampling
long_task Tool with 5-second progress updates
load_bonus_tool Dynamically loads a new tool
Resources info://about Static informational resource
file://example.md File-based markdown resource
Templates greeting://{name} Personalized greeting
data://items/{id} Data lookup by ID
Prompts greet Greeting in various styles
code_review Code review with focus areas

🚀 Quick Start

Prerequisites

Installation

# Clone the repository
git clone https://github.com/SamMorrowDrums/mcp-typescript-starter.git
cd mcp-typescript-starter

# Install dependencies
npm install

# Build
npm run build

Running the Server

stdio transport (for local development):

npm run start:stdio

HTTP transport (for remote/web deployment):

npm run start:http
# Server runs on http://localhost:3000

🔧 VS Code Integration

This project includes VS Code configuration for seamless development:

  1. Open the project in VS Code
  2. The MCP configuration is in .vscode/mcp.json
  3. Build with Ctrl+Shift+B (or Cmd+Shift+B on Mac)
  4. Test the server using VS Code’s MCP tools

Using DevContainers

  1. Install the Dev Containers extension
  2. Open command palette: “Dev Containers: Reopen in Container”
  3. Everything is pre-configured and ready to use!

📁 Project Structure

.
├── src/
│   ├── tools.ts       # Tool definitions (hello, get_weather, ask_llm, etc.)
Открыть полный README на GitHub

Установка

npx @modelcontextprotocol/inspector -- npx tsx src/stdio.ts
Новичок в MCP? Начните с руководства на mcpskill.org →