Paths/AI Engineer/Model Context Protocol / Defining an MCP Server
Declare an MCP Server Manifest
Every MCP server starts with a manifest - who it is, which protocol version it speaks and how clients should reach it. Write one for a documentation server.
Validator
IDLE — checks run live as you type commands; submit when done
01Requirements
live checks- Directory ~/mcp exists○
- File ~/mcp/server.json exists○
- The manifest names the server and its protocol version○
- The manifest declares the stdio transport○
02Walkthrough
4 steps- 01
Create the mcp directory
Servers, client configs and tool manifests live together - one folder per server.
mkdir ~/mcp - 02
Write the manifest
name identifies the server, protocolVersion pins the contract it implements, and transport says how the client talks to it. One echo writes the whole document.
echo '{"name": "docs-server", "version": "1.0.0", "protocolVersion": "2024-11-05", "transport": "stdio"}' > ~/mcp/server.json - 03
Verify the manifest
cat prints the manifest. The protocol version is the field clients check first.
cat ~/mcp/server.json - 04
Submit for validation
The validator checks the name, the protocol version and the transport.
03Stuck?
0 of 3 revealedTake a hint without losing the lab — each one points at the thing to look at, not at the answer.
04AI Tutor
guides, never solvesTell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?
04Notebook
saved locally in this browserlearner@lab — ubuntu:24.04
Session is disposable
↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list