Kaynak URI'lerini Açıklama
Kaynakların şema ve yol kullanılarak nasıl adreslendiğini öğrenin.
Kaynak URI'lerini Açıklama, CoddyKit'te ücretsiz bir MCP Academy dersidir. Bu, 4 dersinin 1. 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.
What a Resource Is
An MCP resource is read-only context your server hands the model, like a file, config, or record. The AI reads it, but never changes it.
Why an Address
Each resource needs a stable name so a client can ask for it by reference. That name is its URI, just like a web page has a URL. 🔗
Scheme Then Path
A resource URI is built from a scheme, then a colon and slashes, then a path. The scheme says what kind of thing the URI points to.
file:///notes/today.txt
config://app/settingsPick Your Own Scheme
You are free to invent a scheme that fits your server, such as config or db. The scheme groups related resources under one clear label.
The file Scheme
The file scheme is common for documents on disk. Three slashes mean the path starts at the root, just like file URLs in a browser.
file:///home/data/report.mdCustom Scheme Example
For app data, a tidy custom scheme keeps things readable. The model sees a name that tells it exactly what the resource holds.
users://profile/active
weather://city/londonURIs Must Be Unique
Every resource needs its own distinct URI so requests are never ambiguous. Two resources sharing one URI would collide and confuse clients.
Declare It in FastMCP
In the Python SDK you attach a URI to a function with the resource decorator. That string is the address clients use to read it.
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("Demo")
@mcp.resource("config://app")
def config(): ...Clients List URIs
When a client connects, it asks the server to list every resource it offers. Each entry carries its URI, a name, and a short description.
Read by URI
To fetch content, the client sends a read request naming the exact URI. The server matches that URI to a handler and returns the body.
Keep URIs Stable
Treat a published URI like a promise. Renaming it later breaks any client or saved reference that pointed at the old address.
Quick Check
Spot the part that defines the resource type.
Recap
Resources are read-only context named by a URI: a scheme plus a path. Keep URIs unique and stable so clients can rely on them. ✅
Sıkça Sorulan Sorular
“Kaynak URI'lerini Açıklama” dersi ücretsiz mi?
Evet — “Kaynak URI'lerini Açıklama” 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.
“Kaynak URI'lerini Açıklama” dersinde ne öğreneceğim?
Kaynakların şema ve yol kullanılarak nasıl adreslendiğini öğrenin. 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 1. dersidir.
“Kaynak URI'lerini Açıklama” 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
- Kaynak URI'lerini Açıklama
- Statik Metin Kaynağı Sunma
- Diskten Dosya Okuma
- Doğru MIME Türünü Ayarlama