Learn Everything

Paths/AI Engineer/Model Context Protocol / Defining an MCP Server

Guided Taskbeginnerubuntu:24.04Ask AI

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

⏱ 0:00

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
  1. 01

    Create the mcp directory

    Servers, client configs and tool manifests live together - one folder per server.

    mkdir ~/mcp
  2. 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
  3. 03

    Verify the manifest

    cat prints the manifest. The protocol version is the field clients check first.

    cat ~/mcp/server.json
  4. 04

    Submit for validation

    The validator checks the name, the protocol version and the transport.

03Stuck?

0 of 3 revealed

Take a hint without losing the lab — each one points at the thing to look at, not at the answer.

04AI Tutor

guides, never solves

Tell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?

04Notebook

saved locally in this browser

learner@lab — ubuntu:24.04

↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list