MCP Quick Start Server

MCP Quick Start Server

mcp-starter-kit-node•byscriptstar

A TypeScript quick-start Model Context Protocol server demonstrating basic tools, a resource template, and a prompt.

License: Not specified•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Provides an add tool that sums two numbers and returns the result as a string.
  • •Provides a fetch-chuck-jokes tool that retrieves a random Chuck Norris joke via an HTTP request.
  • •Exposes a greeting resource template using the greeting://{name} URI scheme that returns a personalized greeting.
  • •Defines a getGreetingAndJoke prompt that guides an AI client to greet a named user and tell a joke.

BEST FOR

  • •Developers learning how to structure an MCP server with tools, resources, and prompts.
  • •Prototyping MCP capabilities that communicate over stdin/stdout.
  • •Testing MCP client interactions such as calling tools, reading resources, and fetching prompts.

ABOUT MCP-STARTER-KIT-NODE

MCP Quick Start Server is cataloged as an MCP server attributed to scriptstar. A TypeScript quick-start Model Context Protocol server demonstrating basic tools, a resource template, and a prompt. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP Quick Start Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What transport does the server use?

It uses StdioServerTransport, listening on stdin and responding on stdout.

How does the greeting resource personalize responses?

It uses a greeting://{name} resource template; requesting greeting://Alice returns Hello, Alice!.

上游原版 README

在 GitHub 查看同一版本原文

README.md · e2e65570420c · 采集于 2026-11-13 11:20:29 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

MCP Quick Start Server

This project is a simple quick-start example of a Model Context Protocol (MCP) server built with TypeScript and the @modelcontextprotocol/sdk. It demonstrates how to define basic tools, resources, and prompts.

Features

  • Tool: add: Adds two numbers.
    • Parameters: a (number), b (number)
    • Returns: The sum as a string.
  • Tool: fetch-chuck-jokes: Fetches a random Chuck Norris joke.
    • Parameters: None
    • Returns: A Chuck Norris joke as a string.
  • Resource: greeting: Provides a personalized greeting.
    • URI Scheme: greeting://{name}
    • Example: greeting://World would provide a greeting for "World".
  • Prompt: getGreetingAndJoke: Instructs an AI client to greet a user by name and then tell them a Chuck Norris joke.
    • Parameter: name (string)
    • Example: Invoking with name: "Narendra" will set up a conversation for the AI to greet Narendra and tell a joke.

Directory Structure

quick-start/
├── build/              # Compiled JavaScript output
├── src/                # TypeScript source files
│   ├── index.ts        # Main server setup and entry point
│   ├── tools/
│   │   └── index.ts    # Tool definitions
│   ├── resources/
│   │   └── index.ts    # Resource definitions
│   └── prompts/
│       └── index.ts    # Prompt definitions
├── .gitignore
├── package-lock.json
├── package.json
├── tsconfig.json
└── README.md           # This file

Prerequisites

  • Node.js (v18.x or later recommended)
  • npm (comes with Node.js)

Setup & Installation

  1. Clone the repository (if you haven't already):

    git clone https://github.com/scriptstar/mcp-starter-kit-node.git
    cd mcp-starter-kit-node
    
  2. Install dependencies:

    npm install
    

Building the Server

To compile the TypeScript code into JavaScript, run:

npm run build

This command executes tsc (the TypeScript compiler) according to the tsconfig.json configuration and places the output in the build/ directory. It also makes the main build file executable.

Running the Server

Once built, you can start the MCP server using:

node build/index.js

Alternatively, for production-like environments, you can use the start script:

npm start

The server will start and listen for messages on standard input (stdin) and send responses to standard output (stdout), as it uses the StdioServerTransport.

Development Workflow

For a more efficient development experience, you can use the dev script:

npm run dev

This command uses concurrently to run two processes:

  1. tsc -w: Watches your TypeScript files for changes and recompiles them automatically.
  2. nodemon build/index.js: Watches for changes in the build directory (where tsc outputs JavaScript) and restarts the Node.js server automatically.

This provides a live-reload-like experience during development.

Linting

This project uses ESLint with TypeScript support to maintain code quality and consistency.

  • To check for linting errors:
    npm run lint
    
  • To automatically fix fixable linting errors:
    npm run lint:fix
    

It's recommended to run the linter before committing code.

How It Works

This server implements the Model Context Protocol.

  • src/index.ts: Initializes an McpServer instance, imports tool, resource, and prompt registration functions from their respective modules, calls these functions to register them with the server, and then connects a StdioServerTransport to handle communication.
  • src/tools/index.ts: Exports a registerTools function.
    • add: Takes two numbers a and b and returns their sum.
    • fetch-chuck-jokes: Makes an HTTP GET request to https://api.chucknorris.io/jokes/random and returns the joke.
  • src/resources/index.ts: Exports a registerResources function.
    • greeting: Defines a resource template greeting://{name}. When this URI is requested, it returns a personalized greeting message.
  • src/prompts/index.ts: Exports a registerPrompts function.
    • getGreetingAndJoke: Defines a prompt that takes a name argument. It constructs a set of initial messages to guide an AI client. The first message (role: assistant) sets the context, and the second message (role: user) formulates the request using the provided name.

Interacting with the Server (Conceptual)

This MCP server is designed to be controlled by an MCP client (e.g., an AI assistant, a development tool). The client communicates with the server by sending JSON-RPC messages to its stdin and receiving responses from its stdout.

Here's how a client might interact with the defined capabilities:

  1. Calling the add tool: A client could send a JSON-RPC request like:

    {
      "jsonrpc": "2.0",
      "method": "callTool",
      "params": { "name": "add", "args": { "a": 5, "b": 3 } },
      "id": "request1"
    }
    

    The server would respond with the result:

    {
      "jsonrpc": "2.0",
      "result": { "content": [{ "type": "text", "text": "8" }] },
      "id": "request1"
    }
    
  2. Accessing the greeting resource: A client could request to read the resource URI greeting://Alice:

    {
      "jsonrpc": "2.0",
      "method": "readResource",
      "params": { "uri": "greeting://Alice" },
      "id": "request2"
    }
    

    The server would respond:

    {
      "jsonrpc": "2.0",
      "result": {
        "contents": [{ "uri": "greeting://Alice", "text": "Hello, Alice!" }]
      },
      "id": "request2"
    }
    
  3. Using the getGreetingAndJoke prompt: A client wanting to initiate this guided task for "Bob" would send:

    {
      "jsonrpc": "2.0",
      "method": "getPrompt",
      "params": {
        "uri": "prompt://getGreetingAndJoke",
        "args": { "name": "Bob" }
      },
      "id": "request3"
    }
    

    The server would respond with the initial messages:

    {
      "jsonrpc": "2.0",
      "result": {
        "messages": [
          {
            "role": "assistant",
            "content": {
              "type": "text",
              "text": "You are a friendly assistant. Your task is to greet the user by their name and then tell them a Chuck Norris joke. You should use the available tools and resources to accomplish this. I will now wait for your instruction to proceed with greeting and joke telling for the specified user."
            }
          },
          {
            "role": "user",
            "content": {
              "type": "text",
              "text": "Please greet Bob and then tell a Chuck Norris joke."
            }
          }
        ]
      },
      "id": "request3"
    }
    

    The AI client would then process these messages and subsequently decide to call the greeting resource (for "Bob") and the fetch-chuck-jokes tool, using separate readResource and callTool requests.

Further Development

  • Add more complex tools with various input/output types.
  • Implement resources that interact with local files or databases.
  • Create more sophisticated prompts for multi-turn conversations.
  • Explore other transport layers (e.g., HTTP) if needed.
  • Add comprehensive error handling and logging.

This README should give a good overview of your project!

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP Quick Start Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-starter-kit-node)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools