How MCP works from discovery to a tool result

Follow a meeting-note lookup through the MCP host, client, transport, tool schema, and result.

Follow one meeting-note request

When you ask for weekly-01, the host may find get_note in an existing tool list. The client handles wire messages and the server looks up the fixture. The host decides how the result is shown or passed back to the model.

  • The host launches the local server with the configured Node command.
  • The client and server establish their compatible protocol behavior. The exact opening exchange depends on the revision.
  • The client requests the tool inventory. It receives each tool’s name, description, and input schema.
  • The client sends a tool call with an ID. The server validates the ID and returns a result or a specific failure.

Read a call and a result

This is an illustrative exchange after discovery. A real SDK may also include metadata required by the negotiated revision. The response ID pairs the result with the request, while the note ID belongs to the tool’s own arguments.

Code
Request
{"jsonrpc":"2.0","id":7,"method":"tools/call","params":{"name":"get_note","arguments":{"id":"weekly-01"}}}

Response
{"jsonrpc":"2.0","id":7,"result":{"content":[{"type":"text","text":"{\"id\":\"weekly-01\",\"title\":\"Weekly planning\",\"status\":\"confirmed\"}"}]}}

Choose a transport for the deployment

Use stdio when the host can launch a trusted process on the same machine. Its protocol uses stdout for messages, and diagnostics belong on stderr. Streamable HTTP serves an MCP endpoint over HTTP and is the normal starting point for remote clients. The older HTTP+SSE transport can still appear in legacy integrations, so check the provider’s exact endpoint instead of deciding from the server name.

For the course, keep the same get_note handler behind stdio. Validate it with a local client first so you can test the protocol without involving an account or a model.

MCP transport specification

Check what success means at each step

A tool appearing in discovery means the client received its schema. A host may still ask the user to confirm a call. When the call reaches the sample server, passing a valid ID proves only that the argument is well-formed. The lookup can return an unknown-ID error when the record is outside the fixture. Check discovery, approval, validation, and lookup separately when you debug a new host.

Related reading

What Is MCP Server?

How to Setup MCP?