MCP
FabHub MCP(@fabhub/mcp)提供一套固定、公开安全的工具,用于由 API 支持的代理工作流。每个工具恰好对应一个公共 API 作用域;不存在通用的 HTTP 代理。
安装
npx -y @fabhub/mcp
本地配置
{
"mcpServers": {
"fabhub": {
"command": "npx",
"args": ["-y", "@fabhub/mcp"],
"env": {
"FABHUB_API_KEY": "pk_test_example"
}
}
}
}
服务器仅公布你的密钥拥有作用域的工具,因此代理永远无法调用超出凭据权限的内容。
工具安全性
- 当凭据具有匹配的读取作用域时,只读工具可用。
- 写工具需要匹配的写作用域以及显式确认输入。
- 破坏性工具需要删除作用域以及显式删除确认。
- 托管 HTTP 模式按请求验证凭据,且不存储租户密钥。
工具
| 工具 | 作用域 | 安全性 |
|---|---|---|
list_items | items:read | read_only |
get_item | items:read | read_only |
list_item_ingredients | items:read | read_only |
list_item_suppliers | items:read | read_only |
create_item | items:write | write, requires confirmation |
update_item | items:write | write, requires confirmation |
delete_item | items:write | destructive, requires confirmation |
get_organization | organization:read | read_only |
list_orders | orders:read | read_only |
get_order | orders:read | read_only |
list_order_lines | orders:read | read_only |
create_order | orders:write | write, requires confirmation |
update_order | orders:write | write, requires confirmation |
list_contacts | contacts:read | read_only |
get_contact | contacts:read | read_only |
create_contact | contacts:write | write, requires confirmation |
update_contact | contacts:write | write, requires confirmation |
delete_contact | contacts:write | destructive, requires confirmation |
get_usage_summary | usage:read | read_only |
list_webhooks | webhooks:read | read_only |
get_webhook | webhooks:read | read_only |
create_webhook | webhooks:write | write, requires confirmation |
update_webhook | webhooks:write | write, requires confirmation |
delete_webhook | webhooks:delete | destructive, requires confirmation |
list_webhook_deliveries | webhooks:deliveries:read | read_only |
list_audit_events | audit:read | read_only |
list_stock_levels | inventory:read | read_only |
list_stock_documents | inventory:read | read_only |
get_stock_document | inventory:read | read_only |
list_stock_document_lines | inventory:read | read_only |
create_stock_document | inventory:write | write, requires confirmation |
update_stock_document | inventory:write | write, requires confirmation |
create_stock_document_line | inventory:write | write, requires confirmation |
update_stock_document_line | inventory:write | write, requires confirmation |
delete_stock_document | inventory:write | destructive, requires confirmation |
delete_stock_document_line | inventory:write | destructive, requires confirmation |
submit_stock_document | inventory:write | write, requires confirmation |
cancel_stock_document | inventory:write | write, requires confirmation |
approve_stock_document | inventory:write | destructive, requires confirmation |
create_item_ingredient | items:write | write, requires confirmation |
update_item_ingredient | items:write | write, requires confirmation |
delete_item_ingredient | items:write | destructive, requires confirmation |
create_item_supplier | items:write | write, requires confirmation |
update_item_supplier | items:write | write, requires confirmation |
delete_item_supplier | items:write | destructive, requires confirmation |