[ norboten ]
claude · lab claude-04

The MCP Server That Never Connects

· about 35 minutes · runs on ubuntu-26.04-claude · unrated

An unrated lab. It runs on your machine with no account and no network, and everything about it — the faults, the checks, the hints and the reference solution — is in the repository. An attempt on it is recorded on your profile and never moves a rating: only rated labs do. Rated and unrated labs.

The briefing

Every morning ~/bin/support-digest asks Claude Code to summarise the open support tickets. The tickets come from the team's own MCP server, /opt/tickets/tickets_mcp.py, which the repository ~/support-digest declares in its .mcp.json. The server itself works — the platform team tests it daily — and it wants the queue's API token in TICKETS_TOKEN. The token lives in ~/.config/support-digest/env, which the job reads.

For a week the digest has said there are no tickets, or that it has no way to see them. Someone tried to fix it last Friday and committed what they had. The job's JSON result is ~/digest.json.

This lab runs in a container, as learner with sudo. claude here is the real Claude Code 2.1.270, talking to a scripted model on this machine that asks for the ticket list on every run; Claude Code starts (or fails to start) the MCP server and calls it for real.

What is expected, and graded — the grader runs ~/bin/support-digest itself:

  1. The tickets server starts for the job, and its tools are offered to the model.
  2. The job may call the tool that lists tickets.
  3. The tool answers with the real queue, not an authorisation error.
  4. The token is not in any file the repository tracks.

Leave /opt/tickets alone: the server is not the problem.

What is graded

This lab runs in a container — Docker or Podman, no VM — so there is no boot to survive: the checks run once, against the state you left.

CheckObjective
01_the_server_starts_for_the_jobConfigure a project MCP server that starts for a headless run
02_the_job_may_call_the_toolLet a job call exactly the MCP tool it needs
03_the_tool_is_authorisedPass an MCP server its credentials without committing them
04_no_token_in_the_repositoryPass an MCP server its credentials without committing them

Start it

  1. 2Labs
  2. claude-04select this one
  3. udownload it
  4. sstart the machine

Reading

Where the lab's hints send you, level by level, as you ask for them (h, then l opens a journal section in the TUI).

Theory for this lab

4 questions on the same topic, in the lab's Theory tab. They never affect the lab's grade. Three of them, to answer here:

Question 1

A project's .mcp.json declares a server named `tickets` with a tool `list_tickets`. What name must a job pass to --allowedTools so that it may call that tool in dontAsk mode?

Question 2

.mcp.json passes `"env": {"TICKETS_TOKEN": "${TICKET_TOKEN}"}` to a stdio server, and TICKET_TOKEN is not set in Claude Code's environment. What does the server receive?

Question 3

A `claude -p` run offers the model no tools from a project MCP server, and the server's command works when run by hand. Which setting would explain it?