mcp-builder
Skill này làm gì
Skill này hướng dẫn AI của bạn khi xây dựng các kết nối cho phép trợ lý AI dùng công cụ và dữ liệu bên ngoài qua Model Context Protocol. Dành cho lập trình viên tự làm máy chủ hoặc máy khách MCP.
Khi nào nên dùng
- ✓Khi bạn muốn xây dựng một máy chủ MCP cho phép AI truy cập công cụ hoặc dữ liệu của công ty.
- ✓Khi bạn cần kiểm tra máy khách và máy chủ MCP hoạt động cùng nhau đúng cách.
- ✓Khi bạn nâng cấp một triển khai MCP cũ lên đặc tả hiện tại.
Liên kết skill
https://github.com/vudovn/ag-kit/blob/main/.agents/skills/mcp-builder/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Giúp tôi xây dựng một máy chủ MCP cho phép AI của tôi đọc bản ghi từ cơ sở dữ liệu nội bộ.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill giải thích các quy tắc giao thức, ví dụ cách hai bên thống nhất phiên bản và các tính năng tùy chọn. AI làm theo các quy tắc đó khi viết mã.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
MCP Builder
Build interoperable MCP implementations against the stable 2026-07-28 specification. Treat extensions as negotiated, opt-in capabilities rather than core protocol guarantees.
1. Stable baseline and compatibility
- The authoritative stable baseline is MCP 2026-07-28.
- Core requests are stateless and self-contained. Do not infer protocol version, client capabilities, identity, conversation, or task state from a transport connection or process lifetime.
- Put cross-request state behind explicit identifiers supplied on every relevant request.
- Negotiate the protocol version and capabilities; do not assume that a client or server implements every optional feature.
- Preserve compatibility with earlier peers where the specification requires it, including accepting legacy resource-not-found error code
-32002while emitting-32602for invalid parameters in the current protocol.
Core versus extensions
| Layer | Status | Engineering rule |
|---|---|---|
| Base protocol, versioning, message patterns | Stable core | Required for every implementation |
| Resources, prompts, tools, elicitation | Optional core features | Advertise and check capabilities before use |
| Tasks, Skills over MCP, MCP Apps | Extensions | Opt-in; require explicit support from both peers |
| Draft or vendor extensions | Experimental/vendor-specific | Isolate behind adapters and feature flags |
Never label an extension as stable merely because one SDK or host supports it. Check the extension's own official status and version.
2. Architecture
MCP uses JSON-RPC 2.0 between hosts, clients, and servers.
host application
└─ MCP client / runtime adapter
├─ stdio transport
└─ Streamable HTTP transport
└─ MCP server
├─ resources
├─ prompts
└─ tools
Stateless request model
Every request must carry the protocol metadata required by the negotiated version. For 2026-07-28 this includes per-request protocol version and client capability metadata under reserved _meta keys.
Servers must implement server/discover for protocol-version and capability discovery. Clients may call it before normal requests or use it as a backward-compatibility probe for stdio peers.
Do not:
- use a stdio process as a conversation or session boundary;
- depend on request ordering to establish capabilities or identity;
- keep hidden mutable state without an explicit handle;
- use self-reported client/server information for authorization decisions.
Do:
- make task, thread, workspace, or subscription handles explicit;
- validate every request independently;
- tolerate interleaved requests from unrelated tasks;
- document lifecycle, expiry, and cleanup for durable handles.
3. Transports and authentication
| Transport | Typical use | Security baseline |
|---|---|---|
stdio |
Local process integration | Read credentials from the environment; constrain process and filesystem access |
| Streamable HTTP | Remote or shared service | Use the MCP HTTP authorization framework, validate origins where applicable, and enforce network boundaries |
WebSocket is not a standard MCP transport unless defined by a separately negotiated extension or vendor adapter.
Transport concerns must not leak into protocol semantics. Reconnection or process replacement must not destroy logical state that is represented by an explicit durable handle.
4. Schema design and validation
MCP defaults to JSON Schema 2020-12 when $schema is absent. Implementations must support that dialect and should document any additional dialects.
Tool input schemas
- Use an object root for tool arguments.
- Give every property a clear, action-oriented description.
- Declare required fields explicitly.
- Prefer narrow enums, bounds, formats, and
additionalProperties: falsewhere forward compatibility does not require open objects. - Validate both the schema and each invocation payload.
Tool output schemas
Use structured content and outputSchema when consumers need typed, predictable results. Keep human-readable text concise and ensure structured output remains the source of truth for automation.
$ref and validator safety
- Never dereference network
$refvalues automatically. - If remote dereferencing is explicitly enabled, use a host allowlist; reject loopback, link-local, and private addresses; apply timeouts and response
Câu hỏi thường gặp
Nó nhắm đến phiên bản giao thức nào?
Nó nhắm đến đặc tả MCP ổn định 2026-07-28 và có ghi chú về khả năng tương thích với các bên cũ hơn.
Có cần các phần mở rộng không?
Không. Phần mở rộng là tùy chọn và cần cả hai bên đồng ý trước khi dùng.
Nó có bao gồm bảo mật không?
Có. Skill có hướng dẫn về bảo mật cho các triển khai MCP.
Chi tiết
Mô tả gốc của tác giả
MCP (Model Context Protocol) server and client engineering. Protocol design, schemas, transports, extensions, security, and migration.
repo: vudovn/ag-kit
Độ phổ biến
- Sao GitHub
- 8.2k
- Vị trí xếp hạng
- #12535
- Giấy phép
- MIT
- Cập nhật
- 18/10/2026
Bình luận
- …
Thêm skill từ kho mã này
batch-operations
8.2kGiúp agent của bạn thực hiện cùng một thay đổi trên nhiều file cùng lúc, như đổi tên một hàm hoặc thay một import cũ ở khắp nơi.
brainstorming
8.2kDạy agent của bạn đặt câu hỏi làm rõ trước khi xây dựng bất cứ thứ gì mới hoặc phức tạp, để agent hiểu mục tiêu của bạn trước.
code-review-checklist
8.2kCung cấp cho agent của bạn một danh sách kiểm tra để rà soát mã về tính đúng đắn, bảo mật, hiệu năng, kiểm thử và tài liệu, kể cả rủi ro riêng của AI.
code-review-graph
8.2kGiúp agent của bạn rà soát mã trong dự án lớn bằng một bản đồ cấu trúc, để nó chỉ đọc các file bị ảnh hưởng bởi một thay đổi.
Skill tương tự
mcporter
394kGiúp agent của bạn liệt kê, gọi và kiểm tra các máy chủ MCP cùng công cụ của chúng qua HTTP hoặc stdio, và quản lý cài đặt đăng nhập.
fastmcp
260kGiúp bạn xây dựng, kiểm thử và triển khai một máy chủ MCP bằng Python, cấp cho trợ lý AI quyền truy cập API, cơ sở dữ liệu hoặc file của bạn dưới dạng công cụ.
mcp-oauth-remote-gateway
260kHướng dẫn bạn đăng nhập OAuth cho máy chủ MCP từ xa khi Hermes chạy trên máy chủ, nơi đăng nhập bằng trình duyệt thông thường không thể truy cập được.