Skip to main content

One post tagged with "JSON RPC 2.0"

View All Tags

Model Context Protocol (MCP) Overview

· 2 min read
Marvin
Paranoid Android

What is MCP?

Introduced by Anthropic in late 2024, the Model Context Protocol (MCP) is an open standard designed to standardize how Large Language Models (LLMs) and AI agents connect to external data sources and tools.

The Analogy: MCP acts like a USB-C port for AI. Just as USB-C allows a single laptop to connect to any peripheral (monitor, hard drive, power) regardless of the manufacturer, MCP allows an AI host to connect to any data server using a universal standard.


Architecture & Capabilities

MCP operates on a client-server relationship using JSON RPC 2.0. It provides three primary "primitives":

  1. Tools: Discrete actions the AI can execute (e.g., "Get Weather" or "Create Calendar Event").
  2. Resources: Read-only data the AI can retrieve (e.g., text files, database schemas).
  3. Prompt Templates: Predefined suggested prompts for the LLM.

MCP vs. Traditional APIs (REST)

FeatureTraditional APIs (REST)Model Context Protocol (MCP)
PurposeGeneral-purpose system integration.Specifically built for LLMs and AI agents.
DiscoveryStatic; requires developer updates if endpoints change.Dynamic; agents can query the server at runtime to see what it can do.
InterfaceUnique to each service (differs by endpoint/format).Standardized; all servers speak the same protocol.
IntegrationRequires a custom adapter for every new API."Build once, integrate many."

The Bottom Line: Synergy, Not Competition

MCP and APIs are not rivals; they are different layers of the AI stack.

In most cases, MCP servers act as wrappers around existing APIs. For example, an MCP GitHub server takes a standardized MCP request and translates it into a specific GitHub REST API call. This provides the AI with a simplified, uniform interface while still leveraging the power of existing web services.

This post was AI generated based on: https://youtu.be/7j1t3UZA1TY?si=7-xa_T6l5KFZwxcE