Skip to content
bits
Work with coding agents · Lesson 5 of 7 · 7 min

Give it new tools

Verified claude-code 2.1.317

Tutor:

Out of the box, Claude Code can read your files, run commands and fetch a web page. MCP servers give it more tools: a docs search, a browser, your issue tracker, a database. You met MCP from the other side in Give your model tools; here you're the one plugging servers in.

Two make an immediate difference when you build with fast-moving libraries:

  • Context7 looks up current docs for a library, version by version. A model's training data is months old; Context7 isn't.

  • Firecrawl searches the web and reads pages as clean text, for when the answer is in a blog post, a changelog or a GitHub issue.

Tutor:

Adding a server is one command (checked November 2026):

Shell
claude mcp add --transport http context7 https://mcp.context7.com/mcp
claude mcp add --transport http firecrawl https://mcp.firecrawl.dev/v2/mcp-oauth

Then, inside Claude Code, run /mcp to see each server's status and sign in where a server asks (Firecrawl opens a browser login). claude mcp list shows the same from your terminal.

Tutor:

Scopes: local (the default: you, this project), project (written to .mcp.json at the repo root and committed, so the team shares it) and user (you, every project). Local servers run as a process: claude mcp add <name> --env KEY=value -- <command> [args...], with everything after -- passed to the server untouched. Put the name before --env: the flag takes several KEY=value pairs and would swallow a name that follows it. Remote servers use OAuth or a --header; /mcp runs the login. Context7 works without a key, and a free key raises its rate limit.

Tutor:

Make tool use explicit in the brief: which server to consult, for what, and what evidence to return (the doc URL and version, the quoted signature). That turns "it probably remembered the API" into a checkable claim.

Threat model: every MCP server is code you run or a service you grant access to, and every fetched page is untrusted input in the context window. Anthropic's docs flag prompt injection from servers that fetch external content. Keep the default permission prompts for writes and commands, prefer read-only tools for research, and don't give a web-reading session secrets it doesn't need.

From memory vs Checked with Context7illustrative: made-up numbers that show the idea, not output from a real modelcompare

promptHow do I schedule a Durable Object to wake up in an hour?

From memory

Use setTimeout inside the Durable Object for 3,600,000 ms. It will keep running until the timer fires.

Checked with Context7

Per the current Durable Objects docs (via Context7): call this.ctx.storage.setAlarm(Date.now() + 3_600_000) and handle it in alarm(). Timers don't survive the object being evicted; alarms do.

quick check+10 neurons
Tutor:

You're about to use a library that shipped a major version last month. Which brief makes the agent's answer checkable?

    Pick one option

    Pick one, then Check.

    Tutor:

    Your turn. Brief an agent to add a reminder that fires in an hour, using a Durable Object alarm in src/reminders.ts. Tell it to check the current docs with Context7 first, to report which version the docs were for, and to run pnpm test. The sandbox has no MCP servers, so Claude replies with how it would go about it.

    Your turn

    Goal Get a plan that checks current docs before writing code, reports the version, and runs the tests

    What good looks likeThe coach checks the reply
    • Names the docs toolnot checked yet
    • Asks for the versionnot checked yet
    • Names the filenot checked yet
    • Names the checknot checked yet
    • Ran at 1.0not checked yet
    • Starts from the docsnot checked yet
    • Says to check the docs before writing any codenot checked yet
    • Asks for evidence from the docs: the version or the page usednot checked yet
    • The reply puts looking up the docs before writing codenice to have

    Run your prompt and the replies land here.

      ~0 tokens

      Turn on JavaScript to run prompts.