Cắm mcp.onie.net vào Claude, ChatGPT, Cursor, Cline, Windsurf, hay OpenAI Agents SDK — và chỉ việc nói: "Tạo VM Ubuntu 4 vCPU ở Hà Nội", "Tắt VM tên web-prod-1", "Số dư còn bao nhiêu", "Tạo snapshot trước khi update". AI tự gọi đúng API.
https://mcp.onie.net/mcp
Transport: Streamable HTTP (MCP 2025-03-26).
Bearer token Sanctum lấy từ Profile → API Tokens.
58 tools (VM, billing, volume, network, K8s, DNS, SSH key, ticket...) + 1 tool onie_api_call generic.
Mọi client MCP hỗ trợ Streamable HTTP: Claude Code/Desktop, Cursor, Cline, Windsurf, OpenAI Agents SDK, n8n, LangChain MCP adapter...
Trên claude.ai → Settings → Connectors → Add custom connector. Form chỉ có 1 ô URL — KHÔNG cần OAuth, KHÔNG cần header. Dán URL có nhúng token:
Name: Onie Cloud
Remote MCP URL: https://mcp.onie.net/u/<YOUR_ONIE_TOKEN>/mcp
OAuth fields: (để trống)
Bấm Add. Claude sẽ tự discover 58 tools.
Cũng dùng được dạng query string (cho client khác chỉ chấp nhận URL): https://mcp.onie.net/mcp?token=<TOKEN>
Trong terminal đã có claude CLI:
claude mcp add --transport http onie https://mcp.onie.net/mcp \
--header "Authorization: Bearer YOUR_ONIE_TOKEN"
Sau đó mở Claude Code, gõ /mcp để verify. AI sẽ thấy ngay 58 tools.
Mở file config Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"onie": {
"url": "https://mcp.onie.net/mcp",
"transport": "http",
"headers": {
"Authorization": "Bearer YOUR_ONIE_TOKEN"
}
}
}
}
Restart Claude Desktop. Nếu version cũ chưa hỗ trợ remote MCP qua HTTP, dùng mcp-remote bridge:
{
"mcpServers": {
"onie": {
"command": "npx",
"args": [
"-y", "mcp-remote",
"https://mcp.onie.net/mcp",
"--header", "Authorization: Bearer YOUR_ONIE_TOKEN"
]
}
}
}
Cursor → Settings → MCP → Add new MCP Server:
{
"mcpServers": {
"onie": {
"url": "https://mcp.onie.net/mcp",
"headers": {
"Authorization": "Bearer YOUR_ONIE_TOKEN"
}
}
}
}
Trong VS Code, mở Cline / Roo Cline settings → MCP → Edit MCP settings:
{
"mcpServers": {
"onie": {
"type": "streamableHttp",
"url": "https://mcp.onie.net/mcp",
"headers": {
"Authorization": "Bearer YOUR_ONIE_TOKEN"
}
}
}
}
Windsurf settings → MCP servers:
{
"mcpServers": {
"onie": {
"serverUrl": "https://mcp.onie.net/mcp",
"headers": {
"Authorization": "Bearer YOUR_ONIE_TOKEN"
}
}
}
}
OpenAI Agents SDK (Python):
from agents import Agent
from agents.mcp import MCPServerStreamableHttp
onie_mcp = MCPServerStreamableHttp(
name="onie",
url="https://mcp.onie.net/mcp",
headers={"Authorization": "Bearer YOUR_ONIE_TOKEN"},
)
agent = Agent(
name="Cloud Ops",
instructions="Bạn quản lý hạ tầng Onie Cloud của user.",
mcp_servers=[onie_mcp],
)
OpenAI ChatGPT Connector (web): vào Settings → Connectors → Add custom MCP → URL https://mcp.onie.net/mcp, Bearer token.
# Init handshake
curl -X POST https://mcp.onie.net/mcp \
-H "Authorization: Bearer YOUR_ONIE_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize",
"params":{"protocolVersion":"2025-03-26",
"capabilities":{},
"clientInfo":{"name":"curl","version":"1"}}}'
# Health
curl https://mcp.onie.net/healthz
# List 58 tools
curl https://mcp.onie.net/info | jq '.tools[].name'
Sau khi cắm xong, thử các câu lệnh tiếng Việt tự nhiên với AI:
Xem JSON đầy đủ tại /info. Highlights:
get_profile · get_balance · list_activity · list_projects
get_billing_summary · list_invoices · list_transactions · get_hourly_usage
list_vms · create_vm · start_vm · stop_vm · reboot_vm · destroy_vm · resize_vm · reset_vm_password
list_vm_snapshots · create_vm_snapshot · restore_snapshot · delete_snapshot
list_volumes · create_volume · attach_volume · detach_volume · delete_volume
list_networks · list_vpcs · list_ip_addresses · list_security_groups · list_load_balancers
list_dns_zones · create_dns_record · list_ssh_keys · create_ssh_key
list_kubernetes_clusters · list_container_apps · list_object_storage_buckets · list_gpu_instances · list_proxies · list_bare_metal
list_support_tickets · create_support_ticket
onie_api_call — gọi tùy ý endpoint api.onie.net (trừ /admin).
destroy_vm, delete_volume, delete_snapshot, restore_snapshot) yêu cầu tham số confirm: true để chống AI gọi nhầm.
onie_api_call chặn cứng path /admin/*./home/cloud/onie-mcp (server self-hosted).