/ 目录 / 演练场 / Gram
● 官方 speakeasy-api ⚡ 即开即用

Gram

作者 speakeasy-api · speakeasy-api/gram

Speakeasy 出品的控制平面——agent/MCP/skill 的可观测性、策略管控与注册表,深度 API 优先。

Gram 来自 Speakeasy(API SDK 领域的知名团队)。它是一个控制平面:观测跨 agent 的 tool 调用、执行策略、管理 MCP server、将 skill 作为可部署制品管理。专为将 agent 视作服务来治理的团队设计。

为什么要用

核心特性

实时演示

实际使用效果

就绪

安装

选择你的客户端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "gram-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@speakeasy/gram"
      ]
    }
  }
}

打开 Claude Desktop → Settings → Developer → Edit Config。保存后重启应用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "gram-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@speakeasy/gram"
      ]
    }
  }
}

Cursor 使用与 Claude Desktop 相同的 mcpServers 格式。项目级配置优先于全局。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "gram-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@speakeasy/gram"
      ]
    }
  }
}

点击 Cline 侧栏中的 MCP Servers 图标,然后选 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "gram-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@speakeasy/gram"
      ]
    }
  }
}

格式与 Claude Desktop 相同。重启 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "gram-mcp",
      "command": "npx",
      "args": [
        "-y",
        "@speakeasy/gram"
      ]
    }
  ]
}

Continue 使用服务器对象数组,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "gram-mcp": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "@speakeasy/gram"
        ]
      }
    }
  }
}

加入 context_servers。Zed 保存后热重载。

claude mcp add gram-mcp -- npx -y @speakeasy/gram

一行命令搞定。用 claude mcp list 验证,claude mcp remove 卸载。

使用场景

实战用法: Gram

查看 agent 实际调用了什么

👤 开发者 ⏱ ~15 min intermediate

何时使用: 你想对组织内 MCP tool 的使用情况做真实审计。

步骤
  1. 接入 Gram
    Configure clients to route through Gram.✓ 已复制
    → 遥测数据开始流入
  2. 检查
    Open Gram dashboard; filter by tool/user.✓ 已复制
    → 使用规律浮现

结果: 真实掌握 agent tool 的使用全貌。

组合

与其他 MCP 搭配,撬动十倍杠杆

gram-mcp + agentgateway

Gram 负责控制平面,agentgateway 负责高性能数据平面

Combine gram-mcp with agentgateway: Use Gram for control plane; agentgateway for high-perf data plane✓ 已复制

工具

此 MCP 暴露的能力

工具输入参数何时调用成本
control-plane (见文档) 无可调用 tool——它位于 agent 旁边运作 1 次调用

成本与限制

运行它的成本

API 配额
取决于套餐
每次调用 Token 数
不适用
费用
免费套餐;组织功能需付费
提示
开启追踪采样——全量追踪代价很高

安全

权限、密钥、影响范围

凭据存储: OAuth + 组织 token
数据出站: Speakeasy SaaS 或自托管

故障排查

常见错误与修复

追踪数据缺失

确认客户端配置了 emit;检查采样设置

替代方案

Gram 对比其他方案

替代方案何时用它替代权衡
archestra你只需要纯注册表功能可观测性较弱

更多

资源

📖 阅读 GitHub 上的官方 README

🐙 查看未解决的 issue

🔍 浏览全部 400+ MCP 服务器和 Skills