الخادم: حيث توجد الأدوات
العملية التي تعلن عن قدراتكم وتشغّلها.
الخادم: حيث توجد الأدوات درس مجاني في MCP Academy على CoddyKit. هذا هو الدرس 3 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في MCP Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة MCP Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
What Is a Server?
An MCP server is a standalone program that offers capabilities to AI. It is where your tools, data, and prompts actually live and run.
The Server Has No Model
A server never contains a language model. It just advertises what it can do and waits for a client to ask it to act.
Tools Live Here
The headline capability is tools: functions the model can invoke, like searching a database or sending an email. The server defines and executes them.
Resources Live Here Too
Beyond tools, a server can expose resources: read-only data such as files or records the model can pull in as context.
And Prompts
A server may also publish prompts: reusable, templated instructions a user can trigger. Tools, resources, and prompts are its three offerings.
A Tiny Server in Python
With the Python SDK you create a named server in one line. This FastMCP object will hold every tool you add.
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("weather")Adding a Tool
You turn a plain function into a tool with a decorator. The tool decorator tells MCP this function is callable by the model.
@mcp.tool()
def get_temp(city: str) -> str:
return "21C"Servers Advertise, Then Wait
A running server lists its capabilities on request, then sits idle. It only does work when a client sends it a call.
Servers Can Run Anywhere
A server might run as a local process on your machine or live remotely on the web. Either way, the protocol it speaks stays the same.
One Server, One Focus
Good servers stay focused. A weather server handles weather; a file server handles files. Small, clear servers are easy to trust and combine.
The Server Completes the Trio
Host, client, and server are the three MCP roles. The server is the worker that holds the real capabilities behind the scenes.
Quick Check
Pick what an MCP server is responsible for.
Recap
You learned the server: a focused, model-free program that advertises and runs tools, resources, and prompts for clients to use. Well done!
الأسئلة الشائعة
هل درس «الخادم: حيث توجد الأدوات» مجاني؟
نعم — نص درس «الخادم: حيث توجد الأدوات» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة MCP Academy، انتقل إلى CoddyKit PRO. تتضمن دورة MCP Academy 4 دروس في المجموع.
ماذا ستتعلم في «الخادم: حيث توجد الأدوات»؟
العملية التي تعلن عن قدراتكم وتشغّلها. تتمرن على MCP Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ MCP Academy؟
لا تُشترط خبرة سابقة. MCP Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 3 من أصل 4.
كم من الوقت يستغرق درس «الخادم: حيث توجد الأدوات»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس MCP Academy هذا؟
نعم. كل درس في MCP Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- المضيف: Claude Desktop وبيئات IDE
- العميل: رابط واحد لكل خادم
- الخادم: حيث توجد الأدوات
- تتبّع الطلب من البداية إلى النهاية