ApX 标志ApX 标志

趋近智

MCP

模型上下文协议 (MCP) 集成

为 AI 助手提供经过验证的 GPU 选型及显存数据,用于评估集群部署方案、审计显存预算并生成基础设施提案。

MCP 连接指南

将您的 MCP 客户端连接到远程 Streamable HTTP MCP 服务器端点。

服务器地址 (Streamable HTTP)

https://apxml.com/mcp

身份验证

OAuth 2.0 (Bearer 令牌) 或在设置中生成的账户 API 令牌。

客户端配置示例

{
  "mcpServers": {
    "apxml": {
      "url": "https://apxml.com/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

Streamable HTTP / cURL Smoke Test

Raw HTTP clients must send Accept: application/json, text/event-stream alongside Content-Type: application/json and the Authorization: Bearer header. Echo the Mcp-Session-Id response header from initialize on follow-up tools/list and tools/call requests.

curl -X POST https://apxml.com/mcp \
  -H "Authorization: Bearer <YOUR_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-test","version":"1.0"}}}'

工具参考目录

连接成功后,MCP 客户端可调用由大语言模型性能引擎驱动的 8 项选型、目录及基准评测工具。带 * 的为必填参数。

工具名称参数(类型、默认值、枚举)功能说明
calculate_vram_requirements
llm_key* (string)
gpu_key (string)
calc_mode (string, default: 'inference')'inference' | 'finetuning'
quantization (string, default: 'fp16')
kv_cache_quantization (string)
num_gpus (number, default: 1)
batch_size (number, default: 1)
seq_length (number, default: 2048)
concurrent_users (number)
finetuning_method (string)'full' | 'lora' | 'qlora'
lora_rank (number)
gradient_accumulation_steps (number)
enable_offloading (boolean, default: false)
offload_kv_cache (boolean, default: false)
enable_speculative_decoding (boolean, default: false)
speculative_draft_model_params (number)
shared_prefix_ratio (number)
prefix_cache_scope (string, default: 'cross_user')
num_nodes (number)
gpus_per_node (number)
tp_degree (number)
pp_degree (number)
interconnect_type (string)
inter_node_interconnect (string)
custom_vram (number)
custom_bandwidth (number)
custom_tflops (number)
vocab_size (number)
ffn_intermediate_size (number)
image_width (number)
image_height (number)
num_frames (number)
inference_steps (number)
guidance_scale (number)
encoder_offload (boolean)
vae_tiling (boolean)

精确计算推理或微调场景下的显存分配(权重、KV 缓存、激活值、框架开销)、TPS、TTFT、并发 SLA 及运行时建议。

recommend_hardware_setup
llm_key* (string)
calc_mode (string, default: 'inference')'inference' | 'finetuning'
objective (string, default: 'MIN_HARDWARE_REQUIREMENT')'MIN_HARDWARE_REQUIREMENT' | 'MIN_COST_HOURLY' | 'MAX_THROUGHPUT_TPS' | 'MIN_LATENCY_TTFT' | 'MAX_PER_USER_TPS' | 'MIN_COST_PER_M_TOKENS'
seq_length (number, default: 4096)
batch_size (number, default: 1)
vendor (string, default: 'nvidia')'nvidia' | 'amd' | 'apple' | 'all'
ttft_max_ms (number)
min_per_user_tps (number)

针对大语言模型与指定优化目标评估帕累托最优硬件配置(GPU 型号、数量、量化、TP/PP 并行)。

get_available_gpus
gpu_type (string)'discrete' | 'apple_silicon'

查询支持的独立 GPU 和 Apple Silicon 芯片目录,返回有效 gpu_key、显存容量及订阅等级可用性。

get_llm_variants
query (string)
provider (string)
open_weights (boolean)
open_source (boolean)
modality (string)'text' | 'image' | 'audio'
architecture (string)'dense' | 'moe'
min_params (number)
max_params (number)
sort (string)'rank' | 'release_date' | 'name' | 'livebench_overall' | 'livebench_coding' | 'livebench_reasoning' | 'aider_coding' | 'mmlu' | 'gpqa' | 'swe_bench_verified' | 'lmsys_elo'
limit (number, default: 20)

按关键词、提供商、架构、模态或参数量浏览和筛选支持的 LLM 变体。

get_hardware_model_compatibility
hardware_slug_or_key* (string)
seq_length (number, default: 4096)
num_gpus (number, default: 1)
status_filter (string, default: 'runnable')'runnable' | 'all'
limit (number, default: 30)

评估特定硬件设备上可运行的开源模型与量化版本,返回 TPS、TTFT、显存压力状态及训练限制。

get_model_evaluations
model_name (string)
provider (string)
sort (string)'livebench_overall' | 'livebench_coding' | 'livebench_reasoning' | 'livebench_mathematics' | 'livebench_average' | 'aider_coding' | 'aider_refactoring' | 'mmlu' | 'mmlu_pro' | 'gpqa' | 'webdev_arena' | 'agent_arena' | 'text_arena'
limit (number, default: 20)

获取 LLM 变体的基准性能评测分数(LiveBench、Aider、MMLU、GPQA、Arena)。

search_hardware_directory
query (string)
architecture (string)'apple_silicon' | 'nvidia' | 'amd' | 'intel'
min_memory_gb (number)

在硬件目录中搜索 GPU 与 Apple Silicon 芯片,返回显存、可用 VRAM 上限、带宽、架构及准确设备 slug。

get_vram_calculator_accuracy
track (string)'memory' | 'inference_speed' | 'finetuning_speed'

返回计算引擎对照物理硬件遥测所得的实测准确率指标与校准边界。

推荐工具调用工作流

使用发现类工具解析准确的平台标识符,或直接向计算与规划工具传入模型名称。

发现工具输出字段传入参数目标工具
get_llm_variantsvariants[].slugllm_key

calculate_vram_requirements, recommend_hardware_setup

get_available_gpusgpus[].keygpu_key

calculate_vram_requirements

search_hardware_directorydevices[].slughardware_slug_or_key

get_hardware_model_compatibility

当已知模型标识符时,可直接将其传入 calculate_vram_requirements 或 recommend_hardware_setup,无需先调用 get_llm_variants。

响应格式与关键输出字段

所有 MCP 工具均返回统一的 JSON 外壳,包含布尔值 success、对象 data,以及可选的字符串 error 和对象 metadata 字段。

关键数据字段所属工具含义与单位
memory_status

calculate_vram_requirements

显存适配状态:'okay' 表示 50% 及以下、'moderate' 表示 75% 及以下、'high' 表示 90% 及以下、'very_high' 表示超过 90%、'insufficient' 表示显存不足,或 'error'。

status

get_hardware_model_compatibility

兼容性矩阵中各量化版本的适配状态:'optimal'、'comfortable'、'upper_bound' 或 'oom'。

per_user_tps / estimated_throughput_tps

calculate_vram_requirements, recommend_hardware_setup

per_user_tps 为单用户解码速度,单位为 tokens/s;estimated_throughput_tps 为所有并发用户与批次的聚合解码吞吐量。

ttft_ms

calculate_vram_requirements, get_hardware_model_compatibility

预估首 token 延迟,单位为毫秒。

concurrency_sla

calculate_vram_requirements

KV 缓存饱和度指标,包含 maxConcurrencyBeforePreemption、preemptionRisk、maxSustainableQps 及 p50/p95/p99 TTFT。

runtime_advisories

calculate_vram_requirements

包含 code、severity 和 message 字段的结构化建议,涵盖 PCIe KV 交换、Prefill 饥饿、流水线不平衡或量化模拟开销。

订阅套餐限制

可用的 GPU 型号、集群规模、批处理大小和并发用户数取决于您的订阅套餐。

套餐GPU 与集群权限批处理大小与并发上限

Basic

消费级 GPU 与基础硬件,最多 8 节点 × 8 张 GPU

批处理大小和并发用户数最高均为 8

Pro

全部数据中心 GPU,包括 H100、H200、B200、MI300X 等,以及最多 8 节点集群,每节点最多 8 张 GPU

批处理大小和并发用户数最高均为 32

Pro+

全部数据中心 GPU 与不限规模的机柜级集群

不限批处理大小和并发用户数

枚举值参考

受限参数的可选值及其含义说明。

参数可选值说明
calc_modeinference

模型推理服务所需的显存、吞吐量、延迟与并发能力。

calc_modefinetuning

模型训练与微调所需的显存、优化器状态及训练速度。

objectiveMIN_HARDWARE_REQUIREMENT

满足模型显存需求的最小 GPU 数量与最低硬件门槛。

objectiveMIN_COST_HOURLY

最低的每小时云端算力租赁成本。

objectiveMAX_THROUGHPUT_TPS

最高的系统聚合解码吞吐量,单位为 tokens/s。

objectiveMIN_LATENCY_TTFT

最低的首 token 延迟。

objectiveMAX_PER_USER_TPS

最高的单用户解码速度,单位为 tokens/s。

objectiveMIN_COST_PER_M_TOKENS

最低的每百万生成 token 成本。

vendornvidia

NVIDIA 独立与数据中心 GPU。

vendoramd

AMD Instinct 与 Radeon GPU。

vendorapple

Apple Silicon 统一内存设备。

vendorall

跨所有支持的硬件厂商进行评估。

status_filterrunnable

仅返回不会发生显存溢出的可运行模型。

status_filterall

返回全部评估模型,包含显存不足的条目。

trackmemory

对照物理实测的显存分配准确率。

trackinference_speed

推理 TPS 与 TTFT 预测准确率。

trackfinetuning_speed

微调吞吐量预测准确率。

finetuning_methodfull

全量参数微调,更新全部模型权重。

finetuning_methodlora

冻结基础权重的低秩自适应微调。

finetuning_methodqlora

4-bit 量化基础权重搭配 LoRA 适配器。

gpu_typediscrete

PCIe 与 SXM 独立显卡。

gpu_typeapple_silicon

Apple Silicon 统一内存芯片。

工具调用与响应示例

calculate_vram_requirements 的请求参数与返回载荷示例。

工具调用参数 (calculate_vram_requirements)

{
  "llm_key": "qwen35-9b",
  "gpu_key": "4090_24",
  "calc_mode": "inference",
  "quantization": "q4_k_m",
  "seq_length": 4096,
  "batch_size": 4,
  "concurrent_users": 4
}

工具返回结果

{
  "success": true,
  "data": {
    "vram_usage": 7.42,
    "vram_percentage": 30.9,
    "memory_status": "okay",
    "per_user_tps": 62.4,
    "estimated_throughput_tps": 249.6,
    "ttft_ms": 145,
    "framework_preset": "llama_cpp",
    "concurrency_sla": {
      "max_concurrency_before_preemption": 24,
      "preemption_risk": "low",
      "p95_ttft_ms": 210.5
    }
  }
}