From Zero to MCP Publisher in 15 Minutes
Never published an MCP tool? This guide gets you from zero to live on mcpm in 15 minutes flat.
Step 1: Install mcpm CLI (1 min)
npm i -g mcpm-dev
mcpm-dev login
Follow the browser prompt to authenticate with GitHub.
Step 2: Scaffold Your Tool (2 min)
mkdir my-first-mcp && cd my-first-mcp
npm init -y
npm install @modelcontextprotocol/sdk
Step 3: Write the Tool (5 min)
Create index.js:
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
const server = new Server({
name: "my-first-mcp",
version: "1.0.0",
}, {
capabilities: { tools: {} }
});
server.setRequestHandler("tools/list", async () => ({
tools: [{
name: "hello_world",
description: "Returns a friendly greeting",
inputSchema: {
type: "object",
properties: {
name: { type: "string", description: "Who to greet" }
},
required: ["name"]
}
}]
}));
server.setRequestHandler("tools/call", async (request) => {
if (request.params.name === "hello_world") {
const name = request.params.arguments.name;
return {
content: [{ type: "text", text: `Hello, ${name}! ๐` }]
};
}
throw new Error(`Unknown tool: ${request.params.name}`);
});
const transport = new StdioServerTransport();
await server.connect(transport);
Step 4: Test Locally (2 min)
node index.js
In another terminal, configure your MCP client (Claude Desktop, Cursor, etc.) to point to this server.
Step 5: Write a README (2 min)
Create README.md. This becomes your mcpm listing page. Include:
- What the tool does
- How to install and use it
- Available tools and their parameters
Step 6: Publish to mcpm (1 min)
mcpm-dev publish
That's it! Your tool is now live at https://www.mcpm.dev/packages/my-first-mcp.
What's Next?
- Add more tools to your server
- Set up automated testing
- Apply for the verified badge after 100 weekly downloads
What's the first MCP tool you want to build? Share your idea below!
#MCP #Tutorial #Beginner #DevTools #mcpm
From Zero to MCP Publisher in 15 Minutes
Never published an MCP tool? This guide gets you from zero to live on mcpm in 15 minutes flat.
Step 1: Install mcpm CLI (1 min)
Follow the browser prompt to authenticate with GitHub.
Step 2: Scaffold Your Tool (2 min)
mkdir my-first-mcp && cd my-first-mcp npm init -y npm install @modelcontextprotocol/sdkStep 3: Write the Tool (5 min)
Create
index.js:import { Server } from "@modelcontextprotocol/sdk/server/index.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; const server = new Server({ name: "my-first-mcp", version: "1.0.0", }, { capabilities: { tools: {} } }); server.setRequestHandler("tools/list", async () => ({ tools: [{ name: "hello_world", description: "Returns a friendly greeting", inputSchema: { type: "object", properties: { name: { type: "string", description: "Who to greet" } }, required: ["name"] } }] })); server.setRequestHandler("tools/call", async (request) => { if (request.params.name === "hello_world") { const name = request.params.arguments.name; return { content: [{ type: "text", text: `Hello, ${name}! ๐` }] }; } throw new Error(`Unknown tool: ${request.params.name}`); }); const transport = new StdioServerTransport(); await server.connect(transport);Step 4: Test Locally (2 min)
In another terminal, configure your MCP client (Claude Desktop, Cursor, etc.) to point to this server.
Step 5: Write a README (2 min)
Create
README.md. This becomes your mcpm listing page. Include:Step 6: Publish to mcpm (1 min)
That's it! Your tool is now live at
https://www.mcpm.dev/packages/my-first-mcp.What's Next?
What's the first MCP tool you want to build? Share your idea below!
#MCP #Tutorial #Beginner #DevTools #mcpm