gsxdsm
c1613ad7f6
FN-7122: expose MCP servers as pi session tools
Connect configured MCP servers during pi chat and agent session startup so their discovered tools are available as namespaced custom tools.
- Add MCP session tool connection, tool-name sanitization, result mapping, and disposal handling.
- Merge discovered MCP tools into pi customTools while skipping readonly sessions and avoiding secret-bearing logs.
- Cover MCP tool wrapping and pi session integration with targeted tests.
- Document MCP forwarding behavior and promote the MCP SDK to an engine runtime dependency.
Files changed:
.changeset/fn-7122-mcp-session-tools.md | 7 +
docs/mcp.md | 2 +
packages/engine/package.json | 2 +-
.../engine/src/__tests__/mcp-session-tools.test.ts | 105 ++++++++
.../src/__tests__/pi-mcp-session-tools.test.ts | 24 ++
packages/engine/src/mcp-session-tools.ts | 262 ++++++++++++++++++++
packages/engine/src/pi.ts | 71 +++++-
pnpm-lock.yaml | 264 ++++++++++++++++++++-
8 files changed, 713 insertions(+), 24 deletions(-)
Fusion-Task-Id: FN-7122
Fusion-Task-Lineage: e7ff57e7-9bfb-41a4-9ebd-6c868bac2745
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 14:09:47 -07:00
..
2026-06-27 13:28:47 -07:00
2026-06-26 12:06:05 -07:00
2026-06-27 13:05:50 -07:00
2026-06-27 13:05:50 -07:00
2026-06-26 12:06:05 -07:00
2026-06-26 12:06:05 -07:00
2026-06-27 14:09:47 -07:00
2026-06-27 12:15:42 -07:00
2026-06-26 12:06:05 -07:00
2026-06-27 09:28:31 -07:00
2026-06-08 15:19:27 -07:00
2026-06-26 12:06:05 -07:00