Claude Desktop调了个工具,等了五秒没反应。是网络卡了?参数传错了?还是服务器挂了?你猜不透,只能干瞪眼。
这就是MCP(模型上下文协议)开发的日常痛点。协议让AI能调用外部工具,但工具链黑箱化严重:哪个接口慢、哪次调用失败、Claude到底发了什么参数——全是盲区。
![]()
开发者Enmanuel Magana搞了个叫Heimdall的透明代理,专门解决这个观测真空。它不碰目标服务器一行代码,直接在客户端和服务器之间截获所有JSON-RPC消息,转成OpenTelemetry链路数据存起来。
![]()
用法很简单:把原来的启动命令包一层。
本地服务器这么写:
"command": "heimdall-mcp",
"args": ["--store", "sqlite://~/.heimdall/traces.db", "--", "node", "my-server.js"]
远程HTTP/SSE服务器:
"command": "heimdall-mcp",
"args": ["--store", "postgres://...", "--target", "http://remote-server/sse"]
![]()
存储选项挺灵活:SQLite用WASM跑本地,零原生依赖;也能接Postgres、MySQL,或者任何支持OTLP的后端。嫌命令行麻烦还有TypeScript库,fluent builder API直接嵌进代码。
为什么需要这个?LLM agent编排MCP工具的场景越来越多,但观测工具明显掉队。IBM有个ContextForge做类似的事,不过是重型Python网关。Heimdall走轻量化路线,定位就是npm包体量。
项目刚发v0.1,核心代理+SQLite存储已可用。作者在GitHub上开了roadmap,正在征集两方面反馈:拦截器API设计,以及OTel语义约定映射是否合理。
项目地址:https://github.com/enmanuelmag/heimdall-mcp
特别声明:以上内容(如有图片或视频亦包括在内)为自媒体平台“网易号”用户上传并发布,本平台仅提供信息存储服务。
Notice: The content above (including the pictures and videos if any) is uploaded and posted by a user of NetEase Hao, which is a social media platform and only provides information storage services.