Skip to main content
Glama
ricleedo

MCP Server Boilerplate

by ricleedo

get-mcp-docs

Generate documentation for MCP servers by providing a server name. This tool helps developers create structured documentation from the MCP Server Boilerplate template.

Instructions

Make an MCP server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the MCP server

Implementation Reference

  • The handler function for the 'get-mcp-docs' tool. It generates a markdown-formatted TypeScript code snippet for a basic MCP server implementation and returns it as text content.
      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 single 'name' parameter as a string using Zod.
    {
      name: z.string().describe("The name of the MCP server"),
    },
  • src/index.ts:33-98 (registration)
    Registration of the 'get-mcp-docs' tool using the McpServer.tool() method, specifying 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,
            },
          ],
        };
      }
    );

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.0
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

D1.7/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. 'Make an MCP server' suggests a creation/write operation but doesn't specify what gets created (files, configuration, documentation), whether it requires specific permissions, what the output format is, or any side effects. The description doesn't address error conditions, rate limits, or authentication requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

While the description is technically concise (three words), it's under-specified rather than efficiently informative. The single phrase 'Make an MCP server' doesn't provide enough context to be genuinely helpful. A truly concise description would front-load essential information about the tool's purpose and output.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations, no output schema, and a description that provides minimal context, this is severely incomplete. The agent cannot determine what the tool actually does, what it returns, when to use it, or how it behaves. The description fails to compensate for the lack of structured metadata, leaving critical gaps in understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% description coverage with a single parameter 'name' documented as 'The name of the MCP server'. The description doesn't add any additional semantic context about this parameter beyond what the schema already provides. Since schema coverage is high, the baseline score of 3 is appropriate - the description neither enhances nor detracts from parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Make an MCP server' is a tautology that essentially restates the tool name 'get-mcp-docs' in different words. It doesn't specify what action is actually performed (e.g., retrieve documentation, create server files, generate configuration) or what resource is being manipulated. The description fails to distinguish this tool from its sibling 'hello-world' or explain what 'making' an MCP server entails.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, appropriate contexts, or comparison with the sibling 'hello-world' tool. The agent receives no information about whether this is for development setup, documentation retrieval, or configuration generation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools