James opened his laptop. He had the concept from Module 9.2, Chapter 1: MCP servers give an agent hands. Now he wanted to build one.
He stared at the empty terminal. "Where do I even start? I need the protocol spec, the SDK docs, the testing tools..."
Emma pulled up a chair. "You know the pattern from Module 3. CLAUDE.md plus a skill. Set up the same way: empty directory, configuration file, domain skill. You do not need to become an MCP expert; you need to make Claude Code one."
You are doing exactly what James is doing. Before building an MCP server, you set up Claude Code with the knowledge to build one properly. This takes about 15 minutes: create a project, install one skill, write a configuration file.
Start with an empty directory. Every MCP server you build in this chapter lives here.
Nothing else in it yet. No package.json, no requirements.txt, no boilerplate. Claude Code will generate the right project structure in Module 9.2, Chapter 4 when you ask it to build. The .claude/skills/ directory you create next will survive that process; Claude Code adds project files alongside it, not instead of it.
Run one command to install Anthropic's official mcp-builder skill:
The installer creates a .claude/skills/mcp-builder/ directory inside your project. Look at what it added:
You see a SKILL.md file and supporting directories (reference/, scripts/). The SKILL.md is the core: it contains the protocol knowledge, SDK patterns, best practices, and testing approaches that Claude Code loads when it works in this project.
This is the same skill mechanism you encountered in Module 9.1, Chapter 6, but now you are installing a skill that teaches Claude Code how to build something, not just how to use something.
Create a CLAUDE.md file in the project root. This is the file Claude Code reads every time it starts a session in this directory:
Three rules. Each one prevents a specific failure:
Notice that transport and port are not in the CLAUDE.md yet. You choose those in Module 9.2, Chapter 3 and add them afterward.
You wrote CLAUDE.md files in Module 3 to shape Claude Code as a general agent. This CLAUDE.md is narrower: it configures Claude Code for one specific job, building MCP servers with a defined workflow.
The mcp-builder skill supports both Python (using FastMCP) and TypeScript (using the TypeScript MCP SDK). Before you pick one, ask Claude Code:
Claude Code gives you a detailed comparison because it has the skill loaded. It knows both SDKs, their strengths, their ecosystem differences, and which one fits your background.
For this chapter, Python aligns with what you learned in Module 4. The FastMCP library gives you a clean, decorator-based API for defining tools. TypeScript is equally valid; if you prefer it, every concept in this chapter translates directly.
Your Choice Sticks for This Chapter
Whichever language you pick, the remaining chapters follow that choice. The concepts (tools, transports, testing, connecting to OpenClaw) are identical in both languages. Only the syntax and package manager differ.
Ask Claude Code any MCP question to confirm the skill is loaded and active:
Claude Code should give you a detailed, structured answer that covers the protocol, tool declarations, transport mechanisms, and the server lifecycle. This is not generic chatbot knowledge; it comes from the mcp-builder skill's reference material.
If the answer feels vague or surface-level (just a paragraph saying "MCP stands for Model Context Protocol"), the skill may not have loaded. Check:
If the file exists, open a fresh Claude Code session in the tutorclaw-mcp directory. Claude Code reads skills on session start, not mid-conversation.
The difference between Claude Code with and without this skill is the difference between asking a colleague who read the MCP documentation yesterday and asking someone who has never heard of the protocol. The skill is domain expertise, packaged as a file.
Your project directory now looks like this:
No code yet. No server. No configuration files. Just a CLAUDE.md that sets the rules and a skill that provides the knowledge. This is the same pattern from Module 3: you configured the agent's brain before asking it to do any work.
In the next chapter, you make one decision that shapes your entire server: how it communicates with the outside world.
Open Claude Code in your tutorclaw-mcp directory and send:
What you are learning: Claude Code reads its own skill files and can explain them to you. This is metacognition for agents: the tool knows what it knows.
Send this prompt:
Replace [your domain] with your actual field (education, finance, healthcare, e-commerce). Claude Code uses the mcp-builder skill to suggest domain-appropriate rules.
What you are learning: CLAUDE.md is not a template you copy; it is a living document you refine as your project evolves. Domain-specific rules make the agent sharper.
Send this prompt:
What you are learning: The skill encapsulates hours of documentation reading, SDK exploration, and best-practice research. This is the value proposition of skills from Module 9.1, Chapter 6, now applied to building instead of using.
James leaned back from the screen. "Three files. That is the whole setup."
"Three files and a pattern," Emma said. "CLAUDE.md plus a skill turns a general-purpose agent into a specialist. You did this in Module 3 when you configured Claude Code for your warehouse inventory project. Same idea, different domain."
James thought about his old warehouse. "When I trained a new forklift operator, I did not teach them mechanical engineering. I gave them the manual, the safety checklist, and the keys. The skill is the manual. The CLAUDE.md is the checklist."
Emma paused. "Manual, checklist, keys. That is better than how I have been explaining it." She closed her laptop halfway. "Your workshop is ready. But before you build, you need one decision: how will your server talk to the agent? That is what we figure out next."