get-mcp-docs
Generate documentation for MCP servers to help developers understand available tools, resources, and integration capabilities with AI assistants like Claude and Cursor.
Instructions
Make an MCP server
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name of the MCP server |
Implementation Reference
- src/index.ts:39-97 (handler)The asynchronous handler function for the 'get-mcp-docs' tool. It generates a markdown response containing TypeScript code for a basic MCP server implementation, including a hello-world tool, 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, }, ], }; }
- src/index.ts:33-98 (registration)Registration of the 'get-mcp-docs' tool on the MCP server instance using server.tool(). Specifies the tool name, description, input schema (a 'name' string parameter), and references the inline 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, }, ], }; } );
- src/index.ts:36-38 (schema)Input schema for the 'get-mcp-docs' tool, defined using Zod as an object with a single required 'name' field of type string.{ name: z.string().describe("The name of the MCP server"), },