Airsc miễn phí cho tất cả. Nếu nó giúp bạn, hãy ủng hộ $2–$20.

Ủng hộ
AgentCẩn thậnQuy trình & bộ nhớ agentNâng cao

MCP-Developer-SubAgent

gensecaihq · gensecaihq/MCP-Developer-SubAgent

Một framework chuyên biệt cho phát triển Model Context Protocol (MCP), cung cấp 8 sub-agent Claude Code, các security hook và template server FastMCP sẵn sàng cho sản xuất.

Khung Claude Code sẵn sàng sản xuất để phát triển Model Context Protocol (MCP) với 8 tác nhân con AI chuyên biệt, tích hợp FastMCP và các hook bảo mật cấp doanh nghiệp đã được tăng cường. Điểm kiểm toán: 10/10 - Đã được kiểm toán bảo mật, hoạt động đầy đủ trên Windows, macOS và Linux với khả năng sử dụng ngay lập tức (không yêu cầu cài đặt cho các tính năng cốt lõi).

28 sao8Giấy phép: MITCập nhật năm ngoái0 lượt mở

Xem trước

▍

Bạn có thể làm gì với nó

  • Phát triển các MCP server tùy chỉnh bằng cách sử dụng các template FastMCP được cung cấp.
  • Tận dụng các sub-agent chuyên biệt để hỗ trợ thiết kế và triển khai giao thức MCP.
  • Triển khai các tính năng bảo mật cấp doanh nghiệp cho tương tác agent bằng cách sử dụng các security hook được tăng cường.

Kiểm tra an toàn

Cẩn thận

Dùng được, nhưng nên đọc ghi chú trước.

  • ●Hơn một năm không cập nhật.

Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.

Trích từ README

Claude Code MCP Developer SDK

Production-ready Claude Code framework for Model Context Protocol (MCP) development with 8 specialized AI sub-agents, FastMCP integration, and hardened enterprise-grade security hooks. Audit Score: 10/10 - Security-audited, fully functional across Windows, macOS, and Linux with immediate usability (no installation required for core features).

🚀 Features

Dual-Mode Architecture

  • 📝 Markdown-Driven Sub-Agents: 8 specialized agents in .claude/agents/ for Claude Code integration
  • 🔧 Programmatic SDK: Full Python SDK with async support and official Anthropic API integration
  • 🎯 Hybrid Operation: Both systems work seamlessly together with automatic fallback

Core Components

  • ✅ Claude Code Sub-Agents: 8 specialized agents (1,419 lines) for MCP development assistance
  • 🔒 Hardened Security Hooks: Enterprise-grade input validation with code injection blocking and empty command prevention
  • 📝 MCP Templates: 2 working FastMCP server examples with validated syntax
  • 🔄 CI/CD Ready: GitHub Actions workflow with 7 automated jobs and security scanning
  • 🛠️ Development Tools: Cross-platform validation utilities (works without installation)
  • 🚀 SDK Components: Full Python API with graceful degradation (6,016 lines of code)

📋 Requirements

  • Python 3.8+ (tested and verified on macOS, Windows, Linux)
  • Claude Code (for sub-agent functionality) - Optional for CLI tools
  • Anthropic API key (for programmatic SDK features) - Optional for validation tools
  • Production-ready: All 12 dependencies available on PyPI, works immediately without installation

🛠️ Installation

Quick Start (Cross-Platform)

# Clone the repository
git clone https://github.com/gensecaihq/MCP-Developer-SubAgent.git
cd MCP-Developer-SubAgent

# ✅ VERIFIED: Check platform compatibility (works without installation)
python3 claude_code_sdk/cli_simple.py validate-setup

# ✅ TESTED: Basic installation (all dependencies available on PyPI)
pip install -e .        # macOS/Linux
python3 -m pip install -e .   # Windows (if python3 available)
python -m pip install -e .    # Windows (alternative)

# ✅ VERIFIED: Optional authentication support
pip install -e .[auth]  # JWT/crypto features (tested on all platforms)

📖 For detailed platform-specific instructions, see INSTALL.md

Environment Setup

Windows (Command Prompt):

set ANTHROPIC_API_KEY=sk-ant-your-key-here

Windows (PowerShell):

$env:ANTHROPIC_API_KEY="sk-ant-your-key-here"

macOS/Linux:

export ANTHROPIC_API_KEY=sk-ant-your-key-here

🎯 Usage

1. Markdown-Driven Sub-Agents (Claude Code)

The .claude/agents/ directory contains 8 specialized sub-agents that work directly with Claude Code:

.claude/agents/
├── mcp-orchestrator.md       # Central workflow coordinator (Opus)
├── fastmcp-specialist.md     # FastMCP implementation expert (Sonnet)
├── mcp-protocol-expert.md    # Protocol specification specialist (Sonnet)
├── mcp-security-auditor.md   # Security and authentication expert (Opus)
├── mcp-performance-optimizer.md # Performance optimization specialist (Sonnet)
├── mcp-deployment-specialist.md # Deployment and infrastructure expert (Sonnet)
├── mcp-debugger.md           # Troubleshooting specialist (Sonnet)
└── context-manager.md        # Context and state management (Sonnet)

Using with Claude Code:

# Agents auto-activate based on file patterns
cd your-mcp-project
claude-code

# Request specific agents
> Use the fastmcp-specialist to implement a new tool
> Use the mcp-security-auditor to review authentication

2. Programmatic SDK (Requires Installation)

Note: Requires pip install -e . and proper dependencies

from claude_code_sdk import MCPOrchestrator, FastMCPSpecialist

# Initialize orchestrator (requires ANTHROPIC_API_KEY)
orchestrator = MCPOrchestrator()
session_id = await orchestrator.create_conversation()

# Send orchestration request
message = """
Create a new MCP server with the following requirements:
- Name: my-api-server
- Tools: search, analyze, report  
- Authentication: OAuth 2.1
"""

result = await orchestrator.send_message(message, output_format="json")
print(result["content"])

3. Validation Tools

# ✅ PRODUCTION-TESTED: Basic validation (works without dependencies)
python3 claude_code_sdk/cli_simple.py validate-setup
python3 claude_code_sdk/cli_simple.py status

# ✅ ENTERPRISE-READY: Advanced CLI (requires pip install -e .)
claude-mcp validate-setup
claude-mcp orchestrate --workflow new_server

Security-Hardened Metrics: 8 sub-agents, 2 validated examples, enhanced security hooks (blocks code injection), 7-job CI/CD pipeline with security scanning

🏗️ Architecture

Directory Structure

MCP-Developer-SubAgent/
├── .claude/
│   ├── agents/              # Markdown sub-agents for Claude Code
│   ├── config.json          # Agent configuration
│   ├── hooks.json          # Hooks configuration
│   └── hooks/              # Hook handlers
├── .github/
│   └── workflows/          # GitHub Actions CI/CD
├── claude_code_sdk/        # Programmatic SDK
│   ├── claude_integration.py
│   └── cli.py
├── examples/               # Working MCP examples
│   ├── minimal-mcp-server/
│   ├── enterprise-auth-server/
│   └── testing-framework/
├── docs/                   # Documentation
├── pyproject.toml         # Modern Python packaging
├── setup.py               # Legacy packaging support
└── requirements.txt       # Dependencies

Quality Gates Pipeline

  1. Planning Gate: Requirements, architecture, transport selection
  2. Protocol Gate: MCP compliance, JSON-RPC validation
  3. Security Gate: Authentication, input validation, boundaries
  4. Implementation Gate: Code quality, type safety, patterns
  5. Testing Gate: Coverage, compliance, integration
  6. **Performance G
Xem mã nguồn trên GitHub