MCP (Model Context Protocol)
MCP (Model Context Protocol) is an open protocol through which AI applications connect to external data and tools: files, databases, APIs. Anthropic open-sourced it in November 2024 and in December 2025 donated it to the Agentic AI Foundation, a directed fund under the Linux Foundation.
How MCP works
The AI application, called the host, creates one MCP client for each server it connects to. An MCP server is a program that exposes tools (functions the model can call), resources (data for context) and prompts (prompt templates). Messages use JSON-RPC 2.0, and the transport is stdio for a local server or Streamable HTTP for a remote one (MCP documentation).
The client lists tools with a tools/list request and calls one with tools/call, passing its name and arguments. Each tool has a name, a description and an inputSchema, the JSON Schema of its arguments.
MCP on top of a REST API
An MCP server for market data is usually a thin wrapper over a REST API: one tool, one HTTP request. The API key stays in the server's environment and travels only in the request header (authentication); the model sees just the tool description and the response.
Genesis API has no official MCP server. You write the wrapper yourself; here is a minimal one on the official Python SDK (the mcp package, version 2.0 or later, plus requests):
import os
import requests
from mcp.server import MCPServer
API = "https://api.genesisarbitrage.com/v1"
mcp = MCPServer("genesis-funding")
@mcp.tool()
def funding_rates(coin: str) -> str:
"""A coin's funding rates across exchanges from Genesis API.
Args:
coin: coin ticker, for example BTC
"""
r = requests.get(
f"{API}/funding/rates",
headers={"X-API-Key": os.environ["GENESIS_API_KEY"]},
params={"coin": coin.upper()},
timeout=10,
)
return r.text # JSON: data and meta, or error with a code
if __name__ == "__main__":
mcp.run(transport="stdio")
An MCP-capable assistant launches this file as a local server (the launch command goes into its settings) and gets a funding_rates tool: a coin's funding rates across exchanges from /funding/rates.
See also: function calling, OpenAPI, API key, crypto market data for AI agents, Genesis API for AI agents.
Questions and answers
How is MCP different from function calling?
Function calling is a feature of a model's API: the application sends tool descriptions with the request and runs the calls itself. MCP is a protocol between the application and a tool server, so one server works with any MCP-capable client. Inside the application, tools from MCP servers still reach the model through function calling.