Skip to main content
Mythos

How to build your first MCP server is a practitioner's guide to creating a @Model Context Protocol server that connects any data source or tool to @Claude Code, Claude.ai, or any MCP-compatible AI client. MCP servers are the connective tissue of the @Augmentation Stack — they turn isolated tools into AI-accessible infrastructure.

What an MCP Server Does

An MCP server is a lightweight program that exposes tools (actions the AI can take), resources (data the AI can read), and prompts (reusable instruction templates) to AI clients through a standardized protocol. The AI client discovers what the server offers and calls it as needed. See: @MCP vs RAG. Examples of what MCP servers connect:

  • A database → the AI can query and write data
  • A file system → the AI can read and manage files
  • A browser → the AI can navigate, click, and extract information
  • A knowledge base like @MythOS → the AI can search, read, create, and update memos
  • An API → the AI can call any external service

The Quickest Path: TypeScript SDK

npm init -y
npm install @modelcontextprotocol/sdk

Create server.ts:

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

const server = new McpServer({
  name: "my-first-server",
  version: "1.0.0"
});

// Define a tool
server.tool("hello", "Say hello to someone", {
  name: { type: "string", description: "Name to greet" }
}, async ({ name }) => ({
  content: [{ type: "text", text: `Hello, ${name}! This is your first MCP tool.` }]
}));

// Start the server
const transport = new StdioServerTransport();
await server.connect(transport);

Register it with Claude Code:

claude mcp add my-first-server node server.ts

That's it. Claude Code can now call your hello tool.

From Hello World to Useful

The jump from a demo to something valuable follows a pattern:

  1. Pick a data source you query manually. A project database, a spreadsheet, an API you check daily. The best first MCP server automates a lookup you do repeatedly
  2. Expose read-only tools first. search, get, list. Let the AI query your data without modifying it. Build trust before adding writes
  3. Add write tools when the reads are reliable. create, update, delete. Gate destructive operations with confirmation patterns or safety annotations (destructiveHint: true)
  4. Add resources for static context. Configuration, schemas, documentation. Resources load into context without the AI needing to call a tool
  5. Add prompts for complex workflows. Reusable instruction templates that combine multiple tools into a coherent sequence

Transport Options

  • stdio — for local servers running on your machine. Claude Code, Claude Desktop, and Cursor use this. The server runs as a child process of the AI client
  • Streamable HTTP — for remote servers accessible over the network. Claude.ai connectors and cross-device access use this. Requires hosting the server somewhere accessible @MythOS MCP supports both: stdio via the mythos-mcp npm package, Streamable HTTP via mythos.one/api/mcp.

What Makes a Good MCP Server

From building and using MCP servers across @BrianBot's 57-agent ecosystem:

  • Safety annotations on every tool. readOnlyHint, destructiveHint, idempotentHint. These tell the AI client how to handle permissions
  • Descriptive tool names and descriptions. The AI decides which tool to call based on the name and description. Vague names produce wrong tool calls
  • Error messages that help the AI recover. "Not found: memo ID abc123 does not exist" is better than "Error 404." The AI can retry with a different approach if it understands what went wrong
  • Scoped access. Don't expose everything. Expose what the AI needs for the workflows you're building. You can always add more tools later

The Ecosystem

19,710+ MCP servers exist on mcp.so, 11,130+ on PulseMCP. Before building your own, check if someone's already built what you need. Common servers: filesystem, PostgreSQL, GitHub, Slack, Google Drive, Playwright (browser automation), and knowledge platforms like MythOS. The @MCP specification is maintained by the Agentic AI Foundation under the Linux Foundation. SDKs are available for TypeScript, Python, Java, and Go. My first MCP server was a filesystem reader. It took 20 minutes and felt like a party trick. My second was a MythOS connector that gave Claude Code access to my entire knowledge library. That one changed how I work. The jump from "AI can read my files" to "AI can search, read, and write to my knowledge system" is the jump from a demo to @human-AI augmentation. Build the hello world. Then build the thing that connects your AI to the data you actually care about. That's where the value is.

Contexts

  • #claude-code
  • #model-context-protocol
Created with 💜 by One Inc | Copyright 2026