في هذه الصفحة
الدّرس 4 من 6
المهارات وبروتوكولات MCP
ما ستتعلّمه
- فهم ما هي المهارات وكيف يطبّقها Claude تلقائيًّا
- إعداد خوادم MCP لمنح Claude وصولاً إلى الأنظمة الخارجيّة
- معرفة متى تبني مهارة ومتى تضيف MCP
Out of the box, Claude Code can read files, edit code, and run shell commands. But the real power comes when you extend it — with Skills that teach it your team's patterns, and MCP servers that connect it to external systems.
Skills: teaching Claude your patterns
A Skill is a markdown file that Claude applies automatically when it detects a matching task. You don't call a skill explicitly — Claude reads the skill's description and decides when to use it.
Skills live in three places:
- Project skills:
.claude/skills/in your repo — shared with the team via git - User skills:
~/.claude/skills/— personal, across all projects - Anthropic skills: built into Claude Code (like
/commit,/review-pr)
Here's what a skill file looks like:
---
description: "Enforce our commit message format: type(scope): description"
---
When creating a commit message, follow this format exactly:
- Type: feat, fix, refactor, docs, test, chore
- Scope: the component or area (e.g., auth, api, ui)
- Description: imperative, lowercase, no period
- Body: explain WHY, not what
Example: feat(auth): add magic link login flow
When you run /commit, Claude reads all available skills. If your commit-format skill matches, Claude follows its instructions without you asking.
When to create a skill:
- You find yourself giving Claude the same instruction repeatedly
- Your team has a convention Claude doesn't follow by default
- You want a repeatable workflow (deploy checklist, PR review criteria)
MCP servers: connecting to external systems
The Model Context Protocol is an open standard that lets AI models talk to external tools and data sources. An MCP server is a program that exposes tools (actions), resources (data), and prompts (templates) to Claude.
Claude Code ships with MCP support built in. To add a server, edit .claude/settings.json:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@anthropic-ai/mcp-playwright"]
}
}
}
Once configured, Claude Code discovers the server's capabilities automatically. You'll see new tools available — like browser_navigate, browser_screenshot, browser_click — and Claude will use them when the task calls for it.
Popular MCP servers you should know about:
| Server | What it does |
|---|---|
| Playwright | Browser automation — navigate, click, screenshot, test |
| Postgres | Query your database directly from Claude |
| GitHub | Access repos, issues, PRs without gh CLI |
| Context7 | Fetch live documentation for any library |
| Filesystem | Read/write files outside the project directory |
The MCP ecosystem has over 34,000 npm-dependent projects as of April 2026 and is growing fast. The 2026 roadmap focuses on transport scalability, enterprise auth, and agent-to-agent communication.
Skills vs MCPs: when to use which
| Use a Skill when... | Use an MCP when... |
|---|---|
| You want to teach Claude a pattern | You want to connect Claude to an external system |
| The instruction is about how to do something | The capability is about what Claude can access |
| It's project- or team-specific knowledge | It's a general-purpose tool any project could use |
| Example: commit format, code review checklist | Example: database access, browser control, API calls |
They compose well together. A skill might say "when deploying, run the Playwright test suite first" — and an MCP server provides the Playwright tools that make that possible.
What's next
In the next lesson, you'll learn about subagents — spawning parallel Claude instances that work on different parts of a task without polluting each other's context. It's the feature that makes Claude Code scale from simple tasks to complex, multi-file projects.
جرّب بنفسك
نصّب خادم Playwright MCP واطلب من Claude Code فتح موقع وأخذ لقطة شاشة. ثمّ أنشئ مهارة بسيطة تفرض تنسيق رسائل الإيداع في فريقك.
تأمّل
فكّر في سير عملك الحالي في التطوير. ما الأنظمة الخارجيّة التي تتعامل معها يوميًّا؟ أيّها يمكن لـ Claude Code الوصول إليها عبر خادم MCP؟