Skip to content
Index Ai Academy
Phase 9 · Building servers

Build a server: tools

Tool definitions, schemas from type hints, results and two kinds of error.

About 45 minutes · Model names, versions and API rules checked November 2026 · A free account opens the whole lesson.
Already have an account? Sign in to open this lesson

What it covers8

First principles

How can a server tell the client what went wrong when a valid tool request cannot be completed?

Protocol errors account for malformed or unsupported messages. A well-formed tool call can still fail while doing its work, and a tool-level result gives the model information it can use to recover.

  1. Starting point

    Dispatcher validates the tool request and its arguments

  2. What changes

    Tool handler attempts the operation

  3. Result

    Structured result reports either output or an actionable execution error

Compare all three steps
  1. Starting point

    Dispatcher validates the tool request and its arguments

  2. What changes

    Tool handler attempts the operation

  3. Result

    Structured result reports either output or an actionable execution error

Complete and reverse the trace

Given Dispatcher validates the tool request and its arguments and Structured result reports either output or an actionable execution error, write down the missing step that connects them.

Compare with the worked step

Tool handler attempts the operation

Now take Tool handler attempts the operation and the result above. Write an input and an implementation that could produce this trace.

Check one starting point

Dispatcher validates the tool request and its arguments. Check that your implementation produces the result shown above.

Try it on a new case

The function receives a valid campaign ID string, but the campaign no longer exists. Where should the error be represented?

Show worked reasoning

Return a tool execution error that tells the caller the campaign is unavailable. The transport and request shape succeeded, so the caller can choose another ID.

Run, change, and build

Check this when debugging. Writing tool descriptions for humans instead of for the model.

Trace the cause · MCP message and permission
  1. Mark which message crosses the client–server boundary and which check determines what the caller may do.
  2. Change the tool input or approved scope. Compare the returned message and stored state to distinguish a denial from an allowed change.
  3. Try the same reasoning on this case. The function receives a valid campaign ID string, but the campaign no longer exists. Where should the error be represented?

Why it matters

Tools are the reason most MCP servers exist: they let a model act. Everything a model knows about a tool comes from its definition, and everything it learns from using one comes from the result. A vague description gets the tool ignored or misused. A raw stack trace teaches the model nothing. This lesson builds the tools half of a server from scratch, including the type-hint magic SDKs use.

What you'll be able to do

  • Write complete tool definitions: name, description, input and output schemas, and annotations
  • Generate a tool's inputSchema from a Python function's signature, the way SDKs do
  • Return results as content blocks and structured content, with paginated, cacheable tool lists
  • Choose correctly between a protocol error and a tool execution error the model can learn from
Quick check
A model calls a tool with an id in the wrong format. What should the tool's result say?
  1. The full Python traceback, for debugging
  2. Nothing: return an empty result
  3. Only "Error", to keep the result short
  4. What was wrong, and what a valid id looks like
Show the answer

What was wrong, and what a valid id looks like

Everything a model learns from a tool comes from its result. A message that says what was wrong and how to fix it lets the model correct the call on its next try.

The idea: a tool is a definition the model reads, and a result it learns from

This rests on JSON-RPC 2.0 in depth and Discovery, capabilities and the two eras: a tool call is a JSON-RPC request, and what the server may offer was announced when the client asked. Here we look at the two messages that matter most, the definition going out and the result coming back.

A tool definition

Think of the instruction card taped to a rented machine: what it's called, what it's for, what you feed it. The person using it may never have seen one before, so the card has to do all the explaining. A model reading a tool is in the same position. tools/list returns definitions like this:

{
  "name": "pause_campaign",
  "title": "Pause a campaign",
  "description": "Pause one running campaign so it stops spending. Use when
    the user asks to stop or hold a campaign. Returns the campaign's new status.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "campaign_id": {"type": "string", "description": "Campaign id, like cmp_103"},
      "reason": {"type": "string", "description": "Short note for the audit log"}
    },
    "required": ["campaign_id"],
    "additionalProperties": false
  },
  "outputSchema": {"type": "object", "properties": {"id": {"type": "string"},
                                                    "status": {"type": "string"}}},
  "annotations": {"readOnlyHint": false, "destructiveHint": false,
                  "idempotentHint": true, "openWorldHint": false}
}
  • name: 1 to 128 characters of letters, digits, _, - and ., unique on this server.
  • title: a friendly name for people. description: what it does and when to use it, written for the model.
  • inputSchema: JSON Schema for the arguments. A tool with no arguments should use {"type": "object", "additionalProperties": false}.
  • outputSchema (optional): the shape of the structured result, so clients can check and rely on it.
  • annotations: hints about behavior. readOnlyHint: it changes nothing. destructiveHint: it may destroy data. idempotentHint: repeating it is harmless. openWorldHint: it reaches outside systems, such as the web.
Quick check
Who is a tool's description written for?
  1. The host's audit log
  2. The model, which reads it to decide on a call
  3. The JSON Schema validator
  4. People, as a friendly name in a menu
Show the answer

The model, which reads it to decide on a call

The description says what the tool does and when to use it, and the model has nothing else to go on.

Annotations help a host decide when to ask the user for approval. But they're the server's own claims, like a "safe for all ages" sticker the maker put on the box. So the spec says clients must treat them as untrusted unless the server itself is trusted.

Listing tools

tools/list takes an optional cursor and returns a page of tools, plus nextCursor if there are more. It's cacheable: results carry ttlMs (how many milliseconds the list stays fresh) and cacheScope ("public" if any cache may share it, "private" if it's per user). Return tools in a fixed order. A list that's identical every time lets clients cache it, and keeps the model's prompt identical too, so prompt caching works.

Quick check
A tool's annotations say readOnlyHint: true, but the server is one you found on a forum. What should the host do?
  1. Refuse to list the tool
  2. Ask the server to prove it
  3. Skip approval prompts, because the tool is read-only
  4. Treat the hint as untrusted and keep its normal approval rules
Show the answer

Treat the hint as untrusted and keep its normal approval rules

Annotations are self-reported. A malicious server could label a destructive tool read-only. Only a trusted server's hints should relax safety checks.

Results: content and structured content

tools/call sends {"name": ..., "arguments": {...}}. The result holds a list of content blocks, the material the model will read:

blockholds
{"type": "text", "text": ...}plain text, the most common
{"type": "image", "data": <base64>, "mimeType": "image/png"}an image, such as a chart
{"type": "audio", ...}audio data
{"type": "resource_link", "uri": ..., "name": ...}a pointer to a resource the client can read later
{"type": "resource", "resource": {"uri": ..., "text": ...}}a resource's contents, embedded

A result can also carry structuredContent: plain JSON data for programs, matching the outputSchema. Think of a store receipt, with printed lines for you and a barcode for the scanner. Good servers send both. Code reads structuredContent reliably, and a text block with the same data as JSON serves clients and models that only read text.

Quick check
What does this print?
result = {"content": [{"type": "text", "text": "12 sold"}],
          "structuredContent": {"sold": 12}, "isError": False}
print(result["structuredContent"]["sold"] + 1)
  1. 12
  2. 12 sold
  3. 13
  4. an error
Show the answer

13

structuredContent holds sold as the number 12, so 12 + 1 is 13. Structured content gives programs real values, while content text is what a model reads.

Two kinds of error

A letter can come back for two reasons. "No such address" means it never got to anyone. "We don't stock that, try the blue one" means someone read it and is helping you. MCP has the same split:

  1. Protocol errors are JSON-RPC errors: an unknown tool or a malformed request. Unknown tools use -32602 (Invalid params). These mean the call itself was broken.
  2. Tool execution errors are normal results with "isError": true and a message in the content: a failed API call, an invalid date, "no campaign with that id". The host passes these back to the model, which can correct itself and retry.

So write execution errors for the model: say what was wrong and what would work. "No campaign cmp_999; ids look like cmp_101 to cmp_106" gets fixed on the next try. "Error 500" doesn't.

In plain words: if the model could fix it, tell the model. That means a normal result with isError: true and a helpful message.

Try it now

Real bodies from the practice server's tools. Watch the three outcomes of a call: a result, an error the model can fix, and a broken call.

Quick check
A model calls get_campaign with {"id": "103"}, but ids look like cmp_103. What should the server return?
  1. An empty result with isError: false, since there's simply no such campaign
  2. A JSON-RPC error -32601, since the server can't find a method for that id
  3. A JSON-RPC error -32603, with the full Python traceback in its message
  4. A result with isError: true and a message like "No campaign 103. Ids look like cmp_103."
Show the answer

A result with isError: true and a message like "No campaign 103. Ids look like cmp_103."

The call was well-formed; the value was wrong. An execution error with a helpful message lets the model fix it on the next call.

In your own words
A model calls a tool with an id in the wrong format. Should the server answer with a protocol error or an execution error, and why?

Write a sentence or two, then compare it with a good answer in the lesson.

In Python: from a signature to a result

This part builds the registry that turns a function into a definition, then the code that turns a return value into a result, and lints the descriptions.

Schemas from type hints

Writing JSON Schema by hand for every tool is tedious and drifts out of date. So SDKs read the labels on your function instead, the same inspect trick FastAPI uses:

import inspect, json

JSON_TYPES = {str: "string", int: "integer", float: "number", bool: "boolean",
              list: "array", dict: "object"}

def schema_for(fn):
    props, required = {}, []
    for name, p in inspect.signature(fn).parameters.items():
        props[name] = {"type": JSON_TYPES[p.annotation]}
        if p.default is inspect.Parameter.empty:
            required.append(name)
    return {"type": "object", "properties": props, "required": required,
            "additionalProperties": False}

def search_products(query: str, max_price: float = 500.0, in_stock: bool = True):
    """Search the catalog by keywords. Use it for questions on what the shop sells."""

print(inspect.getdoc(search_products))
print(json.dumps(schema_for(search_products), indent=1))
It runs right here in your browser, with nothing to install.

The docstring becomes the description, parameters without defaults become required, and the type hints become JSON types. With the official Python SDK (version 2, the first to speak the 2026-07-28 revision), a whole server looks like this:

from mcp.server import MCPServer

mcp = MCPServer("shop")

@mcp.tool()
def search_products(query: str, max_price: float = 500.0) -> list[dict]:
    """Search the catalog by keywords. Use it for questions on what the shop sells."""
    return catalog.search(query, max_price)

mcp.run()                     # stdio; other transports are an argument away

SDK names and options change between versions (version 1 called this class FastMCP), so check its docs. The ideas don't change.

Quick check
From the lesson on validating requests: a schema names the required fields and their types. A tool's inputSchema is such a schema. What does this print for three sets of arguments?
schema = {
    "type": "object", "required": ["id"], "properties": {"id": {"type": "string"}}}

def problems(arguments):
    found = [f"missing {name}" for name in schema["required"] if name not in arguments]
    found += [f"{name} must be a string" for name, value in arguments.items()
              if name in schema["properties"] and not isinstance(value, str)]
    return found

print(problems({"id": "cmp_103"}), problems({"id": 103}), problems({}))
  1. [] ['id must be a string'] []
  2. [] [] ['missing id']
  3. [] ['id must be a string'] ['missing id']
  4. ['missing id'] ['id must be a string'] ['missing id']
Show the answer

[] ['id must be a string'] ['missing id']

The first call fits the schema. The second sends a number where the schema asks for a string, and the third leaves out a required field. A model reads the same schema to decide what to send, so a precise schema prevents most bad calls before they happen.

Worked example

Turning a return value into a result

Strings become text. Data becomes structuredContent plus a text copy. Exceptions meant for the model become execution errors.

import json

class ToolError(Exception):
    """Raise with a message written for the model."""

def to_result(fn, arguments):
    try:
        value = fn(**arguments)
    except ToolError as err:
        return {"resultType": "complete",
                "content": [{"type": "text", "text": str(err)}], "isError": True}
    if isinstance(value, str):
        return {"resultType": "complete", "content": [{"type": "text", "text": value}],
                "isError": False}
    return {"resultType": "complete",
            "content": [{"type": "text", "text": json.dumps(value)}],
            "structuredContent": value, "isError": False}

def stock(sku: str):
    levels = {"TENT-2": 12, "MUG-1": 0}
    if sku not in levels:
        raise ToolError(f"Unknown sku {sku!r}. Known skus: {', '.join(levels)}.")
    return {"sku": sku, "in_stock": levels[sku]}

print(to_result(stock, {"sku": "TENT-2"}))
print(to_result(stock, {"sku": "tent"}))
In the lesson you can change this and run it.

The good call returns structured data and a JSON text copy. The bad one returns a normal result flagged isError, with a message listing the valid skus. That's everything the model needs to retry correctly.

Drill

An error the model can fix

When a model sends a bad argument, the error should say how to fix it. Write id_problem(value, prefix): return None if value is prefix + _ followed by one or more digits; otherwise return Expected an id like PREFIX_104 (PREFIX_ then digits); got VALUE, with the value shown by repr.

def id_problem(value, prefix):
    return None if value.startswith(prefix) else "bad id"


print(id_problem("103", "cmp"))
In the lesson, your code is checked as you write it.

Writing tools a model can use well

The description isn't documentation for developers. It's the only thing the model reads when choosing what to do, so it deserves more care than any other string in your server. Treat it as a job description for someone starting today.

Compare these two:

  • "Gets order." The model doesn't know when to use it, or what it needs.
  • "Look up one order by its id, like ord_123. Returns status, items and total. To find orders by customer email, use find_orders instead."

The second says when to use it, what it takes, what comes back, and when to use something else. In practice, improving descriptions often helps more than changing the model.

Quick check
What does the better description add that "Gets order." lacks?
  1. When to use it, what it takes and what comes back
  2. The code that implements the tool
  3. A longer and more formal tool name
  4. The developer's name and the release date
Show the answer

When to use it, what it takes and what comes back

It also says when to use a different tool. Improving descriptions often helps more than changing the model.

Descriptions decide which tool is picked

The practice model is a stand-in that picks a tool by the words it shares with the question, not a language model, but real models also choose by description. The same two tools, with a vague and then a clear description for one of them:

import requests

QUESTION = "Where is order ord_123, and what is its status?"
SCHEMA = {"type": "object", "properties": {"order_id": {"type": "string"}},
          "required": ["order_id"]}
FIND = {"name": "find_orders", "input_schema": {"type": "object", "properties": {
        "email": {"type": "string"}}, "required": ["email"]},
        "description": "Find a customer's orders by email address."}


def picks(description):
    get = {"name": "get_order", "description": description, "input_schema": SCHEMA}
    reply = requests.post("https://api.anthropic.com/v1/messages", timeout=60,
        headers={"x-api-key": "added-by-the-academy-server",
                 "anthropic-version": "2026-10-21"},
        json={"model": "claude-opus-5-5", "max_tokens": 300, "tools": [get, FIND],
              "messages": [{"role": "user", "content": QUESTION}]})
    block = next(b for b in reply.json()["content"] if b["type"] == "tool_use")
    return block["name"]


print(picks("Gets order."))
print(picks("Look up one order by its id, like ord_123, and return its status, "
            "items and total."))

What errors should say

Don't return stack traces. The model can't act on one, and it may reveal your file paths and library versions.

Decide who can fix each problem. If the model can fix it, such as a mistyped date, use a normal result with isError: true and a message explaining what to change. If the call itself was malformed, that's a protocol error. Reporting a fixable problem as a protocol error means the model never sees the message, so it can't try again.

Quick check
A tool is called with the date "2026-13-01". How should the server report the problem?
  1. An empty result, so the model simply moves on to something else
  2. The full stack trace, so the model can see exactly what failed
  3. A protocol error, since the input the model sent was wrong
  4. A normal result with isError: true, saying the month must be 1 to 12
Show the answer

A normal result with isError: true, saying the month must be 1 to 12

The model can fix a mistyped date, so it needs to read the message. A result with isError: true reaches it, and it can try again. A protocol error is for a call that was itself malformed.

Quick check
The question is "Where is order ord_123, and what is its status?". Which description of get_order best helps a model pick it?
  1. Look up one order by its id, like ord_123, and return its status, items and total.
  2. Handles everything to do with orders, customers and accounts in the shop.
  3. Find a customer's orders by email address, newest first.
  4. Gets order.
Show the answer

Look up one order by its id, like ord_123, and return its status, items and total.

A model chooses a tool by its description. This one says what the tool takes, an id like the one in the question, and what it returns, the status that was asked for.

Drill

Lint a tool definition

Write tool_problems(tool): return a list of problems with a tool definition: "description too short" if it's under 40 characters, "say when to use it" if the description doesn't contain use (any case), and "describe PARAM" for each input property without a description, in property order.

TOOL = {
    "name": "get_campaign",
    "description": "Gets a campaign.",
    "inputSchema": {"type": "object",
                    "properties": {"campaign_id": {"type": "string"}, "include_stats": {
                        "type": "boolean", "description": "Add spend and clicks."}}},
}


def tool_problems(tool):
    return []


print(tool_problems(TOOL))
In the lesson, your code is checked as you write it.
In your own words
Why are annotations claims, not guarantees?

Write a sentence or two, then compare it with a good answer in the lesson.

In the SDK and a real host: the same tool in Python and TypeScript

Purpose. See your registry and to_result as the two official SDKs write them, line for line.

Both official SDKs build the definition from your code, run your function and wrap the return value. The 2026-07-28 revision is implemented by version 2 of each: the Python mcp package (version 2.3.0; FastMCP is renamed MCPServer) and the TypeScript @modelcontextprotocol/server package. Version 1 of each still gets fixes.

In an engineer's week. Every server review asks the same three questions about a tool: does the description say when to use it, does the schema stop the bad calls, and do the annotations tell the truth? What goes wrong is a tool added in a hurry with a one-line description, which the model then confuses with its neighbor, and an annotation copied from another tool.

Goes deeper in

In your own words
Your SDK server has two tools whose descriptions overlap, and the model keeps picking the wrong one. What do you change first?

Write a sentence or two, then compare it with a good answer in the lesson.

Portfolio brief

Your own MCP server

Build an MCP server over a small dataset you care about, so a model in any MCP host can search and use it. The starter has a working skeleton: a tool registry, a dispatcher that checks each request's _meta and answers server/discover, tools/list and tools/call, and a test transcript. Replace the trails with your own data, design the tools a model would need to answer real questions about it, and make the server robust to the bad requests models and hosts really send.

Write the tool descriptions for a model, not a person: what each tool is for, when to use it, and what it returns. When you're done, the same design moves to the official SDK in a few lines, as the lesson shows.

It must

  • Your own dataset of at least 15 records, with at least four fields
  • At least three tools, each with a description that says when a model should use it
  • An inputSchema for each tool built from its type hints, with required parameters marked
  • Errors returned as results with isError: true (a bad argument or a missing record), not crashes
  • A JSON-RPC error for an unknown method or an unknown tool, with the right code
  • A test transcript that exercises every tool, a bad argument and an unknown tool

Go further

  • Return structuredContent with an outputSchema alongside the text content
  • Add a resource (a URI that returns one record) and a prompt
  • Port it to the official Python SDK and connect it to a real MCP host on your computer
import json

# Your data: replace this with a small dataset you care about (books, trails, recipes).
TRAILS = [
    {"id": "t1", "name": "Ridge loop", "km": 12.5, "climb_m": 640, "dogs": True},
    {"id": "t2", "name": "Lake path", "km": 5.0, "climb_m": 40, "dogs": True},
    {"id": "t3", "name": "Summit push", "km": 18.0, "climb_m": 1450, "dogs": False},
]

PV = "io.modelcontextprotocol/protocolVersion"
CAPS = "io.modelcontextprotocol/clientCapabilities"
SUPPORTED = ["2026-07-28"]
SERVER_INFO = {"name": "trails", "version": "0.1.0"}
CACHE = {"ttlMs": 300000, "cacheScope": "public"}  # lists and discover carry these
TOOLS = {}


def tool(fn):
    """Register a function as a tool. Its docstring becomes the description."""
    TOOLS[fn.__name__] = fn
    return fn


@tool
def find_trails(max_km: float = 100.0, dogs_allowed: bool = False):
    """Find trails up to max_km long. Set dogs_allowed to keep dog-friendly ones."""
    return [t for t in TRAILS if t["km"] <= max_km and (t["dogs"] or not dogs_allowed)]


def ok(mid, result):
    meta = {"io.modelcontextprotocol/serverInfo": SERVER_INFO}
    return {"jsonrpc": "2.0", "id": mid,
            "result": {"resultType": "complete", **result, "_meta": meta}}


def error(mid, code, message, data=None):
    err = {"code": code, "message": message}
    if data is not None:
        err["data"] = data
    return {"jsonrpc": "2.0", "id": mid, "error": err}


def handle(message):
    """Answer one modern request: server/discover, tools/list and tools/call."""
    method, mid = message.get("method"), message.get("id")
    params = message.get("params", {})
    if method == "initialize":                 # a legacy client: say what we speak
        asked = params.get("protocolVersion")
        text = "This server speaks only " + ", ".join(SUPPORTED) + "; send _meta"
        return error(mid, -32022, text, {"supported": SUPPORTED, "requested": asked})
    meta = params.get("_meta", {})
    missing = [key for key in (PV, CAPS) if key not in meta]
    if missing:
        return error(mid, -32602, "Missing _meta fields: " + ", ".join(missing))
    if meta[PV] not in SUPPORTED:
        return error(mid, -32022, "Unsupported protocol version",
                     {"supported": SUPPORTED, "requested": meta[PV]})
    if method == "server/discover":
        caps = {"tools": {}}
        return ok(mid, {"supportedVersions": SUPPORTED, "capabilities": caps, **CACHE})
    if method == "tools/list":
        tools = [{"name": name, "description": fn.__doc__,
                  "inputSchema": {"type": "object"}} for name, fn in TOOLS.items()]
        return ok(mid, {"tools": tools, **CACHE})
    if method == "tools/call":
        result = TOOLS[params["name"]](**params.get("arguments", {}))
        content = [{"type": "text", "text": json.dumps(result)}]
        return ok(mid, {"content": content, "isError": False})
    return error(mid, -32601, f"Method not found: {method}")


def request(id_, method, **params):
    """A modern request: every one carries its own version and capabilities."""
    params["_meta"] = {PV: "2026-07-28", CAPS: {}}
    return {"jsonrpc": "2.0", "id": id_, "method": method, "params": params}


# A test transcript: what a host would send, and what your server answers.
for message in [
    request(1, "server/discover"),
    request(2, "tools/list"),
    request(3, "tools/call", name="find_trails", arguments={"max_km": 13}),
]:
    print(json.dumps(handle(message))[:200])
In the lesson, you build it here and the tutor can review it.

Choose how to practice

Start with a short baseline or choose guided, independent, or AI-assisted practice.

Practice what you just read

  • 4 code examples you can edit and run
  • a practice exercise that checks your code
  • a 5-question quiz
  • 8 review cards for spaced repetition

Try a quiz question

Which annotation says repeating a tool call with the same arguments is harmless?

  1. idempotentHint
  2. readOnlyHint
  3. destructiveHint
  4. openWorldHint

Answer it at the end of the lesson to see if you're right, and why.

Before this lesson

Keep learning

Where this lesson leads.

575 lessons in thirteen phases. 176 are free without an account, and a free account opens the rest. See every lesson.

Phase 9 · about 13 hours of study

Model Context Protocol

Build MCP servers, clients and hosts, from the wire format to production 17 lessons 1 free
  1. JSON-RPC 2.0 in depth FreeRequests, notifications, errors and a dispatcher built from scratch.35 min
  2. Versions and stateless requestsRevisions by date, the legacy handshake, per-request _meta and version negotiation.30 min
  3. Discovery, capabilities and the two erasserver/discover, declared capabilities, and talking to legacy and modern software alike.30 min
  4. Transports I: stdioNewline-delimited JSON over a subprocess's standard streams.30 min
  5. Transports II: Streamable HTTPOne endpoint, required headers, JSON or event-stream replies.40 min
  6. Build a server: toolsTool definitions, schemas from type hints, results and two kinds of error.45 min
  7. Resources and promptsReadable data, URI templates and reusable prompt templates.40 min
  8. The same server with the official SDKsYour registry and dispatcher on the SDK's decorator shape, in Python and TypeScript.40 min
  9. Build a clientMetadata on every request, version fallback, paging and caching.40 min
  10. Hosts: connecting servers to a modelMany servers, one agent: namespacing, routing and approvals.40 min
  11. Progress, subscriptions and multi-round-trip requestsLong-running work, change notifications and asking the user mid-call.45 min
  12. Securing remote servers with OAuthProtected resource metadata, PKCE, audiences and scope challenges.45 min
  13. MCP securityTool poisoning, rug pulls, confused deputies and local-server risks.40 min
  14. Lab: attack and defend a hostPoisoned tools, injected results, token replay and the defenses that stop each.40 min
  15. Testing, designing and shipping serversConformance checks, tool design for models, SDKs and deployment.40 min
  16. MCP in production: gateways, limits and auditAn allowlist, per-user rate limits, header checks and an audit log in front of many servers.35 min
  17. Capstone: a production MCP serverA complete, tested server for the practice shop.45 min
Part of a free course 15 lessons

Build and Deploy MCP Integrations

Build a Model Context Protocol client and server, then verify the integration with a compatible host.

Never trained an AI? Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account. Teach it to write