Give your agent tools with MCP (Python) · Challenge 01 · 中文版

What MCP actually is (2026-07-28)

Checkpoint l0110 ptsself-reported — code from verify.pyClaude Code 2.x (protocol: MCP 2026-07-28)

A stateless JSON-RPC 2.0 surface for tools — no handshake, no sessions, versions in _meta.

Doing this with your agent? One sentence starts the whole course:

Read https://flypython.com/skills/flypython/SKILL.md and start the FlyPython course `mcp-server-in-python`.

What MCP actually is (2026-07-28)

Objective

A stateless JSON-RPC 2.0 surface for tools — no handshake, no sessions, versions in _meta.

The lesson

Read TASK.md, then run the verifier both ways. The 2026-07-28 specification removed the initialize handshake and sessions: servers answer tools/list and tools/call directly, and each request self-describes its protocol version through _meta. Poke the wire samples in scenario/requests/ by hand while you read.

Exercise

  • Predict the response to 04-removed-initialize.json before checking TASK.md
  • Map each expected starter failure to a spec line

Checkpoint

The lesson’s commands run, and you can answer these in your own words (the agent asks; you answer — that is the gate):

  1. Which command did this lesson run, and what did it decide?
  2. What failed at the start, and why — in your own words?
  3. Before trusting a similar change next time, what would you check first?

Expected evidence

The command transcript and your answers.

Hints

Stuck? Open one at a time.

Hint 1 — What this checkpoint tests

Understanding the shape before coding: MCP 2026-07-28 is a stateless JSON-RPC 2.0 surface — no initialize handshake, no sessions, versions travel in _meta.protocolVersion.

Hint 2 — Say what is absent

List what the old flow had that this spec removed: initialize, sessions, roots, sampling. If initialize arrives, the right answer is a -32601 error, not a handshake.

Hint 3 — When you are done

You can describe the whole lifecycle in one line: a request dict in, a response dict out.

Submit

Done? Record it.

The 8-character code verify.py progress printed for this checkpoint — from the browser, or straight from your agent.

Youbrowser

Submit the claim code

Your agentauto-submit

Let the agent solve and submit

Hand it this checkpoint (copy button on hover) — it solves, verifies, and submits on its own:

Work on the FlyPython challenge "Give your agent tools with MCP (Python)" (course id course-mcp-tools), checkpoint l01.
Machine-readable brief: https://flypython.com/api/challenges/mcp-server-in-python
Open the course folder and read TASK.md first — it is the contract.
Rules: smallest change, no new dependencies, never edit tests/ or solution/.
Check with python verify.py until its gates pass, then report each claim code to me.
Target: solve only checkpoint l01, and submit it as soon as it passes.

With a token from your agent page (env FLYPYTHON_TOKEN), it records the result directly:

curl -X POST https://flypython.com/api/claims \
  -H "Authorization: Bearer $FLYPYTHON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"claims":[{"course":"mcp-server-in-python","checkpoint":"l01","code":"<8-char code>"}]}'

Or install the full FlyPython agent skill once and skip the paste.

Files

The starter and verifier

Solving runs on your machine — your agent fetches the course files itself via /api/challenges/mcp-server-in-python/files; you download nothing by hand. Prefer reading the source? Browse the folder on GitHub ↗