Skip to main content
Glama

MCP Server Boilerplate

by ricleedo

get-mcp-docs

Generate documentation for MCP servers built using the boilerplate template. Provides clear API references and implementation guides for developers creating custom MCP server integrations.

Instructions

Make an MCP server

Input Schema

NameRequiredDescriptionDefault
nameYesThe name of the MCP server

Input Schema (JSON Schema)

{ "properties": { "name": { "description": "The name of the MCP server", "type": "string" } }, "required": [ "name" ], "type": "object" }

Implementation Reference

  • Handler function for the 'get-mcp-docs' tool. It generates a code template for a basic MCP server based on the provided name.
    async ({ name }) => { const response = ` # Main file for the MCP server \`\`\`ts import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { z } from "zod"; // Create the MCP server const server = new McpServer({ name: "hello-world", version: "1.0.0", }); // Tool: Store conversation with embeddings server.tool( "hello-world", "Say hello to the user", { name: z.string().describe("The name of the user"), }, async ({ name }) => { const response = \`Hello ${name}\`; return { content: [ { type: "text", text: response, }, ], }; } ); // Start the server async function main() { try { const transport = new StdioServerTransport(); await server.connect(transport); console.error("MCP Hello World Server running..."); } catch (error) { console.error("Error starting server:", error); process.exit(1); } } main().catch(console.error); \`\`\` `; return { content: [ { type: "text", text: response, }, ], }; }
  • Input schema for the 'get-mcp-docs' tool, defining a 'name' parameter as a string.
    { name: z.string().describe("The name of the MCP server"), },
  • src/index.ts:33-98 (registration)
    Registration of the 'get-mcp-docs' tool using server.tool(), including name, description, input schema, and handler function.
    server.tool( "get-mcp-docs", "Make an MCP server", { name: z.string().describe("The name of the MCP server"), }, async ({ name }) => { const response = ` # Main file for the MCP server \`\`\`ts import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { z } from "zod"; // Create the MCP server const server = new McpServer({ name: "hello-world", version: "1.0.0", }); // Tool: Store conversation with embeddings server.tool( "hello-world", "Say hello to the user", { name: z.string().describe("The name of the user"), }, async ({ name }) => { const response = \`Hello ${name}\`; return { content: [ { type: "text", text: response, }, ], }; } ); // Start the server async function main() { try { const transport = new StdioServerTransport(); await server.connect(transport); console.error("MCP Hello World Server running..."); } catch (error) { console.error("Error starting server:", error); process.exit(1); } } main().catch(console.error); \`\`\` `; return { content: [ { type: "text", text: response, }, ], }; } );

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/ricleedo/reasoning-boilerplate-mcp'

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