Skip to main content
Glama
BoosClues

MCP Server Boilerplate

by BoosClues

hello-world

Generate a personalized greeting by providing a user's name. This tool demonstrates basic functionality for MCP server development.

Instructions

Say hello to the user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the user

Implementation Reference

  • The handler function that executes the logic for the "hello-world" tool, taking a 'name' parameter and returning a text content block with the greeting message.
    handler: async ({ name }) => { const response = `Hello ${name}`; return { content: [ { type: "text", text: response, }, ], }; },
  • The input schema for the "hello-world" tool, defining a required string parameter 'name' using Zod.
    schema: { name: z.string().describe("The name of the user"), },
  • src/tools.ts:104-106 (registration)
    The registration loop in registerTools function that calls server.tool() to register the "hello-world" tool (among others) to the MCP server.
    for (const tool of toolsToRegister) { server.tool(tool.name, tool.description, tool.schema, tool.handler); }
  • src/index.ts:32-32 (registration)
    The call to registerTools in the main server file, which triggers the registration of the "hello-world" tool.
    registerTools(server, enabledTools);
  • src/index.ts:8-8 (registration)
    Import of the registerTools function used to register tools including "hello-world".
    import { registerTools } from "./tools.js";

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/BoosClues/new-MCP-builder'

If you have feedback or need assistance with the MCP directory API, please join our Discord server