@agent-inspect/mcp 6.29.1 → 6.29.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -2
- package/dist/index.cjs +34 -1059
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.mjs +34 -1052
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -20,15 +20,26 @@ MCP **client** tool-call tracing for AgentInspect (list/call lifecycle).
|
|
|
20
20
|
npm install agent-inspect @agent-inspect/mcp
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
Install matching fixed-group versions (same `agent-inspect` and `@agent-inspect/mcp` release). The MCP package keeps `agent-inspect` external so `wrapMcpClient` shares the application `inspectRun` context. A version mismatch can still produce a second runtime and lose nested MCP steps.
|
|
24
|
+
|
|
23
25
|
## Example
|
|
24
26
|
|
|
25
27
|
```ts
|
|
28
|
+
import { inspectRun } from "agent-inspect";
|
|
26
29
|
import { wrapMcpClient } from "@agent-inspect/mcp";
|
|
27
30
|
|
|
28
|
-
const traced = wrapMcpClient(mcpClient, {
|
|
29
|
-
|
|
31
|
+
const traced = wrapMcpClient(mcpClient, { serverName: "tools" });
|
|
32
|
+
|
|
33
|
+
await inspectRun("my-agent", async () => {
|
|
34
|
+
await traced.listTools?.();
|
|
35
|
+
await traced.callTool({ name: "search", arguments: {} });
|
|
36
|
+
});
|
|
30
37
|
```
|
|
31
38
|
|
|
39
|
+
Call wrapped MCP operations **inside** `inspectRun` (or an active inspector run). Outside an active run, `step()` executes without instrumentation.
|
|
40
|
+
|
|
41
|
+
`wrapMcpClient` returns a Proxy over the original client so prototype methods (`connect`, `close`, `listResources`, …) and private SDK state remain available. Do not discard the original client reference solely to work around missing methods.
|
|
42
|
+
|
|
32
43
|
## Privacy
|
|
33
44
|
|
|
34
45
|
- Local JSONL only; no MCP traffic sent to AgentInspect cloud (there is none)
|