04.04 · Concept
Packaging it for other people
Ship a server somebody else can install without reading your source.
No video curated for this lesson yet
This lesson is written, ordered and part of the path - the video slot is the only thing still open. We are working through Agents & MCP lesson by lesson; 56 of 60 have their video so far.
The written notes below cover this idea in full - you lose nothing by reading instead of watching.
A packaged MCP server needs a stable executable or documented HTTP endpoint, declared metadata, and copyable client configuration. That lets an MCP client start the transport, complete initialise, and discover tools, resources, and prompts without source-tree knowledge or setup instructions being pasted into an agent conversation.
What this lesson answers
- how to package an MCP stdio server
- what goes in MCP server client config
- why MCP server install fails before initialise
Notes
Packaging an MCP Server — Packaging exists so an MCP client such as Claude Code can discover, launch, and configure your server from documented install commands instead of reverse-engineering your source tree; without it, the run breaks before `initialize` because the client cannot start the correct `stdio` or streamable HTTP process.
Key Concepts: - MCP specification revision `2025-06-18` defines the client/server lifecycle starting with `initialize`, so your package must make the server executable before any `tools/list`, `resources/list`, or `prompts/list` call can succeed.
Common questions
- What does packaging change for an MCP server?
- Packaging turns a local implementation into something a client can launch predictably. For stdio, that means a stable command exposed by the package. For streamable HTTP, it means a documented base URL and headers. The client should not need to infer entry points, routes, or environment variables from the repository.
- Why does my MCP server fail before initialise?
- The client has to start the server process before it can negotiate the MCP lifecycle. If the installed package does not expose the expected command, or the command is not on the path, the launch fails first. The trace usually looks like a missing executable rather than a tool or protocol error.
- What should be stable in a published MCP server?
- Keep the executable name, product name, tool names, resource URIs, prompt names, and protocol version stable across packaged releases. Clients cache and display these values, and observability systems compare them over time. Renaming them casually creates confusing traces and breaks saved client configuration.
Short definition: what is Packaging it for other people?