API & MCP của Kho Repo
Kho hiện có 1.018 repo trong 34 chủ đề. Mọi endpoint đọc đều mở CORS, không cần khoá, và trả về mô tả tiếng Việt kèm mô tả gốc từ GitHub.
Bắt đầu nhanh
Bắt đầu bằng việc mô tả nhu cầu của bạn. Agent gọi một endpoint, nhận về danh sách repo kèm lý do khớp:
# Tìm repo theo nhu cầu (tiếng Việt hoặc tiếng Anh)
curl "https://repo.shopkitai.com/api/v1/search?q=cao+dữ+liệu+web+cho+RAG&limit=5"
# Lấy chi tiết một repo
curl "https://repo.shopkitai.com/api/v1/repos/firecrawl/firecrawl"
# Lọc theo chủ đề + ngôn ngữ
curl "https://repo.shopkitai.com/api/v1/repos?topic=scrape&language=Python&sort=stars&per_page=10"Tìm theo tình huống dự án
Khi bạn không biết cần tìm gì, dùng tham số use_case — kho sẽ tự chọn các chủ đề liên quan:
build-webBuild web appFrontend, backend, UI, biểu đồ, API, cào dữ liệu, triển khai.
curl "https://repo.shopkitai.com/api/v1/search?use_case=build-web&limit=8"build-ai-agentBuild AI agentFramework agent, MCP, skill/prompt, bộ nhớ, nền tảng LLM.
curl "https://repo.shopkitai.com/api/v1/search?use_case=build-ai-agent&limit=8"build-storeBuild store dropshipStorefront headless, mẫu Shopify/Stripe, giỏ hàng, hiệu ứng, triển khai.
curl "https://repo.shopkitai.com/api/v1/search?use_case=build-store&limit=8"scrape-webCào dữ liệu webThư viện cào web, trình duyệt tự động, nguồn API công khai.
curl "https://repo.shopkitai.com/api/v1/search?use_case=scrape-web&limit=8"rag-llmRAG / ứng dụng LLMNền tảng RAG, vector store, mô hình ngôn ngữ, xử lý tài liệu.
curl "https://repo.shopkitai.com/api/v1/search?use_case=rag-llm&limit=8"self-hostTự host & triển khaiGiải pháp self-hosted, container, giám sát hệ thống.
curl "https://repo.shopkitai.com/api/v1/search?use_case=self-host&limit=8"learnHọc & lộ trìnhSách, lộ trình, phỏng vấn, danh sách awesome.
curl "https://repo.shopkitai.com/api/v1/search?use_case=learn&limit=8"mediaẢnh / video / âm thanhSinh ảnh, giọng nói, dựng video, OCR, thị giác máy tính.
curl "https://repo.shopkitai.com/api/v1/search?use_case=media&limit=8"Endpoint đọc
| Method | Path | Mô tả |
|---|---|---|
| GET | /api/v1/search | Tìm theo mô tả tự nhiên, có lý do khớp và gợi ý chủ đề. |
| GET | /api/v1/repos | Duyệt / lọc / phân trang danh sách repo. |
| GET | /api/v1/repos/{owner}/{name} | Chi tiết một repo kèm repo liên quan. |
| GET | /api/v1/topics | Toàn bộ chủ đề, nhóm chủ đề và ngôn ngữ. |
| GET | /api/v1/languages | Danh sách ngôn ngữ lập trình trong kho. |
| GET | /api/v1/stats | Tổng quan kho: số repo, chủ đề, sao. |
| GET | /api/v1/store/plan | Kế hoạch dựng store bán hàng dropship theo vai trò. |
| GET | /openapi.json | OpenAPI 3.1 document đầy đủ. |
| GET | /llms.txt | Manifest dạng văn bản cho agent. |
Tham số /api/v1/repos
| Tham số | Kiểu | Ý nghĩa |
|---|---|---|
| q | string | Từ khoá tìm kiếm, không phân biệt dấu tiếng Việt. |
| topic | string | ID hoặc tên chủ đề (ví dụ scrape, agent, frontend). |
| language | string | Ngôn ngữ chính của repo. |
| owner | string | Tên tổ chức / chủ sở hữu. |
| min_stars | integer | Ngưỡng số sao tối thiểu. |
| sort | string | stars | newest | name | updated | relevance. |
| page / per_page | integer | Phân trang, per_page tối đa 100. |
| fields | string | Chỉ trả về các trường cần, ví dụ name,url,summary. |
Cập nhật kho theo yêu cầu
Kho được cập nhật khi có yêu cầu. Các endpoint ghi cần header X-Api-Key trùng với biến môi trường KHO_REPO_ADMIN_KEY.
| Method | Path | Mô tả |
|---|---|---|
| POST | /api/v1/repos | Thêm repo mới vào kho (tự lấy metadata từ GitHub). |
| PATCH | /api/v1/repos/{owner}/{name} | Sửa mô tả, chủ đề, điểm nổi bật. |
| DELETE | /api/v1/repos/{owner}/{name} | Xoá repo khỏi kho. |
| POST | /api/v1/repos/{owner}/{name}/refresh | Làm mới số sao & ngày push từ GitHub. |
# Thêm repo mới — tự lấy mô tả, ngôn ngữ, số sao và tự suy luận chủ đề
curl -X POST "https://repo.shopkitai.com/api/v1/repos" \
-H "X-Api-Key: $KHO_REPO_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{"repo":"microsoft/playwright","summary":"Playwright giúp kiểm thử và tự động hoá trình duyệt."}'
# Sửa mô tả tiếng Việt của một repo
curl -X PATCH "https://repo.shopkitai.com/api/v1/repos/microsoft/playwright" \
-H "X-Api-Key: $KHO_REPO_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{"category":"scrape","highlights":["Chạy Chromium, Firefox, WebKit."]}'Kế hoạch dựng store bán hàng
Kho không chỉ lưu repo, mà còn trả về kế hoạch dựng store để AI agent tự động hoá việc dựng cửa hàng. Endpoint này tự chọn repo trong kho cho từng vai trò (storefront, design system, giỏ hàng, hiệu ứng, carousel, hosting…), kèm lệnh cài đặt, gợi ý kỹ thuật và checklist ra mắt store.
# Kế hoạch dựng store theo nền tảng
curl "https://repo.shopkitai.com/api/v1/store/plan?platform=shopify"
# Chỉ lấy một vai trò
curl "https://repo.shopkitai.com/api/v1/store/plan?role=cart"
# platform: shopify (Hydrogen headless) | stripe (tự host) | nextjs (thuần)
# role: storefront | storefront-skills | design-system | animation | cart | carousel | hosting | product-media| Vai trò | Dùng để |
|---|---|
| storefront | Nền tảng dựng trang cửa hàng: danh mục, sản phẩm, checkout. |
| storefront-skills | Skill cho AI agent viết đúng chuẩn Storefront API, clone landing page. |
| design-system | Bộ component giao diện dùng chung cho mọi trang. |
| animation | Hiệu ứng 3D, Bento Grid, Marquee, shimmer cho hero và trang sản phẩm. |
| cart | Giỏ hàng trượt kèm thanh free shipping và upsell 1-click. |
| carousel | Dải video UGC 9:16 tự động phát để tăng tỷ lệ chốt đơn. |
| hosting | Framework chạy production và cách deploy store. |
| product-media | Công cụ tạo ảnh sản phẩm, video unbox, ảnh nền landing page. |
Trên MCP server, agent gọi tool plan_store với tham số platform và role, hoặc dùng search_repos với use_case=build-store.
Kết nối MCP server
MCP server chạy ở chế độ stateless, hỗ trợ Streamable HTTP. Agent dùng được 6 tool: search_repos, get_repo, list_topics, get_stats, plan_store và add_repo.
# Claude Code
claude mcp add --transport http kho-repo https://repo.shopkitai.com/mcp
# Cursor / agent khác dùng cấu hình JSON
{
"mcpServers": {
"kho-repo": { "type": "http", "url": "https://repo.shopkitai.com/mcp" }
}
}Định dạng phản hồi
{
"data": [
{
"name": "firecrawl/firecrawl",
"url": "https://github.com/firecrawl/firecrawl",
"topic": "Thu thập dữ liệu & Trình duyệt tự động",
"topic_id": "scrape",
"language": "TypeScript",
"stars": 202341,
"summary": "🔥 The API to search, scrape, and interact with the web for AI",
"description": "Mô tả gốc từ GitHub",
"highlights": ["…"],
"why_match": "Khớp ở: tên repo, mô tả tiếng Việt"
}
],
"meta": {
"total": 23,
"page": 1,
"per_page": 24,
"total_pages": 1
}
}