feat(p2): MCP servers on the host, on environments and from projects

A manager on the p2 server owns every MCP connection and process. Session
workers hold one view each and lease the locations their conversations
work at; the manager runs the owner's mcp.json servers there (stdio per
session and location, or shared; HTTP shared by default) and offers their
tools as deferred Durable tools found through tool_search.

Stdio servers on an environment start through its pi-env daemon, one
connection per environment shared by its instances, through cmd.exe on
Windows. A project's .pi/mcp.json, read by the worker at each location,
may add stdio servers that run there and switch the owner's servers on or
off; the manager refuses everything else. A lease gets servers only on
environments its session works on.
This commit is contained in:
Armin Ronacher 2026-11-03 16:48:38 +01:00
parent a57438e918
commit 7dc38ff0e9
33 changed files with 4242 additions and 13 deletions

View file

@ -22,6 +22,8 @@
"@earendil-works/pi-ai": "1.5.0",
"@earendil-works/pi-codemode": "1.5.0",
"@earendil-works/pi-durable": "1.5.0",
"@earendil-works/pi-env": "1.5.0",
"@earendil-works/pi-mcp": "1.5.0",
"@earendil-works/pi-schema": "1.5.0",
"diff": "8.0.4",
"esbuild": "0.28.2",