Bir JSON-RPC Çağrısının Anatomisi
Gerçek bir MCP mesajında id, method ve params.
Bir JSON-RPC Çağrısının Anatomisi, CoddyKit'te ücretsiz bir MCP Academy dersidir. Bu, 4 dersinin 2. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, MCP Academy öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. MCP Academy kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
Open the Envelope
Let us dissect one real MCP message field by field. A JSON-RPC call is a small JSON object, and four keys carry all of its meaning.
The jsonrpc Version Tag
Every message starts with jsonrpc set to the string 2.0. It marks the dialect so both sides parse the rest the same way.
{"jsonrpc": "2.0"}The id Ties Things Together
The id is a number or string that labels a request. The matching response repeats it, so replies never get confused across many calls.
{"jsonrpc": "2.0", "id": 42}method Names the Action
The method string says what you want, like tools/call or resources/read. MCP groups methods with a slash, namespace before the verb.
{"method": "tools/call"}params Carries the Inputs
The params object holds the arguments for that method. For a tool call it names the tool and the values it should receive.
{"params": {"name": "add", "arguments": {"a": 2, "b": 3}}}A Full Request
Put the four keys together and you have a complete request. This one asks the server to run the add tool with two numbers.
{"jsonrpc": "2.0", "id": 42, "method": "tools/call",
"params": {"name": "add", "arguments": {"a": 2, "b": 3}}}params Is Optional
Some methods need no input at all. When that happens you simply omit params, as tools/list does when it just wants the full catalog.
{"jsonrpc": "2.0", "id": 5, "method": "tools/list"}Named, Not Positional
MCP always passes params as a JSON object with named keys, not a bare list. Names make the arguments self-documenting and order-independent.
The Response Mirror
The reply mirrors the request: same jsonrpc, same id, but method and params are gone. In their place sits a single result field.
{"jsonrpc": "2.0", "id": 42, "result": {"content": []}}Keys You Will See Most
Across MCP traffic you mostly meet tools/list, tools/call, resources/read, and prompts/get. Spot these methods and the intent jumps right out.
Read It at a Glance
Now any MCP line is readable: jsonrpc is the version, id pairs the reply, method is the verb, and params are the inputs. Four keys, full clarity.
Quick Check
In a JSON-RPC request, which field holds the arguments for the method?
Recap: Four Keys
You can now read any call: jsonrpc sets the version, id pairs the reply, method names the action, and params supplies its inputs. That is the whole anatomy.
Sıkça Sorulan Sorular
“Bir JSON-RPC Çağrısının Anatomisi” dersi ücretsiz mi?
Evet — “Bir JSON-RPC Çağrısının Anatomisi” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve MCP Academy kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. MCP Academy kursu toplamda 4 dersten oluşur.
“Bir JSON-RPC Çağrısının Anatomisi” dersinde ne öğreneceğim?
Gerçek bir MCP mesajında id, method ve params. MCP Academy ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
MCP Academy öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te MCP Academy, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 2. dersidir.
“Bir JSON-RPC Çağrısının Anatomisi” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu MCP Academy dersinde kod yazıp çalıştırabilir miyim?
Evet. Her MCP Academy dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- İstekler, Yanıtlar ve Bildirimler
- Bir JSON-RPC Çağrısının Anatomisi
- Başlatma El Sıkışması
- Hataları İletim Sırasında Okuma