MCP TypeScript Starter

by SamMorrowDrums

7 355 downloads Not rated yet MIT
GitHub

About

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

Details

License
MIT

Explore

| 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 |

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP TypeScript Starter
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- Node.js 20+
- npm or pnpm

npm install

stdio transport (for local development):

npm run start:stdio

HTTP transport (for remote/web deployment):

npm run start:http

bash
npx @modelcontextprotocol/inspector -- npx tsx src/stdio.ts

Copy .env.example to .env and configure:

bash
cp .env.example .env
``

| Variable | Description | Default |
|----------|-------------|---------|
|
PORT | HTTP server port | 3000` |

server.tool(
  "hello",
  {
    title: "Say Hello",
    description: "A friendly greeting tool",
    annotations: { readOnlyHint: true },
  },
  { name: z.string() },
  async ({ name }) => ({
    content: [{ type: "text", text: Hello, ${name}! }],
  })
);
server.tool(
  "long_task",
  { title: "Long Task" },
  { taskName: z.string() },
  async ({ taskName }, { sendProgress }) => {
    for (let i = 0; i < 5; i++) {
      await sendProgress({ progress: i / 5, total: 1.0 });
      await sleep(1000);
    }
    return { content: [{ type: "text", text: "Done!" }] };
  }
);

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp typescript starter": {
            "mcp-typescript-starter": {
                "command": "npx",
                "args": [
                    "@modelcontextprotocol/inspector",
                    "--",
                    "npx",
                    "tsx",
                    "src/stdio.ts"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-typescript-starter": {
        "command": "npx",
        "args": [
            "@modelcontextprotocol/inspector",
            "--",
            "npx",
            "tsx",
            "src/stdio.ts"
        ]
    }
}

CI
TypeScript
Node.js
License: MIT
MCP

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

📚 Documentation

- Model Context Protocol
- TypeScript SDK
- Building MCP Servers

✨ 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

- Node.js 20+
- npm or pnpm

Installation

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.