Bỏ qua, đến nội dung

@digiforce-nc/plugin-mcp-server ​

Plugin MCP Server — triển khai Model Context Protocol, biến Digiforce thành tool server cho AI assistants (Claude, GPT, Copilot) truy cập dữ liệu và thực thi thao tác.

Plugin này làm gì? ​

Model Context Protocol (MCP) là giao thức chuẩn cho phép AI assistants truy cập dữ liệu và công cụ bên ngoài. Plugin biến Digiforce thành MCP server — AI assistant có thể query collection, tạo record, chạy action, và duyệt schema Digiforce qua giao thức MCP chuẩn.

Ba nhiệm vụ chính ​

#Nhiệm vụChi tiết
1Tool registryExpose collection CRUD + custom actions thành MCP tools
2Schema introspectionCho AI xem cấu trúc collections, fields, relations
3Action executionThực thi thao tác trên Digiforce theo yêu cầu AI

Kiến trúc ​

Luồng xử lý MCP request ​

API endpoints ​

EndpointMô tả
mcp:listToolsDanh sách MCP tools có sẵn (tên, mô tả, input schema)
mcp:callToolThực thi MCP tool (tên tool + arguments)
mcp:listResourcesDanh sách MCP resources
mcp:readResourceĐọc resource data (schema hoặc records)
mcp:configCấu hình MCP server (admin only)
mcp:auditLogXem audit log thao tác AI (admin only)

Cấu hình ​

Tham sốMô tả
apiKeyAPI key để AI assistant xác thực
enabledCollectionsDanh sách collections expose cho AI (mặc định: tất cả)
readOnlyChế độ chỉ đọc — AI chỉ query, không tạo/sửa/xóa
rateLimitGiới hạn request/phút từ AI
auditEnabledBật/tắt ghi audit log

Thành phần client ​

Thành phầnMô tả
MCPConfigFormForm cấu hình MCP server (Settings → MCP Server)
MCPToolListDanh sách tools đã expose — bật/tắt từng tool
MCPAuditLogBảng audit log — xem thao tác AI đã thực hiện

Dependencies ​

PackageVai trò
@digiforce-nc/serverServer framework (peer)
@digiforce-nc/databaseDatabase ORM (peer)
@digiforce-nc/clientClient UI framework (peer)
@digiforce-nc/aclKiểm tra quyền trước khi thực thi tool

Mục lục chi tiết ​