使用说明
备用未来MCP服务器
MCP(模型上下文协议)服务器,它公开AlternateFuture平台操作——计算、部署、身份验证、计费和AI模型——作为Cursor、Claude Desktop和其他MCP兼容客户端的工具。
设置
cd mcp-cloud
pnpm install
pnpm build
环境变量
| 变量 | 必填 | 描述 |
|---|---|---|
AF_PAT |
是 | 个人访问令牌(af_live_...) |
AF_ORG_ID |
推荐 | 组织范围操作的组织ID |
AF_API_URL |
否 | 云API URL(默认值: https://api.alternatefutures.ai) |
AF_AUTH_URL |
无 | Auth API URL(默认值: https://auth.alternatefutures.ai) |
在以下位置创建PAT https://app.alternatefutures.ai → 代币。
客户端配置
光标
添加 .cursor/mcp.json (项目)或 ~/.cursor/mcp.json (全球):
{
"mcpServers": {
"alternatefutures": {
"command": "node",
"args": ["/path/to/AlternateFutures/mcp-cloud/dist/index.js"],
"env": {
"AF_PAT": "af_live_xxxxxxxxxxxx",
"AF_ORG_ID": "your-org-id"
}
}
}
}
克劳德桌面
添加 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"alternatefutures": {
"command": "node",
"args": ["/path/to/AlternateFutures/mcp-cloud/dist/index.js"],
"env": {
"AF_PAT": "af_live_xxxxxxxxxxxx",
"AF_ORG_ID": "your-org-id"
}
}
}
}
可用工具
云(服务云api)
| 工具 | 说明 |
|---|---|
list_projects |
列出组织中的所有项目 |
list_services |
列出项目中具有部署状态的服务 |
list_templates |
列出可用的部署模板 |
get_template |
获取模板详细信息(资源、环境变量、端口) |
deploy_template |
将模板部署到Akash或Phala TEE |
list_deployments |
列出跨提供商的所有部署 |
get_deployment_status |
获取部署状态和成本明细 |
stop_deployment |
停止/关闭Akash或Phala部署 |
get_deployment_logs |
从服务中获取容器日志 |
list_domains |
列出组织的域 |
get_dns_records |
列出域区域的DNS记录 |
认证和计费(服务认证)
| 工具 | 说明 |
|---|---|
get_user_info |
获取用户配置文件和身份验证方法 |
get_billing_balance |
获取信用钱包余额 |
get_usage_history |
获取支出/使用历史记录 |
get_subscription_status |
获取订阅计划和状态 |
list_pats |
列出个人访问令牌 |
create_pat |
创建新的PAT |
list_ai_models |
列出可用的AI推理模型 |
发展
# Build and launch with MCP Inspector
pnpm dev
# Watch mode
pnpm dev:watch
