MCP consists of three things:

  1. MCP Host(ai application)
  2. MCP Client piece of the host that maintains exclusive connection to the mcp server
  3. MCP server

An MCP Host can connect to multiple MCP servers. It does so by starting multiple MCP clients, each with one connection to the respective server.

The protocol consists of two layers:

  1. Data Layer - JSON-RPC protocol for client-server communication
  2. Transport Layer - Defines communication mechanisms and channels that enable data exchange between servers. Message framing, connection establishment, authorization, etc.

The data layer part is the important part it provides:

  1. Lifecycle management
  2. Server features
  3. Client features
  4. Util features

As a first pass, we will write an MCP server that talks to the block explorer API server and has useful tools. Later we might run the MCP right on the node.

The primitives are the important part. They are as follows:

  1. Tools: Executable functions that AI applications can invoke to perform actions ie file operations, api calls, database queries
  2. Resources: Data sources that provide contextual information(fil econtents, database records, api responses)
  3. Prompts: Reusable templates that help structure interactions with llms <- not sure how these interact...

Each primitive type has associated methods for discovery (*/list), retrieval (*/get), and in some cases, execution (tools/call).

Wow there is a lot that can be done here I think. Example:

You could actually get people to book flights with crypto lmao. Is this how you get to people actually taking bitcoin? Who knows.

Figuring Out Interface Between REST and MCP