Skip to content
bits
Work with coding agents · Lesson 5 of 7 · 6 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:

A server added like this is yours, in this project only. Add --scope project to share it with your team: it's written to a .mcp.json file in the repo. --scope user makes it yours in every project.

Tutor:

Tools change what the agent can know, but it still needs a nudge to use them. Say which source to check and what to bring back: "look up the current Durable Objects alarm API with Context7 and tell me which version the docs are for".

One warning from Anthropic's docs: only add servers you trust. A server that reads the web brings back text written by strangers, and that text lands in your agent's context. A page can contain instructions aimed at your agent (prompt injection), so keep approvals on for anything risky.

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.