Tutorial·2 min read·

MCPservers,zerotoone

How to wire up your first Model Context Protocol server in under twenty minutes.

Abdulhadi Alturafi
Abdulhadi AlturafiApr 15, 2026
MCP servers, zero to one
0

What an MCP server actually is#

A Model Context Protocol server is a small process that exposes tools, resources, and prompts to an AI client. Think of an server as a USB-C port for AI: a single, well-defined way to plug capabilities into Claude.

You write the server. You describe what it can do. Claude, or any MCP-aware client, queries it and uses the tools you exposed.

The minimum viable setup#

Install the SDK:

npm install @modelcontextprotocol/sdk

Then a server file with one tool:

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: "0.1.0" });

server.setRequestHandler("tools/list", async () => ({
  tools: [{
    name: "ping",
    description: "Health check",
    inputSchema: { type: "object", properties: {} },
  }],
}));

server.setRequestHandler("tools/call", async (req) => {
  if (req.params.name === "ping") {
    return { content: [{ type: "text", text: "pong" }] };
  }
});

await server.connect(new StdioServerTransport());

Wire it up#

Register the server in your Claude Code settings under mcpServers. Restart Claude. Call ping. You'll see pong.

That's the loop. Everything else — auth, real tools, resources — is just expanding what tools/list returns and how tools/call responds.

What to build first#

Your first useful MCP server is almost always a wrapper around a CLI you already use. Wrap gh, vercel, or your internal scripts. The friction of "agent runs my tool" drops to zero. That's where the productivity unlock starts.

Like this? Get the next post in your inbox — two emails a week, every one shippable.

0
Cursor vs Claude Code
Read next

Cursor vs Claude Code

When to reach for which. A cheat sheet from someone who lives in both.

Continue reading

More from How to A1