MCP.so
Sign In
Servers

Learning about MCP

@WojciechMatuszewski

Overview

What is Learning about MCP?

Learning about MCP is a personal project that explores the Model Context Protocol (MCP). It documents two transport methods (stdio and SSE), core MCP primitives (Resources, Prompts, Tools, Sampling, Roots, Transports), and the built-in error handling of the MCP SDK. It is intended as a learning resource for developers new to MCP.

How to use Learning about MCP?

The project demonstrates an MCP server implemented in Node.js. For the stdio transport, you provide a path to a server binary; for the SSE transport, you provide a network address. No specific installation or configuration commands are given in the README.

Key features of Learning about MCP

  • Supports stdio and SSE transports
  • Uses JSON‑RPC 2.0 for message formatting
  • Implements Resources, Prompts, and Tools primitives
  • Built‑in error handling via the MCP SDK
  • Server boundaries defined through Roots
  • Explores the Sampling concept

Use cases of Learning about MCP

  • Learning the Model Context Protocol from first principles
  • Understanding how to implement MCP transports (stdio vs SSE)
  • Experimenting with MCP core primitives in a Node.js environment
  • Exploring SDK error handling and server‑client interaction patterns

FAQ from Learning about MCP

What transport methods are supported?

Two transport methods are supported: stdio (requiring a server binary path) and SSE (requiring a network address). The author notes that SSE feels more universal because the server can be deployed separately.

What are the core MCP primitives?

The core primitives are Resources (data the client can use), Prompts (pre‑defined prompt templates), Tools (actions the LLM can trigger via the server), Sampling, Roots (server boundaries), and Transports. The author was unsure about Sampling at the time of writing.

Can I use Fastify to build an MCP server?

The author tried to use Fastify but could not make it work with the existing MCP SDK. The project instead uses only Node.js, and this is presented as a learning opportunity.

How are MCP messages formatted?

Messages are formatted via JSON‑RPC 2.0, as documented in the MCP specification.

Does the SDK handle errors automatically?

Yes. The author notes that the MCP SDK has built‑in error handling: throwing an error in a server tool callback is automatically handled by the client SDK and responded to appropriately.

More from Other