Skip to main content
Glama
MCP Server Boilerplate

MCP Server Boilerplate

by ns-personal

MCP Server Boilerplate

A basic Model Context Protocol (MCP) server implementation that can be used as a starting point for building MCP-compatible applications.

Features

  • Basic MCP server setup with TypeScript

  • Example function implementation

  • Graceful shutdown handling

  • Development and production build configurations

Related MCP server: MCP TypeScript Template

Prerequisites

  • Node.js (v14 or higher)

  • npm or yarn

Installation

npm install

Development

To run the server in development mode with hot-reload:

npm run dev

Building for Production

To build the project:

npm run build

To start the production server:

npm start

Project Structure

├── src/
│   └── index.ts    # Main server implementation
├── package.json    # Project dependencies and scripts
├── tsconfig.json  # TypeScript configuration
└── README.md      # This file

Adding New MCP Functions

To add new functions to the server:

  1. Define a new function schema using Zod

  2. Create a function implementation following the MCPFunction interface

  3. Add the function to the server configuration

Example:

const myNewFunction: MCPFunction = {
  name: 'my_new_function',
  description: 'Description of what the function does',
  parameters: z.object({
    // Define your parameters here
  }),
  handler: async (params) => {
    // Implement your function logic here
    return {
      // Return your response here
    };
  }
};

License

ISC

Available Tools

1 tool
echoD

Inputs: message (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    D1.7/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of confusion or overlap between tools, as there are no other tools to compare it against. The tool 'echo' stands alone with no ambiguity in its purpose relative to other tools in the set.

    Naming Consistency5/5

    Since there is only one tool named 'echo', there is no inconsistency in naming patterns to evaluate. The tool name follows a simple, single-word convention, and with no other tools, it cannot be inconsistent.

    Tool Count2/5

    A single tool named 'echo' with no description suggests a minimal or trivial server, which may be insufficient for most practical purposes. While it could be appropriate for a very narrow scope, it likely feels thin and underdeveloped for typical MCP server use cases.

    Completeness1/5

    With only one tool and no description provided, it is impossible to assess coverage of any domain. The tool set is severely incomplete, as there are no other tools to form a coherent surface, and the lack of description makes it unclear what functionality is even intended.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      A starter template for building remote Model Context Protocol servers using TypeScript, providing modern tooling and best practices while leveraging the MCP TypeScript SDK.
      61
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A production-grade TypeScript template for building Model Context Protocol (MCP) servers with declarative tools/resources, authentication, storage abstraction, and support for both local and edge deployment. Provides example echo tools and resources to demonstrate MCP server development patterns.
      214 npm
      Apache 2.0
    • A
      license
      B
      quality
      D
      maintenance
      A template/boilerplate project for building Model Context Protocol (MCP) servers with TypeScript. Provides a starting point with configuration examples, development tools, and debugging setup.
      2
      1
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A template project for quickly building Model Context Protocol (MCP) servers using TypeScript and the official SDK. It includes pre-configured examples for tools and resources to help developers jumpstart their custom MCP server development.
      85 npm
      -