跳转到主要内容
在一分钟内让 Tenderly MCP Server 在您的 AI 助手中运行起来。

前置条件

连接到 MCP Server

在终端中运行以下命令:
claude mcp add tenderly --transport http https://mcp.tenderly.co/mcp
验证服务器已连接:
claude mcp list
在 Claude Code 中运行 /mcp,选择 tenderly,并按提示在浏览器中完成登录以进行身份验证。

第一次工具调用

连接完成后,尝试一个简单的提示以验证是否一切正常:
“What is my account name and currently active project?”
Claude 将调用 get_user_info,返回您的账户信息以及当前激活的项目(如果已设置)。如果这有效,则一切就绪。

设置激活的项目

大多数工具需要项目上下文。每个会话设置一次即可:
“Set my active project to my-project under my-account”
Claude 将调用 set_active_project。所有后续工具调用(模拟、Virtual Environments、追踪)都将使用此项目。
您也可以让 Claude 自动确定项目,只需让它执行某项操作,如有需要它会先调用 list_projects

故障排查

身份验证失败或连接器无法登录

如果 OAuth 登录进入循环或出错,请在 Claude 客户端中断开 Tenderly 连接器(Settings → Connectors)并重新添加。在 Claude Code 中,运行 /mcp,选择 tenderly,并重新完成浏览器登录。Claude.ai 和 Claude Desktop 上的自定义连接器需要 Pro 或更高级别套餐;在 Enterprise 套餐中,只有工作区管理员可以添加。

“No active project” 错误

大多数工具需要项目上下文。请让 Claude 设置一个:
“Set my active project to my-project under my-account”
或者让 Claude 通过先列出项目自动选择。

“No active Virtual Environment” 错误

Virtual Environment 工具在激活的 Virtual Environment 上运行。可以创建/fork 一个 Virtual Environment(这会自动将其激活),或让 Claude 使用已有的 Virtual Environment ID 调用 set_active_vnet

调用追踪或事件被截断

get_simulation_call_trace 的上限为 256 条,get_simulation_events 为 100 条。对于大型交易,请使用高级追踪导航工具:先使用 get_trace_stats 查看大小,然后使用 get_trace_skeleton 查看树结构,再使用 get_call_trace_nodeget_subtree_eventssearch_call_trace 钻取到具体部分。对于 revert,find_failuresget_error_path 通常是定位根本原因的最快路径。

Claude 选错了网络、项目或 Virtual Environment

请在提示中明确指定,写明网络、项目 slug 或 Virtual Environment 名称。您也可以让 Claude 在执行任务前通过 get_user_info 确认激活的上下文。

工具调用返回过时或错误的数据

激活的项目和 Virtual Environment 状态是按会话保存的。如果您在对话中途切换项目或 Virtual Environment,请在运行后续工具前通过 get_user_info 确认激活的上下文。

后续步骤