Skillpedia
الموصّلات (MCP)29k · #9591

mcp-server-builder

ما الذي تفعله

تساعد هذه المهارة في بناء خادم MCP، وهو ما يتيح لمساعد الذكاء الاصطناعي استخدام واجهة برمجة تطبيقات عبر أدوات واضحة. وهي لمطورين يريدون ربط واجهة داخلية أو خارجية بمساعدهم الذكي.

متى تستخدمها

  • ✓عندما تريد أن يستخدم مساعد الذكاء الاصطناعي واجهة REST قائمة عبر أدوات محددة النوع.
  • ✓عندما تريد استبدال أتمتة المتصفح الهشة باتصال سليم بالخدمة.
  • ✓عندما تريد مشاركة خادم MCP واحد بين عدة فرق أو مساعدين.

رابط المهارة

https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/mcp-server-builder/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/mcp-server-builder/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“حوّل مواصفة OpenAPI الخاصة بشركتنا إلى خادم MCP يستطيع مساعدي استخدامه.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تقرأ المهارة وصف واجهة البرمجة، وتنشئ تعريفات أدوات لكل عملية، وتنتج خادمًا أوليًا بلغة Python أو TypeScript، ثم تفحص النتيجة بحثًا عن المشكلات الشائعة.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

MCP Server Builder

Tier: POWERFUL · Category: Engineering · Domain: AI / API Integration

Overview

Use this skill to design and ship production-ready MCP servers from API contracts instead of hand-written one-off tool wrappers. It focuses on fast scaffolding, schema quality, validation, and safe evolution.

The workflow supports both Python and TypeScript MCP implementations and treats OpenAPI as the source of truth.

Core Capabilities

  • Convert OpenAPI paths/operations into MCP tool definitions
  • Generate starter server scaffolds (Python or TypeScript)
  • Enforce naming, descriptions, and schema consistency
  • Validate MCP tool manifests for common production failures
  • Apply versioning and backward-compatibility checks
  • Separate transport/runtime decisions from tool contract design

When to Use

  • You need to expose an internal/external REST API to an LLM agent
  • You are replacing brittle browser automation with typed tools
  • You want one MCP server shared across teams and assistants
  • You need repeatable quality checks before publishing MCP tools
  • You want to bootstrap an MCP server from existing OpenAPI specs

Key Workflows

1. OpenAPI to MCP Scaffold

  1. Start from a valid OpenAPI spec.
  2. Generate tool manifest + starter server code.
  3. Review naming and auth strategy.
  4. Add endpoint-specific runtime logic.
python3 scripts/openapi_to_mcp.py \
  --input openapi.json \
  --server-name billing-mcp \
  --language python \
  --output-dir ./out \
  --format text

Supports stdin as well:

cat openapi.json | python3 scripts/openapi_to_mcp.py --server-name billing-mcp --language typescript

2. Validate MCP Tool Definitions

Run validator before integration tests:

python3 scripts/mcp_validator.py --input out/tool_manifest.json --strict --format text

Checks include duplicate names, invalid schema shape, missing descriptions, empty required fields, and naming hygiene.

3. Runtime Selection

  • Choose Python for fast iteration and data-heavy backends.
  • Choose TypeScript for unified JS stacks and tighter frontend/backend contract reuse.
  • Keep tool contracts stable even if transport/runtime changes.

4. Harden for Production

Key items before publishing:

  • Keep secrets in env vars, not tool schemas
  • Prefer outbound host allowlists over open proxies
  • Use additive-only changes; never rename tool names in-place

Full hardening guidance: references/production-hardening-guide.md.

Script Interfaces

  • python3 scripts/openapi_to_mcp.py --help
    • Reads OpenAPI from stdin or --input
    • Produces manifest + server scaffold
    • Emits JSON summary or text report
  • python3 scripts/mcp_validator.py --help
    • Validates manifests and optional runtime config
    • Returns non-zero exit in strict mode when errors exist

Reference Material

الأسئلة الشائعة

ما الذي يجب أن تملكه الواجهة؟

تحتاج إلى مواصفة OpenAPI صالحة تصف نقاط النهاية الخاصة بها.

هل تكتب خوادم بلغتي Python وTypeScript؟

نعم، تدعم المهارة اللغتين وتنتج هيكلًا أوليًا لأي منهما.

هل تكتب منطق العمل كاملًا؟

لا، ما زلت تضيف المنطق الذي تحتاجه كل نقطة نهاية بعد توليد الشيفرة الأولية.

التفاصيل

الوصف الأصلي من المؤلف

Use when exposing an API as an MCP server or scaffolding a new MCP server in Python or TypeScript, before hand-writing tool wrappers. Generates tools from OpenAPI with openapi_to_mcp.py and validates them with mcp_validator.py.

repo: alirezarezvani/claude-skills

الشعبية

نجوم GitHub
29k
الترتيب
#9591
الترخيص
MIT
آخر تحديث
2‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة