MCP from Scratch: Connecting Claude to My Own Data in 20 Minutes
| 1 | Materials repository | github.com |
-
1
00:00
The same question, the same Claude: before and after
1 What to do
I ask Claude Code about my orders without a server: there's an answer, but it takes four commands, and the next question starts from scratch.
2 Prompt
EN · PromptHow many orders were canceled?
EN · Prompt from the screenСколько заказов отменено?
-
2
01:10
Why you need MCP at all: where the model ends
1 What to do
The model reasons and writes code, but it doesn't see your files; MCP gives it tools over your data.
-
3
02:10
A ready-made server from the docs: connecting and the first call
1 What to do
I take the demo server from the docs, register it with one command and check it with a call.
$claude mcp add demo -- uv run mcp run server.py
-
4
04:21
Data: a generator and two hundred fictional orders
1 What to do
The generator puts two hundred fictional orders of a coffee shop into a separate directory.
$python gen_orders.py C:\data\tri-zerna
-
5
05:25
Your own server: the task in words, not in syntax
1 What to do
I give Claude Code the task in words, and it finds the fresh SDK on its own and writes a server with three tools.
2 Prompt
EN · Prompt# Task: an MCP server over the orders of "«Три зерна»" The data is fictional, the company "«Три зерна»" does not exist. The coffee shop's orders are in the file `orders.json` at an absolute path outside the server folder (in the video — `C:\data\tri-zerna\orders.json`), as a list of two hundred records. Each order has a number, date, customer (the café's name), city, product, quantity, price per unit, total, status and manager. Write an MCP server in Python that gives the model three tools for working with these orders: 1. **Order list** — with optional filters by status and by city and with a limit on the number of records returned (twenty by default). 2. **Order search** — by a substring that is looked up both in the customer's name and in the product name. 3. **Order card** — all fields of a single order by its number. Requirements: - the server works over stdio and doesn't open a separate network port; - each tool has a short description for the model — one sentence in Russian, without bureaucratic language, to the point about what the tool returns; - the whole server file is no longer than sixty lines; - use the Python SDK for MCP that is current today — find the right server class and the way to register a tool in its fresh documentation yourself, don't rely on what you already know about it. The server doesn't store or accept any secrets: it only reads the orders file.
EN · Prompt from the screen# Задача: сервер MCP над заказами «Три зерна» Данные вымышленные, компания «Три зерна» не существует. Заказы кофейной лавки лежат в файле `orders.json` по абсолютному пути вне папки сервера (в ролике — `C:\data\tri-zerna\orders.json`), в виде списка из двухсот записей. У каждого заказа есть номер, дата, клиент (название кафе), город, товар, количество, цена за единицу, сумма, статус и менеджер. Напиши сервер MCP на Python, который отдаёт модели три инструмента для работы с этими заказами: 1. **Список заказов** — с необязательными фильтрами по статусу и по городу и с ограничением на число возвращаемых записей (по умолчанию двадцать). 2. **Поиск заказов** — по подстроке, которая ищется и в названии клиента, и в названии товара. 3. **Карточка заказа** — все поля одного заказа по его номеру. Требования: - сервер работает через stdio, отдельного сетевого порта не поднимает; - у каждого инструмента есть краткое описание для модели — одно предложение на русском языке, без канцелярита, по существу того, что инструмент возвращает; - весь файл сервера — не длиннее шестидесяти строк; - используй актуальный на сегодня Python SDK для MCP — найди в его свежей документации нужный класс сервера и способ регистрации инструмента сам, не полагайся на то, что ты про него уже знаешь. Сервер не хранит и не принимает никаких секретов: он только читает файл с заказами.
-
6
07:35
Registering in .mcp.json, restart, three levels
1 What to do
I register the server at the project level: the config lives in the repository next to the server.
${ "mcpServers": { "orders": { "type": "stdio", "command": "uv", "args": ["run", "mcp", "run", "server.py"] } } } -
7
08:55
What you see when the model calls a tool
1 What to do
The model reads not the function body but the tool's description line; whether it calls the tool depends on that line.
-
8
09:43
The run: five questions, the fifth one about volume
1 What to do
Five questions from the README with expected answers; on the fifth, the model raises the limit itself and adds up the totals.
2 Prompt
EN · PromptHow many orders were canceled? What's the largest order — its number and total? What did the café „Кофейня Полдень“ order? What's in order ORD-0042? What's the total of all orders for August?
EN · Prompt from the screenСколько заказов отменено? Самый крупный заказ — номер и сумма? Что заказывало кафе „Кофейня Полдень“? Что в заказе ORD-0042? Общая сумма всех заказов за август — какая?
-
9
11:14
Where it breaks: secrets, limits, when a script is simpler
1 What to do
Secrets that never reach the server, the boundary on response size, and the case when a plain script is simpler.
-
10
13:36
Homework
1 What to do
A minimal server with one tool over your own folder and three questions that Claude can't answer without it.
-
11
14:14
What's next