التعرّف على mcp CLI
شغّلوا الخوادم وطوّروها وافحصوها من سطر الأوامر.
التعرّف على mcp CLI درس مجاني في MCP Academy على CoddyKit. هذا هو الدرس 3 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في MCP Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة MCP Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
Your Command-Line Companion
The mcp command-line tool came with the [cli] extra. It's how you run, test, and ship servers without writing extra glue code. 🛠️
Three Commands to Know
The CLI centers on three verbs: dev, install, and run. Each handles a different stage of working with your server, from testing to shipping.
Run It Through uv
Because the tool lives in your project's environment, you call it with uv run. That guarantees the right Python and packages are used every time.
uv run mcpmcp dev for Testing
The fastest way to try a server is mcp dev. It launches your server and opens the MCP Inspector so you can poke at it interactively.
uv run mcp dev server.pyWhy dev Is So Handy
With mcp dev you see your tools and resources live, call them by hand, and watch responses. It's the tightest possible feedback loop. 🔍
mcp install for Claude
When a server is ready for daily use, mcp install wires it straight into Claude Desktop's config so the app loads it on startup.
uv run mcp install server.pyName Your Server
Pass a friendly label with the --name flag so it's easy to spot inside Claude. A clear name beats a raw file path every time.
uv run mcp install server.py --name "My Server"mcp run to Execute
The plain mcp run command executes a server directly, no Inspector attached. It's the simple way to launch a FastMCP server for a client.
uv run mcp run server.pydev vs run
Reach for mcp dev while building and debugging, and switch to mcp run once you just need the server up. Same server, different intent.
Discover Flags with Help
Forgot an option? Every command supports --help, which prints its arguments and usage. It's the quickest reference you'll always have on hand.
uv run mcp dev --helpOne CLI, Whole Lifecycle
Together these commands cover the lifecycle: test with dev, ship with install, launch with run. You rarely need anything else to operate a server. 🔄
Quick Check
You want to test a new server and click through its tools interactively.
You Know the CLI
You can now dev to test, install to add a server to Claude, and run to launch it. Three commands give you full control of your server. 🎉
الأسئلة الشائعة
هل درس «التعرّف على mcp CLI» مجاني؟
نعم — نص درس «التعرّف على mcp CLI» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة MCP Academy، انتقل إلى CoddyKit PRO. تتضمن دورة MCP Academy 4 دروس في المجموع.
ماذا ستتعلم في «التعرّف على mcp CLI»؟
شغّلوا الخوادم وطوّروها وافحصوها من سطر الأوامر. تتمرن على MCP Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ MCP Academy؟
لا تُشترط خبرة سابقة. MCP Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 3 من أصل 4.
كم من الوقت يستغرق درس «التعرّف على mcp CLI»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس MCP Academy هذا؟
نعم. كل درس في MCP Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- تثبيت Python وuv
- إضافة Python SDK الخاص بـMCP
- التعرّف على mcp CLI
- تخطيط مشروع الخادم