Build an MCP Server: Four Questions Before Any Code
Ask Claude to build an MCP server and it asks four questions before writing code: deployment, users, how many actions, and auth. The video covers three deployment paths, two tool-design patterns, and why a tool's description matters more than its name.
It is natural to assume the first step in building an MCP server is writing code. The video says it is not: discovery comes first. When asked to build an MCP server, Claude asks four questions before writing any code, covering deployment, users, how many actions, and auth. Getting that order backwards means you are not tweaking the server later, you are rewriting it.
Three deployment paths, ranked
The video ranks three deployment paths by preference.
- Remote HTTP wins by default for anything wrapping a cloud API. It has zero install friction, one server serves all users, and OAuth flows work properly with redirect handling. It is recommended unless the server must touch the user's local machine.
- MCPB, the Model Context Protocol Bundle, packages a server with its runtime for local distribution. It is the sanctioned way to ship when the server reads local files, drives a desktop app, or talks to localhost services.
- Local stdio via npx is fine for personal prototypes but painful to distribute. The video recommends it only as a stepping stone, with the MCPB upgrade path flagged from the start.
The decision matrix covers seven scenarios. A small API goes remote. A large API goes remote with search plus execute. UI widgets go MCP app. A local desktop tool goes MCPB.
Two tool-design patterns
Pattern A is one tool per action. When the action space is under about fifteen operations, give each action a dedicated tool with a tight description and schema. Claude reads the list once and knows exactly what is possible.
Pattern B is search plus execute. When wrapping a large API with dozens to hundreds of endpoints, listing every operation floods the context window and degrades model performance. Instead, expose two tools: search_actions, which returns matching operations for a natural-language intent, and execute_action, which runs one operation by ID. Context stays lean.
A hybrid option promotes the three to five most-used actions to dedicated tools and keeps the long tail behind search and execute.
Beyond tools
The other three primitives are resources, which are host-browsable docs and data; prompts, which are user-triggered slash commands; and elicitation, which is spec-native mid-tool user input without building any UI. Most servers only need tools, but knowing the others prevents reinventing the wheel.
The description decides
Once the server exists, Claude picks a tool by reading its description, not its name. A description that only restates the name, such as "creates an issue" for create_issue, does not tell Claude when to choose it over a similar tool like update_issue. The more specific the description, the more reliably Claude calls the right tool at the right moment.
Key takeaways
- Discovery comes before code: deployment, users, how many actions, and auth.
- Remote HTTP is the default for cloud APIs because of zero install friction, one server for all users, and working OAuth.
- MCPB is the route when the server must reach local files, desktop apps, or localhost services.
- Local stdio via npx suits personal prototypes and is hard to distribute.
- Under about fifteen operations, use one tool per action. For large APIs, use search plus execute, or a hybrid.
- Resources, prompts, and elicitation exist alongside tools, though most servers only need tools.
- Claude chooses tools by reading descriptions, so a description that repeats the tool's name is a warning sign.
Try it yourself
Paste this into Claude: "Build an MCP server that wraps the GitHub API, with tools for creating issues, searching repositories, and getting pull request details." Then watch four things. Does it ask discovery questions before writing code? Does it recommend remote HTTP as the default and say why? Does it use one tool per action, since three tools is well under the search-plus-execute threshold? And are the descriptions specific enough to tell create_issue apart from update_issue? Then try it on your own API idea.
Chapters
Full transcript(auto-generated, with timestamps)
What do I code first?
[0:00]Someone assumed the first step was writing code for an MCP server. It isn't. Discovery comes first. So, what do I decide first for an MCP server? There are three deployment paths ranked
Three deployment paths
[0:11]By preference. Remote HTTP wins by default for anything wrapping a cloud API. Zero install friction, one server serves all users, and OAuth flows work properly with redirect handling. Recommend this unless the server must touch the user's local machine. MCPB, model context protocol bundle. Packages a server with its runtime for local distribution. The sanctioned way to ship when the server reads local files, drives a desktop app, or talks to localhost services. Local STDIO, via NPX, or UFS is fine for personal prototypes, but painful to distribute. Recommended only as a stepping stone and flag the MCPB upgrade path. The decision matrix covers seven scenarios. Small saw SAPI goes remote. Large saw S goes remote with search plus execute. UI widgets go MCP app. Local desktop goes MCPB. Tool design has two patterns. Pattern A,
Two tool-design patterns
[1:03]One tool per action. When the action space is under about 15 operations, give each a dedicated tool with a tight description and schema. Claude reads the list once and knows exactly what's possible. Pattern B, search plus execute. When wrapping a large API, dozens to hundreds of endpoints, listing every operation floods the context window and degrades model performance. Expose two tools, search actions to return matching operations for a natural language intent, and execute action to run an operation by ID. Context stays lean. The hybrid option promotes the three to five most used actions to dedicated tools, keeping the long tail behind search and execute. Beyond tools, the other three primitives are resources, host browsable docs and data, prompts, user-triggered slash commands, and elicitation. Spec native mid-tool user input without building UI. Most servers only need tools. Knowing the others prevents reinventing wheels.
The description decides
[1:54]There's a subtlety in how well this works once the server exists. Claude picks a tool by reading its description, not its name. A description that just restates the tool's name creates an issue for create issue. Doesn't tell Claude when to reach for it over a similar tool like update issue. The more specific the description, the more reliably Claude calls the right one at the right moment. Build MCP server asks
The carry-out
[2:15]Four questions: deployment, users, how many actions, and auth before it writes any code. Get that order backwards and you're not tweaking the server later, you're rewriting it. Return, paste this
Your turn
[2:25]Into Claude. Build an MCP server that wraps the GitHub API, tools for creating issues, searching repositories, and getting pull request details. Then watch four things. Does it ask discovery questions before writing any code or start scaffolding right away? Does it recommend remote HTTP as the default and say why? Does it use one tool per action since three tools is well under the search plus execute threshold? And are the tool descriptions specific enough to tell create issue apart from update issue? A description that just repeats the tool's name is the tell that it skipped the tool design guidance. Build MCP server, lay them in for bare.
More from Extending Claude — Skills, Plugins & Connectors
2:28Bundling an MCP Server as an MCPB Doesn't Make It Safe
2:56MCP Apps: Your Tool Doesn't Serve the Widget's HTML
2:34I Changed One File on My Cardputer. Do I Reinstall It All?
2:26Your Agent Never Fires If Its Description Lists Skills
2:29Can Claude Build My Claude Code Automations? Not Quite
1:55