Connect Claude Code to GitHub, Slack, and Databases with MCP
يتيح MCP لـ Claude Code التحدث إلى الخدمات الخارجية. قم بتوصيله بـ GitHub وSlack وقواعد البيانات وأدوات إدارة المشاريع لأتمتة سير عمل التطوير بالكامل.
MCP (بروتوكول السياق النموذجي) هو كيفية اتصال Claude Code بالخدمات الخارجية. بدلاً من أن يقتصر الأمر على نظام الملفات والمحطة الطرفية لديك، يتيح MCP لـ Claude Code قراءة مشكلات GitHub، والنشر على Slack، والاستعلام عن قواعد البيانات، والتفاعل مع أدوات إدارة المشروع. إنه يحول Claude Code من وكيل ترميز إلى وكيل سير عمل تطوير كامل.
ما هو MCP وكيف يعمل؟
MCP is an open protocol that lets AI tools communicate with external services through standardized "servers." Each MCP server exposes tools (actions the AI can take) and resources (data the AI can read). Claude Code discovers these tools automatically and uses them when they're relevant to your request.
فكر في خوادم MCP كمكونات إضافية: تقوم بتثبيتها مرة واحدة، ويكتسب Claude Code إمكانات جديدة.
ما هي خوادم MCP الأكثر فائدة للمطورين؟
| خادم MCP | ماذا يفعل | Example use case |
|---|---|---|
| جيثب | Read/create issues, PRs, reviews | "التحقق من المسائل المخصصة لي" |
| سلاك | Read/send messages, search channels | "نشر إشعار نشر إلى #releases" |
| PostgreSQL | الاستعلام وتعديل قاعدة البيانات | "إظهار مخطط جدول المستخدمين" |
| جيرا | Read/update tickets, create stories | "نقل PROJ-123 إلى قيد التقدم" |
| خطي | إدارة القضايا والمشاريع | "Create a bug report for the login issue" |
| فكرة | Read/write pages and databases | "تحديث وثيقة Sprint Retro" |
| فيجما | قراءة ملفات التصميم ومكوناته | "What colors does the button component use?" |
كيف تقوم بتثبيت خادم MCP؟
يوفر Claude Code أمرًا مضمنًا لإدارة خوادم MCP:
# Add an MCP server (HTTP transport — recommended)
claude mcp add github-server https://api.github.com/mcp
# Add a local MCP server (stdio transport)
claude mcp add postgres-server -- npx @modelcontextprotocol/server-postgres postgresql://localhost/mydb
# List installed servers
claude mcp list
# Remove a server
claude mcp remove github-serverكيف تستخدم أدوات MCP عمليًا؟
بمجرد تثبيت خادم MCP، يستخدم Claude Code أدواته تلقائيًا عندما يكون ذلك مناسبًا. لا تحتاج إلى تحديد خادم MCP الذي تريد استخدامه؛ فقط قم بوصف ما تريد:
# Claude Code uses the GitHub MCP server automatically
> "What open issues are assigned to me?"
> "Create a PR for my current branch"
# Claude Code uses the Slack MCP server
> "Post to #engineering: Deploy v2.3 is live"
# Claude Code uses the PostgreSQL MCP server
> "Show me the last 10 users who signed up"
> "Add an index on the email column in the users table"كيف يمكنك تكوين خوادم MCP لكل مشروع؟
MCP servers can be configured at the project level (in .claude/settings.json) or globally (in ~/.claude/settings.json). Project-level configuration means the team shares the same integrations.
// .claude/settings.json (project level)
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["@modelcontextprotocol/server-postgres", "postgresql://localhost/myapp"]
},
"github": {
"type": "http",
"url": "https://api.github.com/mcp"
}
}
}