Track MCP LogoTrack MCP
Track MCP LogoTrack MCP

The world's largest repository of Model Context Protocol servers. Discover, explore, and submit MCP tools.

Product

  • Categories
  • Top MCP
  • New & Updated
  • Submit MCP

Company

  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

© 2026 TrackMCP. All rights reserved.

Built with ❤️ by Krishna Goyal

    Mcp Ts Starter

    Typescript starter for MCP server with resource, prompt and tool

    5 stars
    JavaScript
    Updated Sep 2, 2025

    Table of Contents

    • Features
    • Getting Started
    • Prerequisites
    • Installation
    • Build
    • Running the Server
    • HTTP/SSE Transport (Web Browsers)
    • STDIO Transport (Command Line)
    • Testing the Server
    • Testing with cURL
    • Testing with MCP Inspector
    • Server API
    • Resources
    • Tools
    • Prompts
    • Troubleshooting
    • License

    Table of Contents

    • Features
    • Getting Started
    • Prerequisites
    • Installation
    • Build
    • Running the Server
    • HTTP/SSE Transport (Web Browsers)
    • STDIO Transport (Command Line)
    • Testing the Server
    • Testing with cURL
    • Testing with MCP Inspector
    • Server API
    • Resources
    • Tools
    • Prompts
    • Troubleshooting
    • License

    Documentation

    Hello World MCP Server

    A simple Model Context Protocol (MCP) server implementation built with TypeScript. This server demonstrates basic MCP functionality including resources, prompts, and tools.

    Features

    • SSE and STDIO transport support
    • Resource handling with static and dynamic resources
    • Sample prompt implementation
    • Example tool that echoes messages
    • Debug tool for server introspection

    Getting Started

    Prerequisites

    • Node.js (v16 or higher)
    • npm or yarn

    Installation

    bash
    npm install

    Build

    bash
    npm run build

    Running the Server

    HTTP/SSE Transport (Web Browsers)

    bash
    npm run start:http

    This starts the server on http://localhost:3000 with:

    • SSE endpoint at /sse
    • Message endpoint at /messages

    STDIO Transport (Command Line)

    bash
    npm run start

    This runs the server in stdio mode for command-line integrations.

    Testing the Server

    Testing with cURL

    1. Start the HTTP server:

    bash
    npm run start:http

    2. In a terminal window, connect to the SSE endpoint:

    bash
    curl -N http://localhost:3000/sse

    You should see a response like:

    code
    event: endpoint
       data: /messages?sessionId=YOUR_SESSION_ID

    3. In another terminal window, send a request to invoke the echo tool:

    bash
    curl -X POST \
         "http://localhost:3000/messages?sessionId=YOUR_SESSION_ID" \
         -H 'Content-Type: application/json' \
         -d '{
           "jsonrpc": "2.0",
           "id": 1,
           "method": "tools/invoke",
           "params": {
             "name": "echo",
             "parameters": {
               "message": "Testing the MCP server!"
             }
           }
         }'

    4. You should see a response in the SSE terminal window:

    code
    event: message
       data: {"jsonrpc":"2.0","id":1,"result":{"content":[{"type":"text","text":"Hello Testing the MCP server!"}]}}

    5. Try the debug tool to see available server methods:

    bash
    curl -X POST \
         "http://localhost:3000/messages?sessionId=YOUR_SESSION_ID" \
         -H 'Content-Type: application/json' \
         -d '{
           "jsonrpc": "2.0",
           "id": 2,
           "method": "tools/invoke",
           "params": {
             "name": "debug",
             "parameters": {}
           }
         }'

    Testing with MCP Inspector

    For a visual interface, you can use the MCP Inspector tool:

    1. Connect to http://localhost:3000/sse in the MCP Inspector

    2. Browse available resources and tools

    3. Invoke tools interactively

    MCP Inspector HTTP Mode

    MCP Inspector STDIO Mode

    Server API

    Resources

    • hello://world - A static hello world resource
    • greeting://{name} - A dynamic greeting with a name parameter

    Tools

    • echo - Echoes back a message with "Hello" prefix
    • debug - Lists all available tools and methods

    Prompts

    • helpful-assistant - A basic helpful assistant prompt

    Troubleshooting

    • If you get "Headers already sent" errors, make sure you're not manually setting headers
    • Session ID handling is crucial for proper message routing
    • Check the server console for debugging information

    License

    MIT

    Similar MCP

    Based on tags & features

    • WA

      Waha Mcp

      JavaScript00
    • WI

      Wizzy Mcp Tmdb

      JavaScript00
    • RI

      Rijksmuseum Mcp

      JavaScript·
      59
    • MC

      Mcp Server Playwright

      JavaScript·
      262

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k
    View All MCP Servers

    Similar MCP

    Based on tags & features

    • WA

      Waha Mcp

      JavaScript00
    • WI

      Wizzy Mcp Tmdb

      JavaScript00
    • RI

      Rijksmuseum Mcp

      JavaScript·
      59
    • MC

      Mcp Server Playwright

      JavaScript·
      262

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k